/* Vitallis — design system (iOS/macOS, claro e escuro).
   Base compartilhada por: página do Sistema, Login, Cadastro, Portfólio e Portal.
   Tema: html[data-theme="light"|"dark"]; sem atributo segue o aparelho. */

:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #f5f5f7;
  --bg-2: #ffffff;
  --bg-grouped: #f2f2f7;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.08);
  --fill-3: rgba(118, 118, 128, 0.16);
  --text: #1d1d1f;
  --text-2: rgba(60, 60, 67, 0.72);
  --text-3: rgba(60, 60, 67, 0.46);
  --separator: rgba(60, 60, 67, 0.16);
  --hairline: rgba(0, 0, 0, 0.08);
  --highlight: rgba(255, 255, 255, 0.85);

  --accent: #1f7fa8;
  --accent-2: #2fa39a;
  --accent-3: #4cc38a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(31, 127, 168, 0.12);
  --blue: #007aff;
  --green: #34c759;
  --orange: #ff9500;
  --red: #ff3b30;
  --purple: #af52de;
  --gradient: linear-gradient(135deg, #2c6cb8 0%, #3b98d3 38%, #33a596 72%, #86cfa8 100%);
  --gradient-text: linear-gradient(120deg, #1f4f94 0%, #2c7fc0 40%, #2a9a8e 80%, #3aa98a 100%);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.07);
  --shadow-3: 0 10px 30px rgba(0, 0, 0, 0.1), 0 30px 80px rgba(0, 0, 0, 0.12);
  --glass-blur: saturate(180%) blur(24px);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t: 320ms;
  --t-slow: 620ms;

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  --nav-h: 64px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-2: #0b0b0d;
  --bg-grouped: #000000;
  --surface: rgba(28, 28, 30, 0.68);
  --surface-strong: rgba(36, 36, 38, 0.9);
  --surface-solid: #1c1c1e;
  --fill: rgba(120, 120, 128, 0.24);
  --fill-2: rgba(120, 120, 128, 0.16);
  --fill-3: rgba(118, 118, 128, 0.3);
  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, 0.68);
  --text-3: rgba(235, 235, 245, 0.4);
  --separator: rgba(84, 84, 88, 0.6);
  --hairline: rgba(255, 255, 255, 0.1);
  --highlight: rgba(255, 255, 255, 0.14);
  --accent: #2dd4bf;
  --accent-2: #22c3e6;
  --accent-3: #5ee39a;
  --accent-ink: #00201c;
  --accent-soft: rgba(45, 212, 191, 0.16);
  --blue: #0a84ff;
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --purple: #bf5af2;
  --gradient: linear-gradient(135deg, #2b8cff 0%, #22c3e6 45%, #5ee39a 100%);
  --gradient-text: linear-gradient(120deg, #6cb8ff 0%, #2dd4bf 50%, #7ef0a8 100%);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 20px 60px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --bg-2: #0b0b0d;
    --bg-grouped: #000000;
    --surface: rgba(28, 28, 30, 0.68);
    --surface-strong: rgba(36, 36, 38, 0.9);
    --surface-solid: #1c1c1e;
    --fill: rgba(120, 120, 128, 0.24);
    --fill-2: rgba(120, 120, 128, 0.16);
    --fill-3: rgba(118, 118, 128, 0.3);
    --text: #f5f5f7;
    --text-2: rgba(235, 235, 245, 0.68);
    --text-3: rgba(235, 235, 245, 0.4);
    --separator: rgba(84, 84, 88, 0.6);
    --hairline: rgba(255, 255, 255, 0.1);
    --highlight: rgba(255, 255, 255, 0.14);
    --accent: #2dd4bf;
    --accent-2: #22c3e6;
    --accent-3: #5ee39a;
    --accent-ink: #00201c;
    --accent-soft: rgba(45, 212, 191, 0.16);
    --blue: #0a84ff;
    --green: #30d158;
    --orange: #ff9f0a;
    --red: #ff453a;
    --purple: #bf5af2;
    --gradient: linear-gradient(135deg, #2b8cff 0%, #22c3e6 45%, #5ee39a 100%);
    --gradient-text: linear-gradient(120deg, #6cb8ff 0%, #2dd4bf 50%, #7ef0a8 100%);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 20px 60px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
img, svg, video { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
.hidden { display: none !important; }
/* Atributo hidden sempre vence o display das classes (ex.: .auth-page { display: grid }) */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* ---------- tipografia (escala Apple) ---------- */
.t-hero { font-family: var(--font-display); font-size: clamp(44px, 7.2vw, 96px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 700; margin: 0; }
.t-large { font-family: var(--font-display); font-size: clamp(34px, 4.6vw, 56px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 700; margin: 0; }
.t-title1 { font-family: var(--font-display); font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; margin: 0; }
.t-title2 { font-family: var(--font-display); font-size: 24px; line-height: 1.18; letter-spacing: -0.024em; font-weight: 650; margin: 0; }
.t-title3 { font-size: 20px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; margin: 0; }
.t-headline { font-size: 17px; font-weight: 600; margin: 0; }
.t-body { font-size: 17px; margin: 0; }
.t-callout { font-size: 16px; line-height: 1.45; margin: 0; }
.t-sub { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.42; letter-spacing: -0.018em; color: var(--text-2); margin: 0; }
.t-foot { font-size: 13px; line-height: 1.38; letter-spacing: -0.006em; color: var(--text-2); margin: 0; }
.t-caption { font-size: 12px; letter-spacing: 0; color: var(--text-3); margin: 0; }
.t-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin: 0; }
.t-muted { color: var(--text-2); }
.t-grad { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.t-center { text-align: center; }
.t-num { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.wrap { width: min(var(--maxw), 100% - var(--gutter) * 2); margin-inline: auto; }
.wrap-narrow { width: min(780px, 100% - var(--gutter) * 2); margin-inline: auto; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row.wrap-row { flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: var(--gap, 20px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.section { padding-block: clamp(72px, 11vw, 150px); position: relative; }

/* ---------- materiais ---------- */
.glass {
  background: var(--surface);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--hairline);
  box-shadow: inset 0 0.5px 0 var(--highlight), var(--shadow-2);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--surface-strong); }
}
/* Liquid glass: reflexo que segue o ponteiro (ui.js grava --mx/--my). */
.liquid { position: relative; isolation: isolate; overflow: hidden; }
.liquid::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background:
    radial-gradient(420px circle at var(--mx, 30%) var(--my, 0%), rgba(255, 255, 255, 0.35), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 38%);
  opacity: 0.9; transition: opacity var(--t) var(--ease);
}
html[data-theme="dark"] .liquid::before { opacity: 0.35; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .liquid::before { opacity: 0.35; } }

.card {
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  border: 0.5px solid var(--hairline);
  box-shadow: var(--shadow-1);
  padding: clamp(20px, 2.6vw, 32px);
}
.card.glass { background: var(--surface); }
.card.lift { transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease); }
.card.lift:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-3); }

/* ---------- botões ---------- */
.btn {
  --btn-bg: var(--accent); --btn-fg: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: var(--r-pill); border: 0;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 17px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap;
  cursor: pointer; text-decoration: none !important; user-select: none;
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast) var(--ease), background-color var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t) var(--ease);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.96); }
.btn[disabled], .btn.is-loading { opacity: 0.55; pointer-events: none; }
.btn.grad { background: var(--gradient); color: #fff; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.tinted { --btn-bg: var(--accent-soft); --btn-fg: var(--accent); }
.btn.gray { --btn-bg: var(--fill); --btn-fg: var(--text); }
.btn.plain { --btn-bg: transparent; --btn-fg: var(--accent); padding: 0 10px; }
.btn.danger { --btn-bg: var(--red); --btn-fg: #fff; }
.btn.glass-btn { --btn-bg: var(--surface); --btn-fg: var(--text); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 0.5px solid var(--hairline); box-shadow: inset 0 0.5px 0 var(--highlight), var(--shadow-1); }
.btn.lg { min-height: 54px; padding: 0 30px; font-size: 18px; }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.icon { width: 44px; padding: 0; }
.btn.icon.sm { width: 34px; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn .spin { display: none; }
.btn.is-loading .spin { display: inline-block; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: ui-spin 0.7s linear infinite; }
@keyframes ui-spin { to { transform: rotate(360deg); } }

/* ---------- campos (estilo Ajustes / formulários iOS) ---------- */
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-size: 13px; font-weight: 500; color: var(--text-2); padding-left: 4px; }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 13px 16px; border-radius: var(--r-sm);
  border: 0.5px solid var(--separator); background: var(--surface-solid); color: var(--text);
  font-size: 17px; outline: none; appearance: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t) var(--ease);
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field .hint { font-size: 12.5px; color: var(--text-3); padding-left: 4px; }
.field.is-invalid input, .field.is-invalid select { border-color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 15%, transparent); }
.field .error { font-size: 12.5px; color: var(--red); padding-left: 4px; }
.input-affix { position: relative; display: flex; align-items: center; }
.input-affix input { padding-right: 52px; }
.input-affix .affix { position: absolute; right: 6px; }

/* Grupo inset (lista dos Ajustes) */
.group-list { background: var(--surface-solid); border-radius: var(--r-md); border: 0.5px solid var(--hairline); overflow: hidden; }
.group-list > .item { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 10px 16px; position: relative; }
.group-list > .item + .item::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; border-top: 0.5px solid var(--separator); }
.group-list > .item.no-icon + .item::before, .group-list.no-icons > .item + .item::before { left: 16px; }
.group-list > a.item { color: inherit; text-decoration: none; transition: background-color var(--t-fast) var(--ease); }
.group-list > a.item:hover { background: var(--fill-2); }
.group-list > a.item::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-top: 2px solid var(--text-3); transform: rotate(45deg); margin-left: auto; flex: none; }
.list-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); padding: 0 16px 6px; margin: 0; }
.symbol { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; background: var(--accent); }
.symbol svg { width: 18px; height: 18px; }
.symbol.blue { background: var(--blue); } .symbol.green { background: var(--green); } .symbol.orange { background: var(--orange); }
.symbol.red { background: var(--red); } .symbol.purple { background: var(--purple); } .symbol.grad { background: var(--gradient); }

