/* AlexInventur Web · R73fix30fix2 Portal Design Center · Performance Optimized
 * Reversible visual layer. Existing portal layout and workflows stay intact.
 */
:root{
  --ai-bg-opacity:.64;
  --ai-panel-opacity:.93;
  --ai-bg-overlay:.33;
  --ai-theme-accent:#2563eb;
  --ai-theme-accent-2:#38bdf8;
  --ai-theme-canvas:#eef4f8;
  --ai-theme-ink:#102033;
  --ai-theme-muted:#64748b;
}

body.ai-theme{
  position:relative;
  isolation:isolate;
  min-height:100vh;
  background:var(--ai-theme-canvas);
  color:var(--ai-theme-ink);
}
body.ai-theme::before,
body.ai-theme::after{
  content:"";
  position:fixed;
  pointer-events:none;
  inset:0;
}
body.ai-theme::before{
  z-index:-2;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  opacity:var(--ai-bg-opacity);
}
body.ai-theme::after{
  z-index:-1;
  inset:0;
  background:rgba(239,246,249,var(--ai-bg-overlay));
}

/* Stable centring: fixes the later R73fix28 .unified-shell margin override. */
body.ai306-unified.ai-theme .shell{
  width:calc(100% - 32px);
  max-width:1440px;
  margin-left:auto;
  margin-right:auto;
  padding-left:0;
  padding-right:0;
}
body.ai306-unified.ai-theme .unified-shell{
  width:calc(100% - 32px);
  max-width:1660px;
  margin:16px auto 22px;
  padding-left:0;
  padding-right:0;
}

