/* Tema "Glassy Dashboard": vidro escuro e translúcido sobre um fundo desfocado.
   Carregado depois de styles.css: troca as variáveis e refaz as cores fixas de cada componente. */

:root {
  color-scheme: dark;
  --bg: #12100e;
  --surface: rgba(255, 255, 255, .065);
  --ink: #f2f4f8;
  --muted: rgba(228, 234, 245, .62);
  --line: rgba(255, 255, 255, .11);
  --brand: #ffffff;
  --brand-ink: #ffffff;
  --accent: #5b9bff;
  --ok: #4ade80;
  --ok-bg: rgba(74, 222, 128, .16);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, .16);
  --bad: #ff8a80;
  --bad-bg: rgba(255, 99, 88, .17);
  --info-bg: rgba(91, 155, 255, .18);
  --radius: 18px;
  --shadow: 0 10px 34px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .13);
  --glass-blur: blur(26px) saturate(150%);
  --glass-strong: rgba(26, 24, 24, .72);
  --hover: rgba(255, 255, 255, .09);
  --soft: rgba(255, 255, 255, .055);
  --series-1: #6aa6ff;
  --series-2: #ff9a6b;
  --viz-grid: rgba(255, 255, 255, .10);
  --viz-base: rgba(255, 255, 255, .28);
  --viz-muted: rgba(228, 234, 245, .62);
}

body {
  background: var(--bg); color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Fundo Liquid Glass: manchas de cor desfocadas que se movem devagar atrás do vidro (criado por theme.js).
   As cores, a intensidade e a velocidade vêm das Configurações (--lg1..3, --lg-opacity, --lg-dur). */
:root { --lg-base: #14110f; --lg1: #e3d3b8; --lg2: #7ba6ff; --lg3: #b97a4a; --lg-opacity: .7; --lg-dur: 40s; --strong: #fff; }
.liquid-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--lg-base); }
.liquid-bg i {
  position: absolute; width: 62vmax; height: 62vmax; border-radius: 50%; opacity: var(--lg-opacity);
  background: radial-gradient(circle at 50% 50%, var(--c), transparent 68%); filter: blur(34px); will-change: transform;
  animation: lg-drift var(--lg-dur) ease-in-out infinite alternate;
}
.liquid-bg i:nth-child(1) { --c: var(--lg1); left: -16vmax; top: -20vmax; }
.liquid-bg i:nth-child(2) { --c: var(--lg2); right: -20vmax; top: -10vmax; animation-delay: calc(var(--lg-dur) / -4); animation-direction: alternate-reverse; }
.liquid-bg i:nth-child(3) { --c: var(--lg3); left: 4vmax; bottom: -28vmax; animation-delay: calc(var(--lg-dur) / -2); }
.liquid-bg i:nth-child(4) { --c: var(--lg2); width: 46vmax; height: 46vmax; right: 6vmax; bottom: -22vmax; animation-delay: calc(var(--lg-dur) / -1.3); animation-direction: alternate-reverse; }
.liquid-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, .07), transparent 38%, rgba(255, 255, 255, .04) 72%, transparent); }
@keyframes lg-drift {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  50% { transform: translate3d(9vmax, 6vmax, 0) scale(1.16) rotate(25deg); }
  100% { transform: translate3d(-7vmax, 10vmax, 0) scale(.94) rotate(55deg); }
}
html[data-motion="off"] .liquid-bg i { animation: none; }
@media (prefers-reduced-motion: reduce) { .liquid-bg i { animation: none; } }
html[data-bg="simple"] .liquid-bg { display: none; }
html[data-bg="simple"] body { background: var(--bg); }
h1, h2, h3 { color: var(--ink); letter-spacing: -.01em; }
a { color: #8db8ff; }

/* Vidro */
.card, .modal, .sidebar, .seg, .gw, .viz-tip, .checklist, .qr-box {
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .13); border-radius: var(--radius); box-shadow: var(--shadow);
}