/* Interruptor iOS */
.switch { position: relative; width: 51px; height: 31px; flex: none; display: inline-block; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--fill-3); transition: background-color var(--t) var(--ease); }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 3px 1px rgba(0, 0, 0, 0.06); transition: transform var(--t) var(--spring), width var(--t-fast) var(--ease); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:active + span::after { width: 33px; }
.switch input:checked:active + span::after { transform: translateX(14px); }

/* Controle segmentado (o indicador desliza com mola; ui.js posiciona) */
.segmented { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 2px; border-radius: 10px; background: var(--fill); isolation: isolate; }
.segmented button { position: relative; z-index: 1; border: 0; background: transparent; min-height: 32px; padding: 0 16px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; transition: color var(--t) var(--ease); }
.segmented button[aria-selected="true"] { font-weight: 600; }
.segmented .seg-thumb { position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 0; border-radius: 8px; background: var(--surface-solid); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04); transition: transform var(--t) var(--spring), width var(--t) var(--spring); }
html[data-theme="dark"] .segmented .seg-thumb { background: #636366; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .segmented .seg-thumb { background: #636366; } }
.segmented.lg button { min-height: 40px; font-size: 15px; padding: 0 20px; }
.segmented.block { display: grid; width: 100%; }

/* Etiquetas */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--fill); font-size: 13px; font-weight: 500; color: var(--text); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--accent); color: var(--accent-ink); }