/* The dark header is a fixed AlexInventur brand element in every design. */
body.ai306-unified.ai-theme .top.ai-portal-header{
  background:linear-gradient(112deg,#050c17,#081529 58%,#0e2846);
  border-bottom:1px solid rgba(89,194,235,.20);
  box-shadow:0 12px 36px rgba(5,12,23,.24);
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  color:#fff;
}
body.ai306-unified.ai-theme .top.ai-portal-header .brand,
body.ai306-unified.ai-theme .top.ai-portal-header .brand b{color:#fff}
body.ai306-unified.ai-theme .top.ai-portal-header .brand small{color:#a9bfd2}
body.ai306-unified.ai-theme .top.ai-portal-header .ai-brand-icon{filter:drop-shadow(0 8px 16px rgba(56,189,248,.28))}
body.ai306-unified.ai-theme .top.ai-portal-header .portal-global-search input{
  margin:0;
  background:rgba(255,255,255,.97);
  border-color:rgba(255,255,255,.18);
  color:#13233a;
  box-shadow:0 9px 26px rgba(0,0,0,.16);
}
body.ai306-unified.ai-theme .top.ai-portal-header .portal-global-search button{
  background:linear-gradient(135deg,var(--ai-theme-accent),var(--ai-theme-accent-2));
}
body.ai306-unified.ai-theme .top.ai-portal-header .ai-header-utility{
  color:#c7d7e7;
  border-color:transparent;
}
body.ai306-unified.ai-theme .top.ai-portal-header a.ai-header-utility:hover{
  color:#fff;
  background:rgba(255,255,255,.08);
  border-color:rgba(116,205,239,.16);
}
body.ai306-unified.ai-theme .top.ai-portal-header .account-nav-avatar{
  background:rgba(56,189,248,.16);
  color:#c6f2ff;
  border-color:rgba(92,201,240,.24);
}
body.ai306-unified.ai-theme .top.ai-portal-header .ai-module-nav a.ai-module-nav-link{
  color:#bdd0e3;
  background:rgba(255,255,255,.045);
  border-color:rgba(180,222,239,.10);
  box-shadow:none;
}
body.ai306-unified.ai-theme .top.ai-portal-header .ai-module-nav a.ai-module-nav-link:hover{
  color:#fff;
  background:rgba(56,189,248,.10);
  border-color:rgba(84,200,240,.24);
}
body.ai306-unified.ai-theme .top.ai-portal-header .ai-module-nav a.ai-module-nav-link.active{
  color:#fff;
  background:linear-gradient(135deg,rgba(56,189,248,.24),rgba(37,99,235,.18));
  border-color:rgba(92,207,246,.34);
  box-shadow:inset 0 -2px 0 #5bd4ff;
}
body.ai306-unified.ai-theme .top.ai-portal-header .ai-nav-module-icon{
  background:rgba(255,255,255,.07);
  color:#8eddfa;
}

/* Readable surfaces without live backdrop blur. This avoids expensive full-page repaints. */
body.ai306-unified.ai-theme :where(
  .card,.tile,.module-card,.hero-panel,.detail-hero,.tree,.list,.preview,
  .ai-module-shell,.ai-module-tree,.ai-module-main,.ai-module-preview,
  .page-head,.preview-box,.ticket-card,.object-card,.timeline-item,
  .ai-unified-frame,.unity-action-bar,.ai27-customer-bar,.workspace-setup-banner,
  .license-strip,.ai-breadcrumb-bar
){
  background-color:rgba(255,255,255,var(--ai-panel-opacity));
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
body.ai-theme .ai-page-loader{-webkit-backdrop-filter:none;backdrop-filter:none}
body.ai306-unified.ai-theme :where(.btn,button[type="submit"],.primary-button,.unity-primary-action){
  background:linear-gradient(135deg,var(--ai-theme-accent),var(--ai-theme-accent-2));
}
body.ai306-unified.ai-theme :where(input,select,textarea):focus{
  border-color:var(--ai-theme-accent-2);
  box-shadow:0 0 0 4px rgba(56,189,248,.18);
}

/* Theme: Light Clean */
body.ai-theme-light-clean{
  --ai-theme-accent:#2563eb;
  --ai-theme-accent-2:#60a5fa;
  --ai-theme-canvas:#f4f7fb;
}
body.ai-theme-light-clean::before{
  background:
    radial-gradient(circle at 14% 10%,#dceeff 0,transparent 31%),
    radial-gradient(circle at 86% 76%,#e5fff7 0,transparent 29%),
    linear-gradient(135deg,#f8fbff,#eef4fb);
  filter:none;
}
body.ai-theme-light-clean::after{background:rgba(247,250,253,.18)}

/* Theme: Module Flow */
body.ai-theme-module-flow{
  --ai-theme-accent:#1769aa;
  --ai-theme-accent-2:#14b8a6;
  --ai-theme-canvas:#edf6fb;
}
body.ai-theme-module-flow::before{
  background-image:url("https://alexinventur.de/assets/backgrounds/alex-module-flow.svg");
}
body.ai-theme-module-flow::after{background:rgba(241,248,251,var(--ai-bg-overlay))}

/* Theme: AI Tech Dark. Dark frame, light content surfaces for compatibility. */
body.ai-theme-ai-tech-dark{
  --ai-theme-accent:#18aee6;
  --ai-theme-accent-2:#7c8cff;
  --ai-theme-canvas:#07111f;
}
body.ai-theme-ai-tech-dark::before{
  background:
    radial-gradient(circle at 16% 15%,rgba(24,174,230,.30),transparent 29%),
    radial-gradient(circle at 86% 76%,rgba(124,140,255,.24),transparent 31%),
    linear-gradient(135deg,#06101f,#0c1d36 56%,#102a45);
  filter:none;
}
body.ai-theme-ai-tech-dark::after{background:rgba(5,13,25,.28)}
body.ai-theme-ai-tech-dark .foot{color:#d8e5f2}
body.ai-theme-ai-tech-dark .ai-breadcrumb-bar{border-color:rgba(111,156,190,.32)}

/* Theme: Mountain Lake */
body.ai-theme-mountain-lake{
  --ai-theme-accent:#1769aa;
  --ai-theme-accent-2:#38bdf8;
  --ai-theme-canvas:#dce8ed;
}
body.ai-theme-mountain-lake::before{
  background-image:var(--ai-bg-image,url("https://alexinventur.de/assets/backgrounds/alex-mountain-lake-blur-3.webp"));
}
body.ai-theme-mountain-lake::after{background:rgba(238,246,249,var(--ai-bg-overlay))}

/* Theme: Calm Coast */
body.ai-theme-calm-coast{
  --ai-theme-accent:#0e7490;
  --ai-theme-accent-2:#38bdf8;
  --ai-theme-canvas:#e5eff1;
}
body.ai-theme-calm-coast::before{
  background-image:var(--ai-bg-image,url("https://alexinventur.de/assets/backgrounds/alex-calm-coast-blur-3.webp"));
}
body.ai-theme-calm-coast::after{background:rgba(247,245,235,var(--ai-bg-overlay))}

/* Login and account-entry pages use the selected cookie theme too. */
body.login-body.ai-theme{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}
body.login-body.ai-theme .login-card{
  background:rgba(255,255,255,var(--ai-panel-opacity));
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  border:1px solid rgba(176,207,225,.56);
  box-shadow:0 34px 100px rgba(4,18,32,.34);
}

/* Design Center */
.ai-design-intro{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center}
.ai-design-current{display:grid;place-items:center;min-width:150px;padding:15px;border:1px solid #d6e2ee;border-radius:18px;background:rgba(255,255,255,.72)}
.ai-design-current b{font-size:15px}.ai-design-current span{font-size:12px;color:#64748b;margin-top:4px}
.ai-theme-choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-top:16px;align-items:stretch}
.ai-theme-choice{display:block;position:relative;min-width:0;height:100%;cursor:pointer}
.ai-theme-choice input{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.ai-theme-choice-card{display:flex;flex-direction:column;width:100%;height:100%;min-width:0;overflow:hidden;border:2px solid transparent;border-radius:20px;padding:12px;background:rgba(255,255,255,.88);box-shadow:0 10px 28px rgba(15,35,62,.08);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.ai-theme-choice:hover .ai-theme-choice-card{transform:translateY(-2px);box-shadow:0 16px 36px rgba(15,35,62,.12)}
.ai-theme-choice input:checked + .ai-theme-choice-card{border-color:var(--ai-theme-accent);box-shadow:0 0 0 4px rgba(56,189,248,.14),0 16px 36px rgba(15,35,62,.12)}
.ai-theme-preview{display:block;flex:0 0 118px;width:100%;height:118px;border-radius:14px;overflow:hidden;position:relative;border:1px solid rgba(148,163,184,.25);background:#eef4fb}
.ai-theme-preview::before{content:"";position:absolute;inset:0;background-position:center;background-size:cover}
.ai-theme-preview::after{content:"";position:absolute;left:10px;right:10px;bottom:10px;height:46px;border-radius:9px;background:rgba(255,255,255,.88);box-shadow:0 6px 18px rgba(15,23,42,.13)}
.ai-theme-preview i{position:absolute;z-index:2;left:14px;top:13px;width:48%;height:9px;border-radius:999px;background:rgba(6,16,31,.90);box-shadow:0 16px 0 rgba(37,99,235,.65)}
.ai-theme-preview-light-clean::before{background:radial-gradient(circle at 20% 15%,#dceeff,transparent 35%),linear-gradient(135deg,#fff,#eef4fb)}
.ai-theme-preview-module-flow::before{background-image:url("https://alexinventur.de/assets/backgrounds/alex-module-flow.svg")}
.ai-theme-preview-ai-tech-dark::before{background:radial-gradient(circle at 20% 20%,rgba(24,174,230,.35),transparent 35%),linear-gradient(135deg,#06101f,#102a45)}
.ai-theme-preview-mountain-lake::before{background-image:url("https://alexinventur.de/assets/backgrounds/alex-mountain-lake-blur-0.webp")}
.ai-theme-preview-calm-coast::before{background-image:url("https://alexinventur.de/assets/backgrounds/alex-calm-coast-blur-0.webp")}
.ai-theme-choice-copy{display:block;min-width:0;padding:12px 4px 2px}.ai-theme-choice-copy b{display:block;overflow-wrap:anywhere}.ai-theme-choice-copy span{display:block;margin-top:5px;color:#64748b;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.ai-design-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:18px}
.ai-design-control{padding:16px;border:1px solid #dce5ef;border-radius:17px;background:rgba(255,255,255,.78)}
.ai-design-control-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.ai-design-control-head output{font-weight:900;color:#1769aa}.ai-design-control input[type="range"]{margin:0;padding:0}
.ai-design-note{margin-top:16px;padding:13px 15px;border-radius:14px;background:#edf7ff;border:1px solid #cce7f4;color:#34536d}

@media(max-width:1280px){
  .ai-theme-choice-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px){
  .ai-theme-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ai-design-intro{grid-template-columns:1fr}.ai-design-current{justify-self:start}
  .ai-design-controls{grid-template-columns:1fr}
}
@media(max-width:560px){
  .ai-theme-choice-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  body.ai306-unified.ai-theme .shell,body.ai306-unified.ai-theme .unified-shell{width:calc(100% - 20px)}
}
@media(prefers-reduced-transparency:reduce){
  body.ai306-unified.ai-theme :where(.card,.tile,.module-card,.hero-panel,.detail-hero,.tree,.list,.preview,.ai-module-shell,.ai-module-tree,.ai-module-main,.ai-module-preview,.page-head,.preview-box,.ticket-card,.object-card,.timeline-item){background:#fff;-webkit-backdrop-filter:none;backdrop-filter:none}
}
