/* Reference-led glass: translucent navy, a fine lit rim and corner reflections.
   Gradients are drawn in the surface itself so they never cover controls. */
html[data-theme] body{
  --glass-fill:rgba(12,24,62,.86);
  --glass-edge:rgba(197,211,255,.48);
  --glass-shadow:0 14px 32px rgba(6,15,42,.20),inset 0 1px 0 rgba(255,255,255,.35),inset 0 -1px 0 rgba(163,178,255,.13);
  --glass-sheen:radial-gradient(ellipse at 0 0,rgba(141,134,255,.34),transparent 42%),radial-gradient(ellipse at 100% 100%,rgba(124,151,255,.27),transparent 40%);
}
html[data-theme="light"] body{background:radial-gradient(ellipse at 0 0,#dae6ff,transparent 48%),radial-gradient(ellipse at 100% 45%,#e8e5ff,transparent 42%),#f2f6fc!important}
html[data-theme="dark"] body{
  --glass-fill:rgba(8,15,40,.83);
  --glass-edge:rgba(190,200,255,.42);
  --glass-shadow:0 16px 36px rgba(0,3,17,.38),inset 0 1px 0 rgba(255,255,255,.32),inset 0 -1px 0 rgba(151,164,255,.17);
  background:radial-gradient(ellipse at 0 0,rgba(41,62,156,.35),transparent 48%),radial-gradient(ellipse at 95% 60%,rgba(67,36,122,.19),transparent 46%),#070e22!important;
}
html[data-theme] body[data-authenticated="1"] main.main :is(.panel,.metric-card,.analytics-kpi,.mauzo-goal-card,.manage-group,.plan-card,.subscription-state,.workspace-overview){
  --text:#f1f5ff;--muted:#c1cde5;--label-ink:#d6e2fa;--heading-ink:#b8d7ff;
  --link:#b3d7ff;--surface:rgba(23,38,76,.94);--surface2:rgba(37,54,98,.9);--line:rgba(182,202,255,.22);
  color:var(--text)!important;
  background:var(--glass-sheen),var(--glass-fill)!important;
  background-size:100% 100%!important;
  border:1px solid var(--glass-edge)!important;
  border-radius:23px!important;
  box-shadow:var(--glass-shadow)!important;
  -webkit-backdrop-filter:blur(16px) saturate(120%);backdrop-filter:blur(16px) saturate(120%);
}
html[data-theme] body[data-authenticated="1"] main.main .dashboard-metrics .metric-featured{
  background:radial-gradient(ellipse at 0 0,rgba(112,172,255,.22),transparent 38%),radial-gradient(ellipse at 100% 100%,rgba(145,147,255,.44),transparent 45%),rgba(18,30,78,.91)!important;
  border-color:rgba(222,225,255,.68)!important;
  box-shadow:0 17px 38px rgba(12,18,55,.25),inset 1px 1px 0 rgba(255,255,255,.5),inset -1px -1px 0 rgba(173,185,255,.35)!important;
}
html[data-theme] body[data-authenticated="1"] main.main :is(.panel,.metric-card,.analytics-kpi,.mauzo-goal-card,.manage-group,.plan-card,.subscription-state,.workspace-overview) :is(p,small,label,td,th,.muted){color:var(--muted)}
html[data-theme] body[data-authenticated="1"] main.main :is(.metric-card,.analytics-kpi) > strong{color:#f5f8ff!important}
html[data-theme] body[data-authenticated="1"] main.main :is(.panel,.metric-card,.analytics-kpi,.mauzo-goal-card,.manage-group) :is(h2,h3,h4){color:var(--heading-ink)!important}
html[data-theme] body[data-authenticated="1"] main.main :is(.panel,.manage-group) a:not(.btn){color:#b6d8ff}
html[data-theme] body[data-authenticated="1"] main.main :is(.panel,.manage-group) :is(.product-tile,.attention-item,.manage-link){background:rgba(6,16,42,.32)!important;color:#edf3ff;border-color:rgba(184,203,255,.2)!important}
html[data-theme] body[data-authenticated="1"] main.main .manage-group h2{background:rgba(30,46,91,.52)!important}
html[data-theme] body[data-authenticated="1"] main.main :is(.panel,.metric-card,.analytics-kpi,.mauzo-goal-card) :is(.metric-icon,.analytics-kpi-icon,.mauzo-goal-icon){
  background:radial-gradient(ellipse at 0 0,rgba(166,161,255,.3),transparent 70%),rgba(117,148,224,.12)!important;
  box-shadow:inset 0 1px 0 #ffffff61,0 4px 12px #030b2226!important;border-radius:14px;
}
/* App chrome stays lighter in light mode, with a matching frosted rim. */
html[data-theme] body[data-authenticated="1"] :is(.sidebar,.topbar.app-header,.mobile-nav){
  background:radial-gradient(ellipse at top left,rgba(255,255,255,.7),transparent 75%),rgba(237,244,255,.84)!important;
  border:1px solid rgba(146,167,209,.55)!important;
  box-shadow:0 8px 26px rgba(20,43,88,.10),inset 0 1px 0 #fff!important;
  -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
}
html[data-theme="dark"] body[data-authenticated="1"] :is(.sidebar,.topbar.app-header,.mobile-nav){
  background:var(--glass-sheen),rgba(9,18,45,.91)!important;
  border-color:var(--glass-edge)!important;box-shadow:var(--glass-shadow)!important;
}
html[data-theme] body[data-authenticated="1"] :is(.side-nav a.active,.mobile-nav a.active:not(.mobile-sale)){
  background:linear-gradient(125deg,rgba(111,129,255,.22),rgba(117,182,255,.13))!important;
  box-shadow:inset 0 1px 0 rgba(192,207,255,.42);border-radius:12px;
}
/* Fields remain solid and easy to identify through the glass surface. */
html[data-theme] body[data-authenticated="1"] main.main :is(.panel,.mauzo-goal-card,.plan-card){
  --input-fill:#12264a;--input-ink:#f5f8ff;--input-hint:#c0d0e8;--input-edge:#829fc9;
}
html[data-theme="dark"] body[data-authenticated="1"] main.main :is(.panel,.mauzo-goal-card,.plan-card){
  --input-fill:#cfe3ff;--input-ink:#102d50;--input-hint:#405c7c;--input-edge:#9dbce6;
}
html[data-theme] body[data-authenticated="0"] .auth-card{
  background:linear-gradient(135deg,rgba(255,255,255,.94),rgba(235,241,255,.86))!important;
  border:1px solid rgba(160,181,222,.62)!important;border-radius:24px;
  box-shadow:0 18px 48px #10285c24,inset 0 1px 0 #fff!important;
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
}
html[data-theme="dark"] body[data-authenticated="0"] .auth-card{
  background:var(--glass-sheen),rgba(12,24,52,.94)!important;
  border-color:var(--glass-edge)!important;box-shadow:var(--glass-shadow)!important;
}
@media(hover:hover) and (pointer:fine){
  html[data-theme] body[data-authenticated="1"] main.main :is(.metric-card,.analytics-kpi,.plan-card):hover{border-color:rgba(232,235,255,.85)!important;box-shadow:0 18px 34px rgba(8,14,48,.27),inset 0 1px 0 rgba(255,255,255,.6)!important}
}
@media(max-width:900px){
  html[data-theme] body[data-authenticated="1"] main.main :is(.panel,.metric-card,.analytics-kpi,.mauzo-goal-card,.manage-group,.plan-card){border-radius:19px!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
}

/* Standalone theme-aware identity, without logo tiles or wrapper borders. */
.brand-logo-dark{display:none!important}
html[data-theme="dark"] .brand-logo-light{display:none!important}
html[data-theme="dark"] .brand-logo-dark{display:block!important}
html[data-theme] body :is(.brand-symbol,.auth-logo-wrap,.auth-brand-identity,.auth-mobile-identity){background:none!important;border:0!important;box-shadow:none!important;filter:none!important}
html[data-theme] body .brand-symbol{padding:0!important}
html[data-theme] body :is(.brand-mark-image,.auth-logo,.auth-mobile-identity img){object-fit:contain;border-radius:0!important;border:0!important;background:none!important;box-shadow:none!important;filter:none!important}
html[data-theme] body .auth-logo-wrap{width:72px!important;padding:0!important;flex:0 0 72px}
html[data-theme] body .auth-logo{width:72px!important;height:72px!important}
html[data-theme] body .auth-product-name{border:0!important;color:var(--heading-ink)!important}
html[data-theme] body :is(.auth-product-name,.auth-mobile-identity span){font-size:.95rem;letter-spacing:.035em;white-space:nowrap}
/* Neutral blue edges replace warm accents on holders and icon wells. */
html[data-theme] body{--icon-edge:#9ab5de;--icon-edge-active:#397add}
html[data-theme="dark"] body{--icon-edge:#526e9c;--icon-edge-active:#a3caff}
/* Light surfaces share the sidebar's translucent white / ice-blue treatment. */
html[data-theme="light"] body{
 --glass-fill:rgba(255,255,255,.76);--glass-edge:rgba(155,184,223,.45);
 --glass-sheen:radial-gradient(ellipse at 0 0,rgba(255,255,255,.94),transparent 62%),radial-gradient(ellipse at 100% 100%,rgba(194,219,255,.32),transparent 64%);
 --glass-shadow:0 8px 26px rgba(26,66,124,.08),inset 0 1px 0 rgba(255,255,255,.95);
}
html[data-theme="light"] body[data-authenticated="1"] main.main :is(.panel,.metric-card,.analytics-kpi,.mauzo-goal-card,.manage-group,.plan-card,.subscription-state,.workspace-overview){
 --text:#193758;--muted:#4a6583;--label-ink:#375a7e;--heading-ink:#20558e;--accent-ink:#176b61;
 --link:#155eb5;--surface:rgba(248,252,255,.94);--surface2:#e7f0fc;--soft-blue:#e2edfc;--line:#c2d5ed;
}
html[data-theme="light"] body[data-authenticated="1"] main.main .dashboard-metrics .metric-featured{background:var(--glass-sheen),rgba(232,243,255,.85)!important;border-color:#b6cdea!important;box-shadow:var(--glass-shadow)!important}
html[data-theme="light"] body[data-authenticated="1"] main.main :is(.metric-card,.analytics-kpi) strong{color:#174778!important}
html[data-theme="light"] body[data-authenticated="1"] main.main :is(.panel,.manage-group) a:not(.btn){color:var(--link)}
html[data-theme="light"] body[data-authenticated="1"] main.main :is(.panel,.manage-group) :is(.product-tile,.attention-item,.manage-link){background:rgba(233,242,255,.65)!important;color:#24476c;border-color:#c4d7f1!important}
html[data-theme="light"] body[data-authenticated="1"] main.main .manage-group h2{background:rgba(228,239,253,.6)!important}
html[data-theme="light"] body[data-authenticated="1"] main.main :is(h1,h2,h3,h4,p,span,strong,small,label,a,th,td,legend,summary){text-shadow:none!important}
html[data-theme="light"] body[data-authenticated="1"] main.main :is(.metric-icon,.analytics-kpi-icon,.mauzo-goal-icon){color:#2565ad!important}
html[data-theme="light"] body[data-authenticated="1"] main.main .sales-visibility{color:#245386!important;background:#ffffff99!important}
/* Homepage has one personal identity in its header; the category gets the rest of this row. */
html[data-theme] body[data-authenticated="1"] main.main[data-page="dashboard"]{--heading-ink:#24578d}
html[data-theme="dark"] body[data-authenticated="1"] main.main[data-page="dashboard"]{--heading-ink:#b8d7ff}
html[data-theme] main.main .dashboard-heading-identity{justify-content:flex-end;min-width:0;white-space:normal}
html[data-theme] main.main .dashboard-heading-category{max-width:none;flex:0 1 auto;overflow:visible;white-space:normal;text-overflow:clip;overflow-wrap:anywhere;text-align:right;line-height:1.45;color:var(--heading-ink);background:none;border:0;padding:0}
/* Auth sizing fixes grid intrinsic-width overflow instead of hiding content. */
html[data-theme] body[data-authenticated="0"]{--heading-ink:#20558e;--icon-edge:#aac2e3}
html[data-theme="dark"] body[data-authenticated="0"]{--heading-ink:#c6dfff}
html[data-theme] body[data-authenticated="0"] :is(.auth-shell,.auth-panel,.auth-panel-inner,.auth-card,.auth-card form,.auth-card label,.input-icon-field){min-width:0;box-sizing:border-box}
html[data-theme] body[data-authenticated="0"] .auth-shell{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
html[data-theme] body[data-authenticated="0"] .auth-panel-inner{width:100%;max-width:460px;background:transparent!important}
html[data-theme] body[data-authenticated="0"] .auth-card{width:100%;max-width:100%;padding:clamp(18px,2vw,28px)}
html[data-theme] body[data-authenticated="0"] .auth-card input{width:100%;min-width:0;box-sizing:border-box}
html[data-theme] body[data-authenticated="0"] .auth-card input[type="checkbox"]{width:16px;flex:0 0 16px}
html[data-theme] body[data-authenticated="0"] .auth-form-links{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
html[data-theme] body[data-authenticated="0"] .remember-device{min-width:0;flex:1 1 170px}
html[data-theme] body[data-authenticated="0"] :is(.auth-footer,.auth-preferences){flex-wrap:wrap}
html[data-theme] body[data-authenticated="0"] .auth-card :is(h1,h2,h3,.eyebrow){color:var(--heading-ink)!important;-webkit-text-fill-color:currentColor!important}
html[data-theme] body[data-authenticated="0"] :is(.auth-card,.auth-panel){border-color:#9db8da66!important}
@media(max-width:900px){
 html[data-theme] body[data-authenticated="0"] .auth-shell{display:block;padding:12px}
 html[data-theme] body[data-authenticated="0"] .auth-brand{display:none}
 html[data-theme] body[data-authenticated="0"] .auth-panel{padding:16px 12px;min-height:0}
 html[data-theme] body[data-authenticated="0"] .auth-card h2{font-size:clamp(1.5rem,6vw,1.9rem)}
 html[data-theme] body[data-authenticated="0"] .auth-mobile-identity{gap:12px;flex-wrap:wrap}
 html[data-theme] body[data-authenticated="0"] .auth-mobile-identity img{width:60px;height:60px}
 html[data-theme] body[data-authenticated="0"] .auth-mobile-visual>span{max-width:60%;font-size:.8rem}
}

html[data-theme] body[data-authenticated="0"] :is(.language-switch,.appearance-switch){background:rgba(232,241,254,.8)!important;color:#245386!important;border-color:#b4cceb!important}
html[data-theme="dark"] body[data-authenticated="0"] :is(.language-switch,.appearance-switch){background:#233c5b!important;color:#e9f4ff!important;border-color:#557498!important}
html[data-theme] body .auth-mobile-identity span{border:0!important;padding-left:0!important}
@media print, (forced-colors:active){
  html[data-theme] body[data-authenticated="1"] main.main .dashboard-metrics .metric-featured{background:Canvas!important;border-color:CanvasText!important;box-shadow:none!important}
  html[data-theme] body{background:Canvas!important}
  html[data-theme] body[data-authenticated="1"] main.main :is(.panel,.metric-card,.analytics-kpi,.mauzo-goal-card,.manage-group,.plan-card,.subscription-state,.workspace-overview){
    --text:CanvasText;--muted:CanvasText;--label-ink:CanvasText;--heading-ink:CanvasText;--link:LinkText;
    background:Canvas!important;color:CanvasText!important;border:1px solid CanvasText!important;box-shadow:none!important;backdrop-filter:none;-webkit-backdrop-filter:none;
  }
  html[data-theme] body[data-authenticated="1"] main.main :is(.panel,.metric-card,.analytics-kpi,.mauzo-goal-card,.manage-group) :is(h2,h3,h4,strong,p,small,td,th){color:CanvasText!important}
}