/* ---------- barra de navegação flutuante (cápsula de vidro) ---------- */
.navbar {
  position: fixed; z-index: 50; top: 12px; left: 50%; transform: translateX(-50%);
  width: min(var(--maxw), 100% - 24px); height: var(--nav-h); padding: 0 10px 0 18px;
  display: flex; align-items: center; gap: 12px; border-radius: var(--r-pill);
  transition: box-shadow var(--t) var(--ease), background-color var(--t) var(--ease), top var(--t) var(--ease);
}
.navbar.is-top { box-shadow: inset 0 0.5px 0 var(--highlight), var(--shadow-1); }
.navbar .brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; font-weight: 650; letter-spacing: -0.02em; min-width: 0; }
.navbar .brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.navbar .brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbar nav { display: flex; gap: 2px; margin-left: auto; }
.navbar nav a { color: var(--text); font-size: 14.5px; font-weight: 500; padding: 8px 14px; border-radius: var(--r-pill); text-decoration: none; transition: background-color var(--t-fast) var(--ease); }
.navbar nav a:hover { background: var(--fill-2); }
.navbar .actions { display: flex; align-items: center; gap: 6px; }
@media (max-width: 860px) { .navbar nav { display: none; } .navbar .actions { margin-left: auto; } }

/* Barra de abas inferior (celular) */
.tabbar { position: fixed; z-index: 50; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: none; gap: 4px; padding: 6px; border-radius: var(--r-pill); }
.tabbar a { display: grid; place-items: center; gap: 2px; min-width: 64px; padding: 6px 10px; border-radius: var(--r-pill); color: var(--text-2); font-size: 10.5px; font-weight: 600; text-decoration: none; transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.active { color: var(--accent); background: var(--fill-2); }
@media (max-width: 860px) { .tabbar.mobile { display: flex; } }

/* ---------- sheet (janela que sobe, como no iOS) ---------- */
.sheet { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; pointer-events: none; }
.sheet::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32); opacity: 0; transition: opacity var(--t) var(--ease); }
.sheet .sheet-panel {
  position: relative; width: min(560px, 100%); max-height: min(86dvh, 860px); overflow: auto;
  border-radius: var(--r-xl); padding: 28px; background: var(--surface-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-3); border: 0.5px solid var(--hairline);
  transform: translateY(24px) scale(0.96); opacity: 0;
  transition: transform var(--t-slow) var(--spring), opacity var(--t) var(--ease);
}
.sheet.open { pointer-events: auto; }
.sheet.open::before { opacity: 1; }
.sheet.open .sheet-panel { transform: none; opacity: 1; }
.sheet .grabber { display: none; width: 36px; height: 5px; border-radius: 3px; background: var(--fill-3); margin: -14px auto 14px; }
@media (max-width: 640px) {
  .sheet { place-items: end stretch; padding: 0; }
  .sheet .sheet-panel { width: 100%; border-radius: 22px 22px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); opacity: 1; }
  .sheet .grabber { display: block; }
}
.sheet-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--fill); color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.sheet-close svg { width: 14px; height: 14px; }