/* Menu lateral flutuante */
.shell { grid-template-columns: 250px 1fr; gap: 0; padding: 16px; }
.sidebar {
  height: calc(100vh - 32px); top: 16px; border-radius: 22px; padding: 18px 12px;
  background: linear-gradient(170deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .045));
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: var(--shadow);
}
.brand { color: #fff; font-size: 16px; }
.nav a { color: rgba(238, 242, 250, .78); border-radius: 12px; }
.nav a:hover { background: var(--hover); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .15); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
.sidebar .who { border-top-color: var(--line); color: var(--muted); }
.main { padding: 8px 18px 60px 22px; max-width: 1500px; }

/* Em janelas baixas o menu rola por dentro em vez de esticar a página */
.sidebar { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }

/* Cabeçalho do menu (nome + lupa), linha fina e título de grupo */
.brand-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.brand-row .brand { padding-right: 0; }
.brand-search {
  display: grid; place-items: center; width: 36px; height: 36px; margin-top: 2px; border-radius: 12px; flex: none;
  color: var(--ink); background: var(--soft); border: 1px solid var(--line);
}
.brand-search:hover, .brand-search.active { background: var(--hover); text-decoration: none; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-sep { border: 0; border-top: 1px solid var(--line); margin: 10px 8px 6px; width: calc(100% - 16px); }
/* "Serviços": ícone em vidro colorido, texto em degradê e um brilho que some para a direita. */
.nav-title { display: flex; align-items: center; gap: 9px; padding: 4px 10px 6px; }
.nav-title::after { content: ""; flex: 1; height: 1px; margin-left: 4px; background: linear-gradient(90deg, rgba(156, 194, 255, .55), transparent); }
.nav-title-ico {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; flex: none; color: #9cc2ff;
  background: linear-gradient(145deg, rgba(122, 172, 255, .32), rgba(255, 190, 140, .18)); border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 0 14px rgba(122, 172, 255, .3);
}
.nav-title-text {
  font-size: 14px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .45));
  background: linear-gradient(90deg, #8fc0ff 0%, #c9b6ff 50%, #ffb877 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="light"] .nav-title-ico { color: #2f6fdb; box-shadow: 0 0 12px rgba(47, 111, 219, .22); border-color: rgba(255, 255, 255, .9); }
html[data-theme="light"] .nav-title-text { background-image: linear-gradient(90deg, #2f6fdb, #d9531e); }
html[data-theme="light"] .nav-title::after { background: linear-gradient(90deg, rgba(47, 111, 219, .4), transparent); }

/* Botões */
.btn { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); color: var(--ink); border-radius: 12px; }
.btn:hover { background: rgba(255, 255, 255, .15); }
.btn.primary { background: linear-gradient(180deg, #6ea8ff, #3d7bf0); border-color: rgba(255, 255, 255, .25); color: #fff; box-shadow: 0 4px 14px rgba(61, 123, 240, .4); }
.btn.primary:hover { background: linear-gradient(180deg, #7fb2ff, #4a86f5); }
.btn.danger { color: var(--bad); border-color: rgba(255, 138, 128, .35); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.ghost { border-color: rgba(255, 255, 255, .22); }
.seg { background: var(--soft); border-color: var(--line); border-radius: 12px; }
.seg button { color: var(--muted); }
.seg button.on { background: rgba(255, 255, 255, .17); color: #fff; }

/* Selos */
.badge { background: var(--info-bg); color: #a9c8ff; }
.badge.ok { color: var(--ok); } .badge.bad { color: var(--bad); } .badge.warn { color: var(--warn); }
.badge.gray { background: rgba(255, 255, 255, .1); color: var(--muted); }

/* Formulários */
label { color: rgba(238, 242, 250, .85); }
input, select, textarea {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: var(--ink); border-radius: 12px;
}
input::placeholder, textarea::placeholder { color: rgba(228, 234, 245, .38); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(110, 168, 255, .55); border-color: #6ea8ff; background: rgba(255, 255, 255, .1); }
select option { background: #1d1b1b; color: var(--ink); }
input[type="date"], input[type="month"] { color-scheme: dark; }
fieldset { border-color: var(--line); }
legend { color: #fff; }
.checklist { background: var(--soft); border-color: var(--line); }
.error-box { border: 1px solid rgba(255, 138, 128, .3); }
.warn-box { color: #fde7b0; }
.ok-box { border: 1px solid rgba(74, 222, 128, .3); }

/* Tabelas */
th { color: var(--muted); }
th, td { border-bottom-color: var(--line); }
tbody tr:hover td { background: rgba(255, 255, 255, .035); }

/* Painel */
.stat { position: relative; padding: 16px 16px 14px; }
.stat .n { color: #fff; font-weight: 650; letter-spacing: -.02em; }
.stat-ico {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; margin-bottom: 12px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: #dbe7ff;
}
.stat.alert { background: linear-gradient(160deg, rgba(255, 99, 88, .24), rgba(255, 99, 88, .09)); border-color: rgba(255, 138, 128, .4); }
.stat.alert .n { color: #ffb4ac; }
.stat.alert .stat-ico { background: rgba(255, 99, 88, .25); color: #ffb4ac; }
.dl-row, .feed-row, .attn-row, .mini, .ag-up { background: var(--soft); border-radius: 12px; }
.dl-row:hover, .feed-row:hover, .attn-row:hover { background: var(--hover); }
.dl-group.bad .dl-row { background: rgba(255, 99, 88, .13); }
.mini.alert { background: var(--bad-bg); }
.mini-n, .success-line .n { color: #fff; }
.pcard { background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04)); border-left-color: rgba(255, 255, 255, .28); }
.pcard:hover { background: rgba(255, 255, 255, .12); box-shadow: var(--shadow); }
.pcard.alert { background: linear-gradient(160deg, rgba(255, 99, 88, .2), rgba(255, 99, 88, .07)); border-left-color: var(--bad); }
.pcard .num { color: #fff; }
.pcard .meta { color: rgba(228, 234, 245, .78); }
.pub-num { color: #fff; }
.pub-alert { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .35); }
.pub-text, .secret, .codes span, .file-chip, .chip { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.chip:hover { background: var(--hover); }
.chip-custom { background: var(--info-bg); border-color: rgba(110, 168, 255, .5); }
.choice { background: var(--soft); border-color: var(--line); }
.deadline-box { background: var(--info-bg); }
.sticky-head { background: transparent; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.timeline li::before { border-color: #1b1815; }
.detail-grid .k { color: var(--muted); }
.google-card { border-left-color: var(--series-1); }

/* Agenda */
.ag-grid { background: var(--line); border-color: var(--line); border-radius: 14px; }
.ag-head { background: rgba(255, 255, 255, .07); color: var(--muted); }
.ag-cell { background: rgba(20, 18, 17, .45); }
.ag-cell:hover { background: rgba(255, 255, 255, .09); }
.ag-cell.out { background: rgba(20, 18, 17, .25); color: rgba(228, 234, 245, .35); }
.ag-chip { color: var(--ink); background: rgba(91, 155, 255, .22); }
.ag-chip.t-audiencia { background: rgba(255, 138, 91, .22); }
.ag-chip.t-prazo { background: rgba(255, 99, 88, .24); border-left-color: #ff6b5e; }
.ag-chip.t-tarefa { background: rgba(255, 255, 255, .12); }
.ag-row { border-bottom-color: var(--line); }
.ag-up { border-bottom-color: var(--line); color: var(--ink); }

/* Gráficos */
.viz-legend { color: var(--ink); }
.viz-month.on .viz-hit, .viz-hit:focus { fill: rgba(255, 255, 255, .08); }
.viz-tip { background: var(--glass-strong); color: var(--ink); border-color: rgba(255, 255, 255, .18); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

/* Janelas */
.overlay { background: rgba(8, 7, 7, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal { background: var(--glass-strong); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .13); border-radius: 22px; }
.modal-head, .modal-foot { border-color: var(--line); }
.x { color: var(--muted); }
#toast { background: var(--glass-strong); border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
#toast.bad { background: rgba(160, 40, 32, .85); }

/* Login e QR (o código QR continua branco para ser lido) */
.login h1 { color: #fff; }
.qr-box { background: #fff; }
.logo-banner { border-radius: var(--radius) var(--radius) 0 0; }

/* Layout do painel: conteúdo + coluna de cartões flutuantes */
.glass-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.glass-main { min-width: 0; }
.glass-side { display: grid; gap: 14px; position: sticky; top: 16px; }
.gw {
  position: relative; border-radius: 22px; padding: 16px 16px 12px; color: var(--strong);
  background: linear-gradient(165deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .16); box-shadow: var(--shadow); overflow: hidden;
}
.gw-blue { background: linear-gradient(160deg, rgba(122, 172, 255, .75), rgba(70, 104, 205, .62) 55%, rgba(60, 80, 160, .55)); border-color: rgba(255, 255, 255, .3); }
.gw-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gw-title { font-weight: 600; font-size: 13.5px; opacity: .92; }
.gw-chip { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .2); }
.gw-big { font-size: 34px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; margin-top: 6px; }
.gw-cap { font-size: 12.5px; opacity: .72; margin-bottom: 4px; }
.gw-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gw-row .gw-big { font-size: 28px; }
.gw-plus {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none; color: inherit;
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .2);
}
.gw-plus:hover { background: rgba(255, 255, 255, .32); text-decoration: none; }
.gw-svg { width: 100%; height: auto; display: block; margin-top: 4px; }
.gw-bar { fill: currentColor; opacity: .5; }
.gw-bar.on { opacity: 1; }
.gw-axis { fill: currentColor; opacity: .6; font-size: 9.5px; }
.gw-line { stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.gw-dot { fill: currentColor; stroke: currentColor; stroke-opacity: .4; stroke-width: 4; }
.gw-blue { color: #fff; }

/* ---- Menu lateral colorido: ícone com cor própria em cada aba ---- */
.sidebar {
  background:
    radial-gradient(130% 34% at 0% 0%, rgba(122, 172, 255, .26), transparent 70%),
    radial-gradient(120% 30% at 100% 100%, rgba(255, 140, 90, .2), transparent 70%),
    linear-gradient(170deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .045));
}
.brand { background: linear-gradient(90deg, #ffffff, #bcd6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 6px 10px; }
.nav-ico {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; flex: none;
  color: rgb(var(--c)); background: rgba(var(--c), .17); border: 1px solid rgba(var(--c), .32);
  transition: background-color .15s, box-shadow .2s, color .15s;
}
.nav a:hover .nav-ico { background: rgba(var(--c), .3); box-shadow: 0 0 12px rgba(var(--c), .35); }
.nav a.active { background: linear-gradient(90deg, rgba(var(--c), .24), rgba(255, 255, 255, .06)); }
.nav a.active .nav-ico { background: rgb(var(--c)); color: #0c1220; border-color: rgba(255, 255, 255, .5); box-shadow: 0 0 16px rgba(var(--c), .55); }
.nv-home { --c: 96, 165, 250; }      /* Dashboard: azul */
.nv-users { --c: 167, 139, 250; }    /* Advogados: violeta */
.nv-calendar { --c: 251, 146, 60; }  /* Agenda: laranja */
.nv-user { --c: 45, 212, 191; }      /* Clientes: turquesa */
.nv-wallet { --c: 74, 222, 128; }    /* Financeiro: verde */
.nv-check { --c: 250, 204, 21; }     /* Tarefas: amarelo */
.nv-file { --c: 244, 114, 182; }     /* Modelos: rosa */
.nv-coins { --c: 163, 230, 53; }     /* Honorários: lima */
.nv-folderplus { --c: 56, 189, 248; }/* Cadastro de processo: céu */
.nv-upload { --c: 251, 113, 133; }   /* Importar: rosado */
.nv-news { --c: 129, 140, 248; }     /* Publicações: índigo */
.nv-gear { --c: 148, 163, 184; }     /* Configurações: cinza-azulado */
html[data-theme="light"] .sidebar {
  background:
    radial-gradient(130% 34% at 0% 0%, rgba(122, 172, 255, .3), transparent 70%),
    radial-gradient(120% 30% at 100% 100%, rgba(255, 150, 100, .22), transparent 70%),
    linear-gradient(170deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .42));
}
html[data-theme="light"] .brand { background-image: linear-gradient(90deg, #16202e, #2f6fdb); }
html[data-theme="light"] .nav-ico svg { filter: brightness(.62) saturate(1.4); }
html[data-theme="light"] .nav a.active .nav-ico { color: #fff; }
html[data-theme="light"] .nav a.active .nav-ico svg { filter: none; }

/* ---- Financeiro: verde para o que entra, vermelho para o que sai ---- */
:root { --fin-rec: #4ade80; --fin-des: #f87171; --pos: #86efac; --neg: #fca5a5; }
html[data-theme="light"] { --fin-rec: #16a34a; --fin-des: #dc2626; --pos: #15803d; --neg: #b91c1c; }
.tone-rec { --tone: 74, 222, 128; --tone-ink: #86efac; }     /* receitas: verde */
.tone-des { --tone: 248, 113, 113; --tone-ink: #fca5a5; }    /* despesas: vermelho */
.tone-saldo { --tone: 96, 165, 250; --tone-ink: #93c5fd; }   /* saldo: azul */
.tone-rec2 { --tone: 45, 212, 191; --tone-ink: #5eead4; }    /* a receber: turquesa */
.tone-des2 { --tone: 251, 146, 60; --tone-ink: #fdba74; }    /* a pagar: laranja */
html[data-theme="light"] .tone-rec { --tone-ink: #15803d; }
html[data-theme="light"] .tone-des { --tone-ink: #b91c1c; }
html[data-theme="light"] .tone-saldo { --tone-ink: #1d4ed8; }
html[data-theme="light"] .tone-rec2 { --tone-ink: #0f766e; }
html[data-theme="light"] .tone-des2 { --tone-ink: #c2410c; }
.stat[class*="tone-"] { background: linear-gradient(160deg, rgba(var(--tone), .28), rgba(var(--tone), .06)); border-color: rgba(var(--tone), .45); }
.stat[class*="tone-"] .n { color: var(--tone-ink); }
.stat[class*="tone-"] .n.pos { color: var(--pos); }
.stat[class*="tone-"] .n.neg { color: var(--neg); }
.stat[class*="tone-"] .stat-ico { background: rgba(var(--tone), .24); border-color: rgba(var(--tone), .5); color: var(--tone-ink); }
.mini[class*="tone-"] { background: linear-gradient(160deg, rgba(var(--tone), .2), rgba(var(--tone), .05)); border: 1px solid rgba(var(--tone), .35); }
.mini[class*="tone-"] .mini-n { color: var(--tone-ink); }
.mini.alert { background: linear-gradient(160deg, rgba(248, 113, 113, .3), rgba(248, 113, 113, .08)); border-color: rgba(248, 113, 113, .55); }
.gw[class*="tone-"] { background: linear-gradient(165deg, rgba(var(--tone), .34), rgba(var(--tone), .08)); border-color: rgba(var(--tone), .5); }
.gw[class*="tone-"] .gw-big { color: var(--tone-ink); }
/* Tema claro: as regras gerais do claro são mais específicas, então os tons repetem aqui. */
html[data-theme="light"] .stat[class*="tone-"] { background: linear-gradient(160deg, rgba(var(--tone), .3), rgba(var(--tone), .08)); border-color: rgba(var(--tone), .55); }
html[data-theme="light"] .stat[class*="tone-"] .n { color: var(--tone-ink); }
html[data-theme="light"] .stat[class*="tone-"] .n.pos { color: var(--pos); }
html[data-theme="light"] .stat[class*="tone-"] .n.neg { color: var(--neg); }
html[data-theme="light"] .stat[class*="tone-"] .stat-ico { background: rgba(var(--tone), .22); border-color: rgba(var(--tone), .5); color: var(--tone-ink); }
html[data-theme="light"] .mini[class*="tone-"] .mini-n { color: var(--tone-ink); }
html[data-theme="light"] .gw[class*="tone-"] { background: linear-gradient(165deg, rgba(var(--tone), .34), rgba(var(--tone), .1)); border-color: rgba(var(--tone), .55); }
html[data-theme="light"] .gw[class*="tone-"] .gw-big { color: var(--tone-ink); }
.swatch.rec, .cat-bar.rec, .viz-bar.rec { background: var(--fin-rec); fill: var(--fin-rec); }
.swatch.des, .cat-bar.des, .viz-bar.des { background: var(--fin-des); fill: var(--fin-des); }
.viz-bar.rec, .viz-bar.des { background: none; }
.amt-rec { color: var(--fin-rec); font-weight: 600; }
.amt-des { color: var(--fin-des); font-weight: 600; }
.btn.fin-add { color: #fff; border-color: rgba(255, 255, 255, .3); }
.btn.fin-add.rec { background: linear-gradient(180deg, #4ade80, #16a34a); box-shadow: 0 4px 14px rgba(34, 197, 94, .38); }
.btn.fin-add.rec:hover { background: linear-gradient(180deg, #6ee79a, #1fb455); }
.btn.fin-add.des { background: linear-gradient(180deg, #f87171, #dc2626); box-shadow: 0 4px 14px rgba(239, 68, 68, .38); }
.btn.fin-add.des:hover { background: linear-gradient(180deg, #fb8a8a, #e63b3b); }
html[data-theme="light"] .btn.fin-add { color: #fff; }

/* Configurações: cartões compactos, em duas colunas (o "Fundo" ocupa a largura toda) */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; align-items: start; }
.set-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.settings-grid .svc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-grid .svc-row { padding: 5px 8px; gap: 7px; font-size: 12.5px; }
.settings-grid .svc-row .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-grid .profile-head { gap: 10px; }
.settings-grid .page-head { margin-bottom: 8px; }
.settings-grid > .wide, .settings-grid > .full { grid-column: 1 / -1; }
html body .settings-grid .card { padding: 12px 14px; border-radius: 18px; gap: 8px; }
.settings-grid h2 { font-size: 15px; }
.settings-grid h3 { font-size: 13.5px; }
.settings-grid .muted.small { font-size: 12px; }
.settings-grid .style-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.settings-grid .style-card { padding: 8px; border-radius: 14px; gap: 6px; }
.settings-grid .style-thumb { height: 64px; border-radius: 10px; }
.settings-grid .style-name { font-size: 13px; flex-wrap: wrap; row-gap: 3px; }
.settings-grid .style-name .badge { white-space: nowrap; font-size: 10.5px; padding: 1px 7px; }
.settings-grid .style-card .muted { display: none; }
.settings-grid .svc-list { gap: 5px; }
.settings-grid .svc-row { border-radius: 11px; }
.settings-grid .svc-row .nav-ico { width: 24px; height: 24px; border-radius: 8px; }
.settings-grid .svc-row input[type="checkbox"] { width: 17px; height: 17px; }
.settings-grid .avatar { width: 36px; height: 36px; font-size: 16px; }
.settings-grid .seg button { padding: 6px 12px; font-size: 13px; }
.settings-grid .preset { padding: 5px 11px 5px 8px; font-size: 13px; }
.settings-grid .color-field input[type="color"] { width: 38px; height: 28px; }
.settings-grid .btn { padding: 7px 14px; font-size: 13px; }

/* Foto do cliente */
.cl-name { display: flex; align-items: center; gap: 10px; }
.cl-avatar { display: block; flex: none; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.cl-avatar.s34 { width: 34px; height: 34px; }
.cl-avatar.ph { display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; background: linear-gradient(140deg, #6ea8ff, #a78bfa 60%, #fb923c); }
.photo-box { display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); }
.photo-view { flex: none; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--hover); border: 2px dashed var(--line); transition: border-color .15s, transform .15s; }
.photo-view.drag { border-color: var(--accent); transform: scale(1.04); }
.photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-empty { color: var(--muted); display: grid; place-items: center; }
.photo-actions { display: grid; gap: 8px; min-width: 0; }

/* Agenda com vida: cada tipo de compromisso tem a sua cor (--tc) */
.t-audiencia { --tc: 251, 146, 60; }   /* laranja */
.t-reuniao, .t-outro { --tc: 96, 165, 250; } /* azul */
.t-atendimento { --tc: 45, 212, 191; } /* turquesa */
.t-diligencia { --tc: 167, 139, 250; } /* violeta */
.t-prazo { --tc: 248, 113, 113; }      /* vermelho */
.t-tarefa { --tc: 148, 163, 184; }     /* cinza-azulado */
html body .ag-chip[class*="t-"] { background: rgba(var(--tc), .26); border-left-color: rgb(var(--tc)); font-weight: 500; }
html body .ag-chip[class*="t-"]:hover { background: rgba(var(--tc), .42); }
html body .ag-dot[class*="t-"] { background: rgb(var(--tc)); box-shadow: 0 0 8px rgba(var(--tc), .55); }
.ag-legend { gap: 8px 16px; }

/* Resumo do topo */
.ag-kpis { display: grid; grid-template-columns: minmax(260px, 2.2fr) repeat(4, minmax(120px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ag-kpis .stat { padding: 12px 14px; align-content: start; }
.ag-kpis .stat .n { font-size: 26px; }
.ag-kpis .stat .stat-ico { margin-bottom: 8px; width: 30px; height: 30px; }
html body .ag-kpis .ag-next {
  display: grid; gap: 6px; align-content: start; padding: 14px 16px; border: 1px solid rgba(var(--tc), .6);
  background: linear-gradient(150deg, rgba(var(--tc), .5), rgba(var(--tc), .12) 70%); box-shadow: 0 10px 28px rgba(var(--tc), .22), var(--shadow);
}
.ag-next-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ag-next-tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.ag-next-rel { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(var(--tc), .35); }
.ag-next-title { font-size: 19px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
.ag-next-meta { font-size: 12.5px; opacity: .8; }
.ag-next .btn { justify-self: start; margin-top: 2px; }
@media (max-width: 1250px) { .ag-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ag-kpis .ag-next { grid-column: 1 / -1; } }

/* Mês, semana, dia: dia atual em destaque e fins de semana mais suaves */
html body .ag-cell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.ag-cell.wknd:not(.out) { background-image: linear-gradient(rgba(255, 255, 255, .035), rgba(255, 255, 255, .035)); }
.ag-cell { transition: background-color .15s; }
.ag-wcol.wknd { opacity: .88; }
.ag-wcol.today { box-shadow: 0 0 0 1px var(--accent) inset, 0 8px 22px rgba(0, 0, 0, .18); }
.ag-whead { position: relative; }
.ag-wcount { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); }
html body .ag-drow[class*="t-"] { border-left: 4px solid rgb(var(--tc)); background: linear-gradient(90deg, rgba(var(--tc), .14), var(--soft) 45%); }
.ag-drow.past { opacity: .5; }
.ag-drow.next { box-shadow: 0 6px 20px rgba(var(--tc), .25); border-color: rgba(var(--tc), .7); }
.ag-nextbadge { margin-left: 8px; vertical-align: middle; }
.ag-rel { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ag-empty { justify-items: center; text-align: center; padding: 34px 8px; }
.ag-empty-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: var(--accent); background: var(--info-bg); }

/* Ano: os dias ficam mais intensos conforme a quantidade de compromissos */
.ag-mini-d.has.h1 { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--ink); font-weight: 700; }
.ag-mini-d.has.h2 { background: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--ink); font-weight: 700; }
.ag-mini-d.has.h3 { background: var(--accent); color: #fff; font-weight: 700; }
html body .ag-mini-d.today { box-shadow: 0 0 0 2px var(--accent); background: transparent; color: var(--accent); }
html body .ag-mini-d.today.has { background: var(--accent); color: #fff; }

/* Agenda: visualizações Hoje, Semana e Ano (o Mês usa .ag-grid) */
.ag-empty { display: grid; justify-items: start; gap: 10px; padding: 18px 4px; }
.ag-dayview { display: grid; gap: 8px; }
.ag-drow { display: grid; grid-template-columns: 96px 12px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.ag-dtime { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.ag-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ag-wcol { display: grid; gap: 6px; align-content: start; min-height: 230px; padding: 8px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); cursor: pointer; }
.ag-wcol:hover { background: var(--hover); }
.ag-wcol.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.ag-whead { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.ag-whead b { display: block; font-size: 20px; color: var(--ink); line-height: 1.2; }
.ag-wcol.today .ag-whead b { color: var(--accent); }
.ag-wcol .ag-chip { white-space: normal; text-overflow: clip; padding: 5px 7px; font-size: 12px; line-height: 1.3; }
.ag-wempty { text-align: center; padding-top: 8px; opacity: .6; }
.ag-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.ag-mini { display: grid; gap: 6px; padding: 10px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); align-content: start; }
.ag-mini-title { justify-self: start; border: 0; background: none; padding: 0; font-weight: 700; font-size: 14px; color: var(--ink); cursor: pointer; }
.ag-mini-title:hover { color: var(--accent); }
.ag-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.ag-mini-h { font-size: 10px; color: var(--muted); font-weight: 600; }
.ag-mini-d { aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 11px; cursor: pointer; }
.ag-mini-d:hover { background: var(--hover); }
.ag-mini-d.has { background: var(--info-bg); color: var(--accent); font-weight: 700; }
.ag-mini-d.today { background: var(--accent); color: #fff; font-weight: 700; }
@media (max-width: 900px) {
  .ag-week { grid-template-columns: 1fr; }
  .ag-wcol { min-height: 0; grid-template-columns: 64px 1fr; align-items: start; }
  .ag-drow { grid-template-columns: 1fr; gap: 6px; }
}

/* Configurações: cartão único "Aparência" */
.simple-card .set-row { min-height: 36px; }
.simple-card .set-row > span:first-child { min-width: 110px; }
.simple-card .sub-rows { gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.simple-card .set-foot { display: flex; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--line); }

/* Configurações: card "Fundo" compacto (prévia ao vivo, combinações em bolinhas, interruptor) */
.bg-preview { position: relative; height: 58px; border-radius: 12px; overflow: hidden; background: var(--lg-base); border: 1px solid var(--line); }
.bg-preview i { position: absolute; display: block; border-radius: 50%; filter: blur(14px); opacity: var(--lg-opacity); }
.bg-preview i:nth-child(1) { left: -8%; top: -30%; width: 50%; height: 120%; background: var(--lg1); }
.bg-preview i:nth-child(2) { right: -6%; top: -20%; width: 46%; height: 120%; background: var(--lg2); }
.bg-preview i:nth-child(3) { left: 30%; bottom: -50%; width: 40%; height: 90%; background: var(--lg3); }
.bg-preview b { position: absolute; left: 50%; top: 50%; width: 44%; height: 52%; transform: translate(-50%, -50%); border-radius: 10px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 500; }
.preset-row, .color-dots { display: flex; gap: 8px; }
.preset-chip { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); cursor: pointer; box-shadow: 0 1px 5px rgba(0, 0, 0, .3); transition: transform .15s; }
.preset-chip:hover { transform: scale(1.12); }
.preset-chip.on { outline: 2px solid var(--accent); outline-offset: 2px; }
html body .settings-grid input.color-dot { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid var(--line); background: none; cursor: pointer; overflow: hidden; }
.settings-grid input.color-dot::-webkit-color-swatch-wrapper { padding: 0; }
.settings-grid input.color-dot::-webkit-color-swatch { border: 0; border-radius: 50%; }
.settings-grid .range-field { gap: 3px; font-size: 12.5px; font-weight: 500; }
.settings-grid .range-field input[type="range"] { height: 16px; }
.switch-field { display: flex; align-items: center; gap: 9px; font-weight: 500; }
html body .settings-grid input.switch {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 36px; height: 20px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(128, 128, 140, .4); cursor: pointer; transition: background-color .2s;
}
.settings-grid input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .2s; }
html body .settings-grid input.switch:checked { background: var(--accent); }
.settings-grid input.switch:checked::after { transform: translateX(16px); }

/* Configurações: escolha do tipo de aparência (cartões com miniatura) */
.style-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.style-card { display: grid; gap: 10px; text-align: left; padding: 12px; border-radius: 20px; background: var(--soft); border: 2px solid transparent; color: var(--ink); cursor: pointer; }
.style-card:hover { background: var(--hover); }
.style-card.on { border-color: var(--accent); }
.style-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.style-thumb { position: relative; display: block; height: 116px; border-radius: 14px; overflow: hidden; }
.style-thumb i { position: absolute; display: block; }
.thumb-glass { background: linear-gradient(135deg, #2c2520, #14110f); }
.thumb-glass i:nth-child(1) { left: -12%; top: -30%; width: 62%; height: 90%; border-radius: 50%; background: radial-gradient(circle, rgba(227, 211, 184, .9), transparent 70%); }
.thumb-glass i:nth-child(2) { right: -10%; top: -10%; width: 55%; height: 85%; border-radius: 50%; background: radial-gradient(circle, rgba(123, 166, 255, .85), transparent 70%); }
.thumb-glass i:nth-child(3) { left: 14%; bottom: 14%; width: 72%; height: 44%; border-radius: 12px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); }
.thumb-v14 { background: #e3e3e5; }
.thumb-v14 i:nth-child(1) { left: 8%; top: 10%; width: 84%; height: 17%; border-radius: 999px; background: #f2f2f3; box-shadow: inset 28px 0 0 -8px #17171a; }
.thumb-v14 i:nth-child(2) { left: 8%; bottom: 10%; width: 42%; height: 52%; border-radius: 12px; background: linear-gradient(150deg, #f6724a, #d2461b); }
.thumb-v14 i:nth-child(3) { right: 8%; bottom: 10%; width: 42%; height: 52%; border-radius: 12px; background: #f2f2f3; }

/* Configurações: perfil e caixas de seleção do menu */
.profile-head { display: flex; align-items: center; gap: 14px; }
.avatar {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-size: 20px; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, #6ea8ff, #a78bfa 60%, #fb923c); box-shadow: 0 4px 16px rgba(110, 168, 255, .35);
}
.svc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px; }
.svc-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; cursor: pointer; font-weight: 500; font-size: 14.5px;
  background: var(--soft); border: 1px solid var(--line); color: var(--ink);
}
.svc-row:hover { background: var(--hover); }
.svc-row input[type="checkbox"] { width: 20px; height: 20px; flex: none; padding: 0; cursor: pointer; accent-color: rgb(var(--c)); }
.svc-row:has(input:not(:checked)) { opacity: .6; }
.svc-row:has(input:not(:checked)) .nav-ico { filter: grayscale(.9); }

/* Configurações */
.color-row { display: flex; gap: 14px; flex-wrap: wrap; }
.color-field { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.color-field input[type="color"] { width: 46px; height: 34px; padding: 2px; cursor: pointer; border-radius: 10px; }
.range-field { display: grid; gap: 6px; }
.range-field output { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.range-field input[type="range"] { padding: 0; accent-color: var(--accent); background: transparent; border: 0; }
.presets { display: flex; gap: 10px; flex-wrap: wrap; }
.preset { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--ink); }
.preset:hover { background: var(--hover); }
.preset.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91, 155, 255, .35); }
.dots { display: inline-flex; }
.dot { width: 14px; height: 14px; border-radius: 50%; margin-left: -4px; border: 1px solid rgba(255, 255, 255, .5); }
.dots .dot:first-child { margin-left: 0; }

/* Tema claro: mesmas peças, tinta escura sobre vidro claro. */
html[data-theme="light"] {
  color-scheme: light;
  --lg-base: #eef1f6; --strong: #0f1a2b;
  --bg: #e9edf3; --surface: rgba(255, 255, 255, .55); --ink: #16202e; --muted: rgba(26, 38, 58, .62);
  --line: rgba(20, 32, 52, .12); --brand: #16202e; --brand-ink: #16202e; --accent: #2f6fdb;
  --ok: #15803d; --ok-bg: rgba(22, 163, 74, .15); --warn: #a16207; --warn-bg: rgba(234, 179, 8, .2);
  --bad: #c0392b; --bad-bg: rgba(220, 70, 55, .14); --info-bg: rgba(47, 111, 219, .13);
  --shadow: 0 10px 30px rgba(40, 60, 100, .16), inset 0 1px 0 rgba(255, 255, 255, .85);
  --glass-strong: rgba(250, 251, 254, .86); --hover: rgba(20, 32, 52, .07); --soft: rgba(20, 32, 52, .045);
  --series-1: #2a78d6; --series-2: #eb6834; --viz-grid: rgba(20, 32, 52, .10); --viz-base: rgba(20, 32, 52, .3); --viz-muted: rgba(26, 38, 58, .62);
}
html[data-theme="light"] a { color: #2457b8; }
html[data-theme="light"] .card { background: linear-gradient(160deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .42)); border-color: rgba(255, 255, 255, .85); }
html[data-theme="light"] .sidebar { background: linear-gradient(170deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .42)); border-color: rgba(255, 255, 255, .85); }
html[data-theme="light"] .brand, html[data-theme="light"] .stat .n, html[data-theme="light"] .mini-n,
html[data-theme="light"] .success-line .n, html[data-theme="light"] .pcard .num, html[data-theme="light"] .pub-num,
html[data-theme="light"] .login h1, html[data-theme="light"] legend { color: var(--strong); }
html[data-theme="light"] .nav a { color: rgba(22, 32, 46, .75); }
html[data-theme="light"] .nav a:hover { color: var(--strong); }
html[data-theme="light"] .nav a.active { background: rgba(255, 255, 255, .85); color: var(--strong); box-shadow: 0 2px 10px rgba(40, 60, 100, .12); }
html[data-theme="light"] .btn { background: rgba(255, 255, 255, .7); border-color: rgba(20, 32, 52, .14); }
html[data-theme="light"] .btn:hover { background: rgba(255, 255, 255, .95); }
html[data-theme="light"] .btn.primary { background: linear-gradient(180deg, #5b95f5, #2f6fdb); color: #fff; border-color: rgba(255, 255, 255, .5); }
html[data-theme="light"] .btn.primary:hover { background: linear-gradient(180deg, #6ba2ff, #3a7be8); }
html[data-theme="light"] .btn.danger { color: var(--bad); border-color: rgba(192, 57, 43, .35); }
html[data-theme="light"] .btn.danger:hover { background: var(--bad-bg); }
html[data-theme="light"] .btn.ghost { color: var(--ink); border-color: rgba(20, 32, 52, .2); }
html[data-theme="light"] .seg button.on { background: #fff; color: var(--strong); box-shadow: 0 1px 6px rgba(40, 60, 100, .15); }
html[data-theme="light"] label { color: rgba(22, 32, 46, .85); }
html[data-theme="light"] input, html[data-theme="light"] select, html[data-theme="light"] textarea { background: rgba(255, 255, 255, .75); border-color: rgba(20, 32, 52, .18); color: var(--ink); }
html[data-theme="light"] input:focus, html[data-theme="light"] select:focus, html[data-theme="light"] textarea:focus { background: #fff; }
html[data-theme="light"] input::placeholder, html[data-theme="light"] textarea::placeholder { color: rgba(26, 38, 58, .4); }
html[data-theme="light"] select option { background: #fff; color: var(--ink); }
html[data-theme="light"] input[type="date"], html[data-theme="light"] input[type="month"] { color-scheme: light; }
html[data-theme="light"] .badge { color: #2457b8; }
html[data-theme="light"] .badge.gray { background: rgba(20, 32, 52, .08); }
html[data-theme="light"] .stat-ico { background: rgba(255, 255, 255, .7); border-color: rgba(20, 32, 52, .1); color: #2f5fb5; }
html[data-theme="light"] .stat.alert { background: linear-gradient(160deg, rgba(255, 120, 105, .3), rgba(255, 120, 105, .12)); }
html[data-theme="light"] .stat.alert .n { color: #a8281c; }
html[data-theme="light"] .stat.alert .stat-ico { color: #a8281c; background: rgba(255, 255, 255, .6); }
html[data-theme="light"] .pcard { background: linear-gradient(160deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .42)); border-left-color: rgba(20, 32, 52, .25); }
html[data-theme="light"] .pcard:hover { background: rgba(255, 255, 255, .9); }
html[data-theme="light"] .pcard .meta { color: rgba(22, 32, 46, .78); }
html[data-theme="light"] .warn-box { color: #6b4300; }
html[data-theme="light"] .ag-cell { background: rgba(255, 255, 255, .55); }
html[data-theme="light"] .ag-cell:hover { background: rgba(255, 255, 255, .85); }
html[data-theme="light"] .ag-cell.out { background: rgba(255, 255, 255, .3); color: rgba(26, 38, 58, .4); }
html[data-theme="light"] .ag-head { background: rgba(255, 255, 255, .6); }
html[data-theme="light"] .timeline li::before { border-color: #eef1f6; }
html[data-theme="light"] .overlay { background: rgba(230, 235, 245, .5); }
html[data-theme="light"] .modal { border-color: rgba(255, 255, 255, .9); box-shadow: 0 30px 80px rgba(40, 60, 100, .3), inset 0 1px 0 #fff; }
html[data-theme="light"] #toast { color: var(--ink); border-color: rgba(20, 32, 52, .15); }
html[data-theme="light"] #toast.bad { background: rgba(200, 60, 48, .92); color: #fff; }
html[data-theme="light"] .gw { background: linear-gradient(165deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .45)); border-color: rgba(255, 255, 255, .9); }
html[data-theme="light"] .gw-blue { background: linear-gradient(160deg, rgba(122, 172, 255, .9), rgba(70, 104, 205, .85) 55%, rgba(60, 80, 160, .8)); border-color: rgba(255, 255, 255, .6); }
html[data-theme="light"] .gw-chip { background: rgba(20, 32, 52, .08); }
html[data-theme="light"] .gw-blue .gw-chip { background: rgba(255, 255, 255, .25); }
html[data-theme="light"] .gw-plus { border-color: rgba(20, 32, 52, .15); background: rgba(255, 255, 255, .7); color: inherit; }
html[data-theme="light"] .gw-blue .gw-plus { color: #fff; }
html[data-theme="light"] .liquid-bg::after { background: linear-gradient(120deg, rgba(255, 255, 255, .5), transparent 40%, rgba(255, 255, 255, .25) 75%, transparent); }
html[data-theme="light"] .dot { border-color: rgba(20, 32, 52, .25); }

@media (max-width: 1250px) {
  .glass-layout { grid-template-columns: 1fr; }
  .glass-side { position: static; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); order: -1; }
}
@media (max-width: 1000px) {
  .shell { padding: 10px; }
  .sidebar { height: auto; border-radius: 18px; }
  .main { padding: 14px 4px 60px; }
}
@media (prefers-reduced-motion: no-preference) {
  .card, .gw, .btn { transition: background-color .15s, box-shadow .2s, transform .2s; }
  .stat:hover, .gw:hover { transform: translateY(-3px); }
}
/* Sem suporte a desfoque: vidro mais opaco para manter a leitura. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .sidebar, .gw { background: rgba(38, 34, 32, .92); }
  .modal { background: rgba(30, 27, 26, .98); }
}
/* Impressão de documentos: volta ao branco. */
@media print {
  body.printing { background: #fff; color: #000; }
  body.printing .liquid-bg { display: none; }
}
