/* Tema escuro do Portal do Cliente. Mesmas cores de marca: o dourado não muda, só o fundo e os textos.
   Ligado por <html data-theme="dark"> (lib/theme.js), só enquanto o cliente está no portal. */

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0b08;
  --surface: #17140f;
  --surface-2: #1d1913;
  --surface-3: #27211a;
  --line: #2e281f;
  --line-2: #40372a;
  --ink: #f6efe1;
  --text: #e4dac8;
  --muted: #b3a790;
  --faint: #877c69;
  --gold: #e0b24a;
  --gold-2: #e9c25e;
  --gold-3: #f4d98c;
  --gold-soft: rgba(224, 178, 74, .14);
  --gold-ink: #f0cd72;
  --ok: #5fcf8f; --ok-soft: rgba(95, 207, 143, .13);
  --warn: #f2b955; --warn-soft: rgba(242, 185, 85, .13);
  --bad: #ff8a7d; --bad-soft: rgba(255, 138, 125, .13);
  --info: #8db8f7; --info-soft: rgba(141, 184, 247, .13);
  --muted-soft: #2a241c;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .7);
  --shadow-3: 0 24px 60px -18px rgba(0, 0, 0, .8);
  --focus: 0 0 0 3px rgba(224, 178, 74, .4);
}

/* elementos "invertidos" (fundo escuro no tema claro) viram dourados no escuro */
[data-theme="dark"] :is(.btn-primary, .side-link.is-active, .tab[aria-selected="true"], .chip[aria-checked="true"], .pill.is-on span) {
  background: var(--grad-gold); border-color: transparent; color: #1a1206;
}
[data-theme="dark"] .btn-primary:hover:not(:disabled) { background: var(--grad-gold); filter: brightness(1.06); box-shadow: 0 10px 24px -12px rgba(224, 178, 74, .8); }
[data-theme="dark"] :is(.side-link.is-active, .tab[aria-selected="true"]) .ic { color: #1a1206; }
[data-theme="dark"] .tab[aria-selected="true"] .tab-count { background: rgba(26, 18, 6, .16); color: #1a1206; }
[data-theme="dark"] .check input:checked + .check-box { background: var(--grad-gold); border-color: var(--gold); color: #1a1206; }
[data-theme="dark"] .reg-radio.is-on .reg-dot { border-color: var(--gold); }
[data-theme="dark"] .avatar-dark, [data-theme="dark"] .photo-badge { background: #0a0806; color: var(--gold-2); border: 1px solid var(--line-2); }
[data-theme="dark"] .avatar { background: hsl(var(--h) 30% 22%); color: hsl(var(--h) 70% 82%); }
[data-theme="dark"] .avatar-img { background: var(--surface-3); }
[data-theme="dark"] .doc-price { background: #0a0806; border: 1px solid rgba(224, 178, 74, .35); }
[data-theme="dark"] .msg.is-mine .msg-bubble { background: #2a2216; border-color: rgba(224, 178, 74, .35); color: var(--ink); }
[data-theme="dark"] .msg.is-mine .msg-time { color: var(--faint); }
[data-theme="dark"] .msg.is-internal .msg-bubble { background: rgba(224, 178, 74, .08); }
[data-theme="dark"] .toast { background: #26201a; border: 1px solid var(--line-2); }
[data-theme="dark"] .secret, [data-theme="dark"] .v-tag { background: #0a0806; }
[data-theme="dark"] .agenda-mini li.is-mine .am-date { background: var(--grad-gold); color: #1a1206; }

/* superfícies que tinham cor clara fixa */
[data-theme="dark"] .topbar { background: rgba(13, 11, 8, .82); background: color-mix(in srgb, var(--bg) 84%, transparent); }
[data-theme="dark"] .bottom-nav { background: rgba(23, 20, 15, .95); }
[data-theme="dark"] .bottom-dot { box-shadow: 0 0 0 2px var(--surface); }
[data-theme="dark"] .sticky-actions { background: rgba(23, 20, 15, .92); }
[data-theme="dark"] .notif.is-unread, [data-theme="dark"] .tmsg.is-mine > div, [data-theme="dark"] .todo-item { background: rgba(224, 178, 74, .07); border-color: rgba(224, 178, 74, .28); }
[data-theme="dark"] .todo-item.is-bad { background: rgba(255, 138, 125, .07); border-color: rgba(255, 138, 125, .3); }
[data-theme="dark"] .table tr.is-clickable:hover td, [data-theme="dark"] .inbox .list-item.is-waiting { background: rgba(224, 178, 74, .05); }
[data-theme="dark"] :is(.pw-banner, .pix, .reg-prompt) { border-color: rgba(224, 178, 74, .3); }
[data-theme="dark"] .skeleton span { background: linear-gradient(90deg, var(--surface-3), #322a20, var(--surface-3)); background-size: 200% 100%; }
[data-theme="dark"] .input:hover { border-color: #5a4d3a; }
[data-theme="dark"] .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23b3a790' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); }
[data-theme="dark"] .modal-wrap, [data-theme="dark"] .scrim { background: rgba(0, 0, 0, .62); }
[data-theme="dark"] .pf-ig { background: rgba(232, 92, 160, .14); color: #f39cc6; }
[data-theme="dark"] .pf-li { background: rgba(80, 150, 230, .15); color: #9cc7f5; }
[data-theme="dark"] .side-brand img, [data-theme="dark"] .top-brand img { filter: drop-shadow(0 2px 8px rgba(224, 178, 74, .45)); }
[data-theme="dark"] .att button { background: rgba(255, 255, 255, .1); }
[data-theme="dark"] .chart-svg .tip text { fill: #1a1206; }
[data-theme="dark"] .chart-svg .tip rect { fill: var(--gold-2); }
[data-theme="dark"] ::selection { background: rgba(224, 178, 74, .45); color: #fff; }

/* botão de tema na barra superior */
.theme-btn .ic { transition: transform .3s var(--ease); }
.theme-btn:hover .ic { transform: rotate(-18deg); }