/* ---------- toast (ilha dinâmica) ---------- */
.toast-host { position: fixed; z-index: 200; top: 14px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px 10px 12px; border-radius: var(--r-pill);
  background: rgba(20, 20, 22, 0.92); color: #fff; font-size: 15px; font-weight: 500; box-shadow: var(--shadow-3);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transform: translateY(-30px) scale(0.6); opacity: 0; transition: transform var(--t-slow) var(--spring), opacity var(--t) var(--ease);
  pointer-events: auto; max-width: min(92vw, 520px);
}
.toast.show { transform: none; opacity: 1; }
.toast .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green); flex: none; }
.toast.error .ic { background: var(--red); }
.toast.info .ic { background: var(--blue); }
.toast .ic svg { width: 15px; height: 15px; }

/* ---------- animações de entrada ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--delay, 0ms); }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal="left"] { transform: translateX(-36px); }
[data-reveal="right"] { transform: translateX(36px); }
[data-reveal].in { opacity: 1; transform: none; }
.ui-no-js [data-reveal] { opacity: 1; transform: none; }

/* Fundo vivo (malha de cor desfocada) */
.aurora { position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1; pointer-events: none; filter: blur(80px) saturate(130%); opacity: 0.42; }
.aurora i { position: absolute; border-radius: 50%; animation: aurora 22s var(--ease) infinite alternate; }
.aurora i:nth-child(1) { width: 46vw; height: 46vw; left: 5%; top: 0; background: #22c3e6; }
.aurora i:nth-child(2) { width: 38vw; height: 38vw; right: 4%; top: 8%; background: #5ee39a; animation-duration: 26s; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 34vw; height: 34vw; left: 34%; top: 30%; background: #2b8cff; animation-duration: 30s; animation-delay: -12s; opacity: 0.7; }
html[data-theme="dark"] .aurora { opacity: 0.32; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .aurora { opacity: 0.32; } }
@keyframes aurora { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vw, 4vw) scale(1.12); } 100% { transform: translate(-4vw, 8vw) scale(0.94); } }

/* Transição suave entre páginas (Safari 18.2+, Chrome 126+) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 260ms var(--ease) both vt-out; }
::view-transition-new(root) { animation: 420ms var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: scale(0.985); } }
@keyframes vt-in { from { opacity: 0; transform: scale(1.015); } }

/* Esqueleto de carregamento */
.skeleton { background: linear-gradient(90deg, var(--fill-2) 0%, var(--fill) 40%, var(--fill-2) 80%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; color: transparent !important; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }

/* Botão de tema */
.theme-toggle svg .sun { display: none; }
html[data-theme="dark"] .theme-toggle svg .sun { display: block; }
html[data-theme="dark"] .theme-toggle svg .moon { display: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .theme-toggle svg .sun { display: block; }
  html:not([data-theme]) .theme-toggle svg .moon { display: none; }
}

/* Rodapé */
.footer { padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 0.5px solid var(--separator); font-size: 13px; color: var(--text-2); }
.footer a { color: var(--text-2); }
.footer .row { justify-content: space-between; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .aurora i { animation: none; }
}

/* Símbolo da marca no tema escuro: sobre um fundo branco arredondado (como ícone de app) */
html[data-theme="dark"] .navbar .brand img[src*="simbolo"], html[data-theme="dark"] .portal-brand img[src*="simbolo"] { background: #fff; border-radius: 9px; padding: 3px; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .navbar .brand img[src*="simbolo"], html:not([data-theme="light"]) .portal-brand img[src*="simbolo"] { background: #fff; border-radius: 9px; padding: 3px; }
}
