/* Odonto Pro — sistema de clínica odontológica
   Layout: barra lateral de vidro + área de trabalho; no celular, barra inferior.
   Tom: pérola-menta com teal vivo e brilho dourado; vermelho/azul/verde seguem a convenção do odontograma. */
:root {
  --bg: #EAF2F1;
  --bg-2: #DDE9E7;
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #FFFFFF;
  --surface-2: rgba(255, 255, 255, .55);
  --surface-3: rgba(13, 52, 54, .045);
  --line: rgba(13, 52, 54, .10);
  --line-2: rgba(13, 52, 54, .18);
  --ink: #0B2225;
  --ink-2: #3D585B;
  --ink-3: #74898C;
  --accent: #0E9F9A;
  --accent-ink: #FFFFFF;
  --accent-soft: color-mix(in oklab, var(--accent) 13%, transparent);
  --accent-mid: color-mix(in oklab, var(--accent) 35%, transparent);
  --gold: #C9932F;
  --gold-soft: color-mix(in oklab, var(--gold) 16%, transparent);
  --todo: #E5484D;
  --exist: #2F6FEB;
  --done: #15A367;
  --warn: #E08B0B;
  --todo-soft: color-mix(in oklab, var(--todo) 13%, transparent);
  --exist-soft: color-mix(in oklab, var(--exist) 13%, transparent);
  --done-soft: color-mix(in oklab, var(--done) 14%, transparent);
  --warn-soft: color-mix(in oklab, var(--warn) 15%, transparent);
  --shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 12px 32px -14px rgba(11, 40, 42, .28);
  --shadow-lg: 0 30px 80px -24px rgba(6, 30, 32, .45);
  --r: 18px;
  --r-sm: 12px;
  --f-display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --blur: saturate(160%) blur(18px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #061214; --bg-2: #0A1B1E;
    --surface: rgba(14, 32, 35, .74); --surface-solid: #0E2124; --surface-2: rgba(18, 40, 43, .55); --surface-3: rgba(190, 240, 235, .05);
    --line: rgba(190, 240, 235, .09); --line-2: rgba(190, 240, 235, .17);
    --ink: #E3F1EF; --ink-2: #A6C1BF; --ink-3: #6E8B89;
    --gold: #E3B45A;
    --todo: #FF5F66; --exist: #5C8DFF; --done: #2ECC88; --warn: #F3A73A;
    --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 16px 40px -16px rgba(0,0,0,.6);
    --shadow-lg: 0 30px 80px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #061214; --bg-2: #0A1B1E;
  --surface: rgba(14, 32, 35, .74); --surface-solid: #0E2124; --surface-2: rgba(18, 40, 43, .55); --surface-3: rgba(190, 240, 235, .05);
  --line: rgba(190, 240, 235, .09); --line-2: rgba(190, 240, 235, .17);
  --ink: #E3F1EF; --ink-2: #A6C1BF; --ink-3: #6E8B89;
  --gold: #E3B45A;
  --todo: #FF5F66; --exist: #5C8DFF; --done: #2ECC88; --warn: #F3A73A;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 16px 40px -16px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 80px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 500 14.5px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -.01em; }
a { color: var(--accent); }
.num, .tab-num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.lg { width: 22px; height: 22px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- fundo vivo ---------- */
#bg-img { position: fixed; inset: 0; z-index: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .6s; }
#bg-img.on { opacity: 1; }
#bg-img.on::after { content: ""; position: absolute; inset: 0; background: color-mix(in oklab, var(--bg) 62%, transparent); backdrop-filter: blur(2px); }
#aurora { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- shell ---------- */
#app { position: relative; z-index: 1; height: 100%; display: grid; grid-template-columns: 248px 1fr; }
#app.no-shell { display: block; }
.side {
  height: 100%; padding: 18px 14px; display: flex; flex-direction: column; gap: 6px;
  background: var(--surface-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; }
.brand-logo { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(140deg, var(--accent), color-mix(in oklab, var(--accent) 55%, #0B2225)); color: #fff; box-shadow: 0 8px 20px -8px var(--accent); }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand-name { font: 700 15.5px/1.15 var(--f-display); }
.brand-sub { font-size: 11.5px; color: var(--ink-3); font-weight: 600; letter-spacing: .02em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; text-decoration: none;
  color: var(--ink-2); font-weight: 650; transition: background .2s, color .2s, transform .2s;
}
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a.on { background: var(--surface-solid); color: var(--ink); box-shadow: var(--shadow); }
.nav a.on .ic { color: var(--accent); }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; }
.me:hover { border-color: var(--line-2); }
.me small { display: block; color: var(--ink-3); font-size: 11.5px; font-weight: 600; }
.me b { display: block; font-size: 13.5px; line-height: 1.2; }

.main { height: 100%; overflow-y: auto; overflow-x: hidden; position: relative; scroll-behavior: smooth; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 18px 28px 14px;
  background: linear-gradient(var(--bg) 30%, transparent); }
.topbar h1 { font-size: 26px; font-weight: 700; }
.topbar .crumb { font-size: 12.5px; color: var(--ink-3); font-weight: 650; text-transform: capitalize; }
.topbar .grow { flex: 1; min-width: 0; }
.page { padding: 4px 28px 120px; display: flex; flex-direction: column; gap: 18px; max-width: 1480px; }
.mode-pill { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: var(--surface-3); color: var(--ink-3); display: inline-flex; gap: 6px; align-items: center; }
.mode-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--done); box-shadow: 0 0 0 3px var(--done-soft); }
.mode-pill.local i { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

.tabbar { display: none; }

/* ---------- componentes ---------- */
.card {
  background: var(--surface); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px;
  min-width: 0;
}
.card.flat { box-shadow: none; }
.card.pad0 { padding: 0; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-h h3 { font-size: 16px; font-weight: 700; }
.card-h .grow { flex: 1; }
.card-h small { color: var(--ink-3); font-weight: 600; font-size: 12.5px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.strong { font-weight: 750; }
.right { text-align: right; }
.hr { height: 1px; background: var(--line); margin: 4px 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--surface-solid); color: var(--ink); font-weight: 700; font-size: 13.5px;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { border-color: var(--accent-mid); box-shadow: 0 6px 18px -10px var(--accent); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.pri { background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 88%, #fff), var(--accent)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 24px -12px var(--accent); }
.btn.pri:hover { filter: brightness(1.05); }
.btn.gold { background: linear-gradient(180deg, #E8C276, var(--gold)); color: #2B1D05; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); box-shadow: none; }
.btn.danger { color: var(--todo); }
.btn.danger:hover { border-color: var(--todo); box-shadow: none; }
.btn.wa { background: #1FAF5A; color: #fff; border-color: transparent; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 10px; gap: 6px; }
.btn.xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 8px; gap: 5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface-solid); cursor: pointer; color: var(--ink-2); flex: none; text-decoration: none; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.ghost { background: transparent; border-color: transparent; }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 750; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--done-soft); color: var(--done); }
.pill.info { background: var(--exist-soft); color: var(--exist); }
.pill.bad { background: var(--todo-soft); color: var(--todo); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.acc { background: var(--accent-soft); color: var(--accent); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; background: var(--accent); color: #fff; }
.badge.red { background: var(--todo); }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--surface-solid); font-weight: 650; font-size: 13px; cursor: pointer; color: var(--ink-2); transition: all .18s; white-space: nowrap;
}
.chip:hover { color: var(--ink); border-color: var(--accent-mid); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.chip.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.chip.c-todo.on { background: var(--todo); border-color: var(--todo); color: #fff; }
.chip.c-exist.on { background: var(--exist); border-color: var(--exist); color: #fff; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line); gap: 2px; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 13px; border-radius: 9px; font-weight: 700; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--surface-solid); color: var(--ink); box-shadow: 0 2px 8px -3px rgba(0,0,0,.2); }

.av { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13.5px; color: #fff; letter-spacing: .02em; }
.av.sm { width: 30px; height: 30px; border-radius: 10px; font-size: 11.5px; }
.av.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 22px; }

/* formulários */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 750; color: var(--ink-2); letter-spacing: .01em; }
.field > span em { color: var(--todo); font-style: normal; }
.inp, .field input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), .field select, .field textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-solid);
  outline: none; transition: border-color .2s, box-shadow .2s; font-weight: 600;
}
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.inp:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 14px; }
.c12 { grid-column: span 12; } .c8 { grid-column: span 8; } .c6 { grid-column: span 6; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; } .c9 { grid-column: span 9; }
.fs { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.fs-t { font: 700 13px var(--f-display); color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; padding-top: 6px; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 650; cursor: pointer; font-size: 13.5px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding-left: 38px !important; }

/* KPIs */
.kpi { display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.kpi .k-l { font-size: 12.5px; font-weight: 700; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.kpi .k-v { font: 700 27px/1.1 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .k-s { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.kpi .k-ic { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }

/* listas */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; transition: background .15s; min-width: 0; }
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--surface-3); }
.li .t { font-weight: 750; line-height: 1.25; }
.li .s { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.time-tag { font: 700 13px var(--f-display); font-variant-numeric: tabular-nums; min-width: 46px; }
.empty { text-align: center; padding: 28px 12px; color: var(--ink-3); font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ic { width: 30px; height: 30px; opacity: .6; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 750; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: var(--surface-3); }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: transparent; padding: 11px 14px; font-weight: 700; color: var(--ink-3); cursor: pointer; border-bottom: 2.5px solid transparent; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; font-size: 13.5px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- agenda ---------- */
.ag-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ag-date { font: 700 18px var(--f-display); text-transform: capitalize; min-width: 0; }
.ag-wrap { overflow: auto; max-height: calc(100vh - 250px); border-radius: var(--r); }
.ag { display: grid; position: relative; min-width: 100%; }
.ag-head { position: sticky; top: 0; z-index: 3; display: contents; }
.ag-hcell { position: sticky; top: 0; z-index: 3; padding: 10px 12px; background: var(--surface-solid); border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 9px; min-width: 0; }
.ag-hcell.corner { left: 0; z-index: 4; }
.ag-hcell b { font-size: 13.5px; display: block; line-height: 1.2; }
.ag-hcell small { font-size: 11.5px; color: var(--ink-3); font-weight: 650; display: block; }
.ag-times { position: sticky; left: 0; z-index: 2; background: var(--surface-solid); border-right: 1px solid var(--line); }
.ag-time { position: absolute; left: 0; right: 0; font-size: 11.5px; font-weight: 700; color: var(--ink-3); padding: 0 8px; transform: translateY(-50%); text-align: right; font-variant-numeric: tabular-nums; }
.ag-col { position: relative; border-right: 1px solid var(--line); background:
  repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--slot) - 1px), var(--line) calc(var(--slot) - 1px), var(--line) var(--slot)); }
.ag-off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(-45deg, var(--surface-3) 0 6px, transparent 6px 12px); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.ag-slot { position: absolute; left: 4px; right: 4px; border: 1.5px dashed transparent; border-radius: 10px; background: transparent; cursor: pointer; color: transparent; font-weight: 700; font-size: 12px; display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.ag-slot:hover, .ag-slot:focus-visible { border-color: var(--accent-mid); color: var(--accent); background: var(--accent-soft); }
.ag-ev {
  position: absolute; left: 5px; right: 5px; border-radius: 11px; padding: 6px 9px 6px 11px; overflow: hidden; cursor: pointer;
  background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: 0 6px 16px -10px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 1px; transition: transform .15s, box-shadow .2s; text-align: left; font-size: 12.5px;
}
.ag-ev::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pc, var(--accent)); }
.ag-ev:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(0,0,0,.45); z-index: 2; }
.ag-ev b { font-size: 13px; line-height: 1.25; }
.ag-ev .m { color: var(--ink-3); font-weight: 650; }
.ag-ev .tt { font-variant-numeric: tabular-nums; font-weight: 750; color: var(--ink-2); font-size: 11.5px; display: flex; gap: 6px; align-items: center; }
.ag-ev.st-confirmado { background: color-mix(in oklab, var(--done) 9%, var(--surface-solid)); }
.ag-ev.st-chegou { background: color-mix(in oklab, var(--warn) 13%, var(--surface-solid)); }
.ag-ev.st-atendimento { background: color-mix(in oklab, var(--accent) 16%, var(--surface-solid)); border-color: var(--accent-mid); }
.ag-ev.st-finalizado { opacity: .72; }
.ag-ev.st-faltou { background: repeating-linear-gradient(-45deg, var(--todo-soft) 0 6px, var(--surface-solid) 6px 12px); }
.ag-ev.st-cancelado { opacity: .4; text-decoration: line-through; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--todo); z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--todo); }
.free-slots { display: flex; gap: 6px; flex-wrap: wrap; }
.slot-chip { height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-solid); font-weight: 750; font-size: 12.5px; cursor: pointer; font-variant-numeric: tabular-nums; }
.slot-chip:hover { border-color: var(--accent); color: var(--accent); }
.slot-chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* recepção */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 180px; backdrop-filter: var(--blur); }
.kcol-h { display: flex; align-items: center; gap: 8px; font: 700 14px var(--f-display); padding: 2px 4px; }
.kcol-h .dot { width: 9px; height: 9px; border-radius: 50%; }
.kcard { background: var(--surface-solid); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 6px 16px -12px rgba(0,0,0,.35); }
.kcard .t { font-weight: 780; line-height: 1.25; }
.kcard .s { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.wait { font-variant-numeric: tabular-nums; font-weight: 800; }

/* odontograma */
.odo-wrap { overflow-x: auto; border-radius: var(--r-sm); background: var(--surface-3); border: 1px solid var(--line); padding: 8px 4px; -webkit-overflow-scrolling: touch; }
.odo-wrap svg { display: block; width: 100%; min-width: 640px; height: auto; margin: 0 auto; max-width: 1040px; }
svg .tooth { cursor: pointer; }
svg .tooth:hover .t-hl { opacity: .55; }
svg .t-hl { opacity: 0; transition: opacity .15s; }
svg .tooth.sel .t-hl { opacity: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; }
.tooth-panel .big-faces svg { width: 150px; height: 150px; }
.tooth-panel .big-faces path, .tooth-panel .big-faces circle { cursor: pointer; transition: opacity .15s; }
.tooth-panel .big-faces path:hover, .tooth-panel .big-faces circle:hover { opacity: .8; }
.proc-btn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-solid); cursor: pointer; text-align: left; width: 100%; transition: border-color .15s, transform .15s; }
.proc-btn:hover { border-color: var(--todo); transform: translateX(2px); }
.proc-btn .pt { font-weight: 750; font-size: 13.5px; line-height: 1.25; }
.proc-btn .pp { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; }
.proc-btn .pi { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--todo-soft); color: var(--todo); flex: none; }
.plan-item { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.plan-item:last-child { border-bottom: 0; }
.tooth-tag { min-width: 34px; height: 26px; padding: 0 7px; border-radius: 8px; display: inline-grid; place-items: center; font: 800 12px var(--f-display); background: var(--surface-3); color: var(--ink); font-variant-numeric: tabular-nums; }
.tooth-tag.todo { background: var(--todo-soft); color: var(--todo); }
.tooth-tag.done { background: var(--done-soft); color: var(--done); }
.total-box { border-radius: 14px; padding: 14px; background: linear-gradient(140deg, color-mix(in oklab, var(--accent) 14%, var(--surface-solid)), var(--surface-solid)); border: 1px solid var(--accent-mid); }
.total-box .tv { font: 800 26px var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* modal & drawer */
#modals { position: relative; z-index: 50; }
.mdl-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.mdl-backdrop { position: absolute; inset: 0; background: rgba(4, 20, 22, .42); backdrop-filter: blur(3px); animation: fade .2s ease; }
.mdl { position: relative; width: 100%; max-height: calc(100% - 20px); display: flex; flex-direction: column; background: var(--surface-solid); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); animation: pop .24s cubic-bezier(.2,.9,.3,1.2); overflow: hidden; }
.mdl.sm { max-width: 440px; } .mdl.md { max-width: 640px; } .mdl.lg { max-width: 920px; } .mdl.xl { max-width: 1180px; }
.mdl-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.mdl-h h2 { font-size: 19px; flex: 1; min-width: 0; }
.mdl-b { padding: 18px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.mdl-b > * { flex-shrink: 0; }
.mdl-f[hidden] { display: none; }
.mdl-f { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center; background: var(--surface-3); }
.mdl-f .grow { flex: 1; }
.mdl-wrap.drawer { justify-content: flex-end; padding: 0; }
.mdl-wrap.drawer .mdl { height: 100%; max-height: 100%; border-radius: 22px 0 0 22px; max-width: 480px; animation: slidein .28s cubic-bezier(.2,.8,.2,1); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.page > * { animation: rise .35s ease both; }
.page > *:nth-child(2) { animation-delay: .04s; } .page > *:nth-child(3) { animation-delay: .08s; } .page > *:nth-child(4) { animation-delay: .12s; }

#toasts { position: fixed; z-index: 80; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 13px; font-weight: 700; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: pop .25s ease; display: flex; gap: 9px; align-items: center; max-width: 92vw; }
.toast.bad { background: var(--todo); color: #fff; }

/* paper (PDF/visualização) — cores fixas para impressão */
.paper-stage { background: #8A9A9B22; border-radius: 14px; padding: 14px; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.paper-scale { transform-origin: top left; }
.paper {
  width: 794px; min-height: 1123px; background: #fff; color: #142427; padding: 48px 54px 40px; position: relative;
  font: 500 12.5px/1.55 "Manrope", Arial, sans-serif; box-shadow: 0 10px 30px -12px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 14px;
  color-scheme: light;
}
.paper * { color-scheme: light; }
.pp-head { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid var(--pp-acc, #0E9F9A); }
.pp-logo { width: 64px; height: 64px; border-radius: 14px; object-fit: contain; }
.pp-logo-ph { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; color: #fff; font: 800 22px "Bricolage Grotesque", Arial; }
.pp-cn { font: 800 20px/1.1 "Bricolage Grotesque", Arial, sans-serif; color: #0B2225; }
.pp-cs { font-size: 11px; color: #5B7073; font-weight: 600; }
.pp-hr { margin-left: auto; text-align: right; font-size: 10.5px; color: #5B7073; line-height: 1.5; font-weight: 600; }
.pp-title { font: 800 17px "Bricolage Grotesque", Arial; color: #0B2225; display: flex; align-items: baseline; gap: 10px; letter-spacing: -.01em; }
.pp-title small { font: 700 11px "Manrope", Arial; color: #5B7073; letter-spacing: .08em; text-transform: uppercase; }
.pp-box { border: 1px solid #DCE5E4; border-radius: 10px; padding: 10px 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 16px; font-size: 11.5px; }
.pp-box b { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; color: #6C8285; font-weight: 750; }
.pp-tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.pp-tbl th { text-align: left; background: #F1F6F5; color: #4A6063; font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; padding: 7px 8px; }
.pp-tbl td { padding: 7px 8px; border-bottom: 1px solid #E6EEED; }
.pp-tbl .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-tot { display: flex; justify-content: flex-end; gap: 22px; font-size: 12px; padding-top: 4px; }
.pp-tot b { font: 800 16px "Bricolage Grotesque", Arial; color: #0B2225; }
.pp-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: auto; padding-top: 34px; }
.pp-sign div { border-top: 1px solid #142427; padding-top: 6px; text-align: center; font-size: 11px; font-weight: 650; }
.pp-sign small { display: block; color: #5B7073; font-weight: 600; }
.pp-foot { font-size: 9.5px; color: #7E9295; display: flex; justify-content: space-between; border-top: 1px solid #E6EEED; padding-top: 8px; }
.pp-p { margin: 0; font-size: 12.5px; line-height: 1.7; text-align: justify; }
.pp-h3 { font: 800 12px "Manrope", Arial; text-transform: uppercase; letter-spacing: .08em; color: #3D585B; margin: 4px 0 -4px; }
.pp-rx { display: flex; flex-direction: column; gap: 12px; }
.pp-rx .it b { font-size: 13px; }
.pp-rx .it .dots { flex: 1; border-bottom: 1.5px dotted #9AAEB0; margin: 0 8px 4px; }
.pp-rx .pos { color: #2F4548; padding-left: 18px; }
.pp-check { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; font-size: 12px; }
.pp-check div::before { content: "☒  "; color: #0E9F9A; font-weight: 800; }
.pp-via { position: absolute; top: 18px; right: 54px; font: 800 10px "Manrope", Arial; letter-spacing: .12em; color: #8EA2A4; }
.pp-opt { border: 1px solid #DCE5E4; border-radius: 10px; overflow: hidden; }
.pp-opt-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #F1F6F5; font-weight: 800; }
.pp-cond { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp-cond > div { border-radius: 10px; padding: 10px 12px; background: #F4F8F7; font-size: 11.5px; }
.pp-cond b { font: 800 15px "Bricolage Grotesque", Arial; display: block; color: #0B2225; }
.pdf-host { position: fixed; left: -12000px; top: 0; width: 794px; pointer-events: none; }

/* login */
.login { height: 100%; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 22px; padding: 36px 40px 32px; color: #E9F6F4; min-height: 0;
  background: radial-gradient(120% 90% at 20% 10%, color-mix(in oklab, var(--accent) 55%, #04181B) 0%, #04161A 55%, #020B0D 100%); }
.login-hero canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.login-hero .h3d { position: relative; flex: 1 1 auto; min-height: 220px; margin: 0 -12px; }
.login-hero .h3d::before { content: ""; position: absolute; left: 12%; right: 12%; bottom: 4%; height: 28%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--accent) 45%, transparent), transparent); filter: blur(14px); opacity: .55; pointer-events: none; }
.hero-txt { position: relative; z-index: 2; max-width: 640px; pointer-events: none; display: flex; flex-direction: column; gap: 10px; }
.hero-txt h1 { font-size: clamp(28px, 3.2vw, 46px); line-height: 1.02; font-weight: 700; letter-spacing: -.03em; }
.hero-txt h1 em { font-style: normal; background: linear-gradient(90deg, #7FF2DF, #F3D38C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-txt p { color: #A8C9C5; font-size: 15px; max-width: 460px; margin: 0; }
.hero-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.hero-tags { position: relative; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.hero-tags span { font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px); }
.login-side { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(24px, 5vw, 72px); gap: 22px; overflow-y: auto; }
.who-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.who { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; text-align: left; transition: all .2s; backdrop-filter: var(--blur); }
.who:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.who b { display: block; font-size: 14px; line-height: 1.25; }
.who small { display: block; color: var(--ink-3); font-weight: 650; font-size: 12px; }

/* apresentação 3D */
.present { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: 1fr 400px; color: #E9F6F4;
  background: radial-gradient(90% 80% at 35% 40%, #0F3A3D 0%, #05181B 55%, #020A0C 100%); animation: fade .3s; }
.present .stage { position: relative; min-height: 0; }
.present .stage canvas { display: block; touch-action: none; cursor: grab; }
.present .stage canvas:active { cursor: grabbing; }
.present .p-side { background: rgba(255,255,255,.04); border-left: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(20px); padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.present .p-top { position: absolute; top: 18px; left: 18px; right: 18px; display: flex; gap: 10px; align-items: center; z-index: 3; flex-wrap: wrap; }
.present .p-bot { position: absolute; bottom: 18px; left: 18px; right: 18px; display: flex; gap: 8px; z-index: 3; flex-wrap: wrap; justify-content: center; }
.glass-btn { height: 38px; padding: 0 14px; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #fff; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; backdrop-filter: blur(10px); font-size: 13px; }
.glass-btn.on { background: #fff; color: #062023; }
.glass-btn:hover { background: rgba(255,255,255,.18); }
.glass-btn.on:hover { background: #fff; }
.p-item { display: flex; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); cursor: pointer; transition: all .2s; text-align: left; color: inherit; width: 100%; }
.p-item:hover, .p-item.on { background: rgba(255,255,255,.11); border-color: rgba(127,242,223,.5); }
.p-item .tn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font: 800 14px var(--f-display); background: rgba(255,95,102,.18); color: #FF8C91; flex: none; }
.p-item .tn.done { background: rgba(46,204,136,.18); color: #5BE0A6; }
.p-item b { font-size: 14px; display: block; }
.p-item small { color: #9FBDB9; font-size: 12.5px; display: block; line-height: 1.4; font-weight: 600; }
.p-item .pv { margin-left: auto; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.p-total { border-radius: 16px; padding: 16px; background: linear-gradient(140deg, rgba(127,242,223,.16), rgba(243,211,140,.12)); border: 1px solid rgba(255,255,255,.14); }
.p-total .tv { font: 800 30px var(--f-display); letter-spacing: -.02em; }
.pr-3d { position: absolute; left: 0; right: 0; top: 64px; bottom: 70px; }
.tip3d { position: absolute; z-index: 4; pointer-events: none; padding: 10px 13px; border-radius: 12px; background: rgba(4,20,22,.88); border: 1px solid rgba(127,242,223,.35); font-size: 12.5px; line-height: 1.45; width: max-content; min-width: 170px; max-width: 250px; backdrop-filter: blur(8px); transform: translateX(-50%); box-shadow: 0 12px 30px -12px rgba(0,0,0,.6); }
.tip3d b { display: block; font-size: 13.5px; }

/* splash */
.splash { position: fixed; inset: 0; display: grid; place-items: center; z-index: 90; background: var(--bg); transition: opacity .4s; }
.splash .pulse { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--accent), #0B4C4E); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.08); box-shadow: 0 0 0 14px var(--accent-soft); } }

.onb { max-width: 720px; margin: 8vh auto; padding: 0 20px; display: flex; flex-direction: column; gap: 18px; }
.onb h1 { font-size: 40px; line-height: 1.05; letter-spacing: -.03em; }

.color-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.color-dots button { width: 30px; height: 30px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; }
.color-dots button.on { border-color: var(--ink); }
.upload-box { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: 16px; background: var(--surface-3); }
.upload-box img { width: 64px; height: 64px; object-fit: contain; border-radius: 14px; background: #fff; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.bar-c { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-c .b { width: 100%; max-width: 44px; border-radius: 9px 9px 4px 4px; background: linear-gradient(180deg, var(--accent), color-mix(in oklab, var(--accent) 40%, transparent)); position: relative; min-height: 4px; transition: height .5s; }
.bar-c .b.last { background: linear-gradient(180deg, var(--gold), color-mix(in oklab, var(--gold) 35%, transparent)); }
.bar-c small { font-size: 11px; color: var(--ink-3); font-weight: 750; text-transform: capitalize; }
.bar-c .bv { font-size: 10.5px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--gold)); }

.lab-card { border-left: 4px solid var(--accent); }
.alert-strip { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--todo-soft); color: var(--todo); font-weight: 750; font-size: 13px; }
.alert-strip.warn { background: var(--warn-soft); color: var(--warn); }
.note { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .kanban { grid-template-columns: repeat(4, minmax(240px, 1fr)); }
}
@media (max-width: 860px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar { padding: 14px 16px 10px; padding-top: max(14px, env(safe-area-inset-top)); }
  .topbar h1 { font-size: 22px; }
  .page { padding: 2px 16px 110px; gap: 14px; }
  .g3, .g2 { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi .k-v { font-size: 22px; }
  .kpi .k-ic { display: none; }
  .card { padding: 14px; border-radius: 16px; }
  .tabbar { display: flex; position: fixed; z-index: 20; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); height: 64px; border-radius: 20px;
    background: var(--surface); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); padding: 6px; }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--ink-3); font-size: 10.5px; font-weight: 750; border-radius: 14px; border: 0; background: transparent; cursor: pointer; }
  .tabbar .on { color: var(--accent); background: var(--accent-soft); }
  .mdl-wrap { padding: 0; align-items: flex-end; }
  .mdl, .mdl-wrap.drawer .mdl { max-width: 100% !important; border-radius: 22px 22px 0 0; max-height: 94%; height: auto; animation: sheet .3s cubic-bezier(.2,.8,.2,1); }
  .mdl-wrap.drawer .mdl { height: 92%; }
  @keyframes sheet { from { transform: translateY(60px); opacity: 0; } }
  .form-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .c8, .c6, .c9, .c12 { grid-column: span 6; } .c4 { grid-column: span 3; } .c3 { grid-column: span 3; }
  .login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; overflow-y: auto; height: auto; min-height: 100%; }
  body.login-mode { overflow-y: auto; }
  .login-hero { padding: 20px 20px 8px; gap: 14px; padding-top: max(20px, env(safe-area-inset-top)); }
  .login-hero .h3d { flex: none; height: min(42vh, 300px); min-height: 200px; margin: 0 -20px; }
  .hero-txt h1 { font-size: 27px; }
  .hero-tags { display: none; }
  .login-side { padding: 26px 20px 40px; gap: 16px; }
  .login-side h2 { font-size: 24px !important; }
  .hero-txt p { font-size: 13.5px; }
  .ag-date { flex-basis: 100%; order: -1; font-size: 16px; }
  .who-grid { grid-template-columns: minmax(0, 1fr); }
  .present { grid-template-columns: minmax(0, 1fr); grid-template-rows: 55% 45%; }
  .present .p-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); }
  .present .pr-3d { top: 62px; bottom: 58px; }
  .present .p-bot { bottom: 12px; gap: 6px; flex-wrap: nowrap; }
  .present .p-bot { left: 8px; right: 8px; }
  .present .p-bot .glass-btn { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0 6px; font-size: 12.5px; height: 38px; white-space: nowrap; }
  .present .p-top { left: 10px; right: 10px; top: 10px; }
  .ag-wrap { max-height: none; }
  .hide-m { display: none !important; }
  #toasts { bottom: 90px; }
}
@media (min-width: 861px) { .show-m { display: none !important; } }
@media (min-width: 861px) and (max-height: 720px) { .hero-txt p { display: none; } .login-hero { gap: 14px; padding: 26px 34px 24px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ===== Como é feito (animação do procedimento) ===== */
.pa-how { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 11px; border-radius: 99px; background: rgba(127,242,223,.14); border: 1px solid rgba(127,242,223,.45); color: #7FF2DF; font-size: 12.5px; font-weight: 800; cursor: pointer; transition: background .2s; }
.pa-how:hover { background: rgba(127,242,223,.26); }
.pa-how .ic { width: 13px; height: 13px; }
.pa-card { position: absolute; z-index: 8; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(420px, calc(100% - 28px)); max-height: calc(100% - 24px); display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 24px; background: linear-gradient(160deg, rgba(14,40,46,.96), rgba(7,22,27,.97)); border: 1px solid rgba(127,242,223,.28); box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset; animation: paIn .35s cubic-bezier(.2,.9,.3,1.2); backdrop-filter: blur(18px); }
@keyframes paIn { from { opacity: 0; transform: translate(-50%,-46%) scale(.96); } }
.pa-card .pa-h { display: flex; align-items: center; gap: 10px; }
.pa-card .pa-h span { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #7FF2DF; }
.pa-card .pa-h b { font: 700 18px var(--f-display); flex: 1; }
.pa-card canvas { width: 100%; height: auto; aspect-ratio: 760/874; min-height: 0; flex: 1 1 auto; object-fit: contain; border-radius: 16px; background: radial-gradient(120% 90% at 50% 20%, #1D4A52 0%, #0B2329 70%); cursor: default; }
.pa-card .pa-cap { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.06); font-weight: 700; font-size: 15px; }
.pa-card .pa-n { flex: none; font: 800 12px var(--f-display); color: #071A1E; background: #7FF2DF; padding: 4px 8px; border-radius: 99px; }
.pa-card .pa-dots { display: flex; gap: 6px; }
.pa-card .pa-dots i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.14); transition: background .3s; }
.pa-card .pa-dots i.on { background: #7FF2DF; }
.pa-card .pa-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pa-card .pa-note { font-size: 11.5px; color: #9FBDB9; font-weight: 600; }
@media (max-width: 860px) { .pa-card { width: calc(100% - 20px); padding: 12px; gap: 8px; } .pa-card canvas { max-height: 40vh; } .pa-card .pa-cap { font-size: 13.5px; min-height: 38px; } }

/* aviso de chegada do paciente */
.arrival { position: fixed; z-index: 80; top: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 12px; border-radius: 18px;
  background: var(--surface-solid, #fff); backdrop-filter: blur(14px); border: 1px solid var(--line, rgba(0,0,0,.1)); box-shadow: 0 18px 50px rgba(0,0,0,.25); min-width: min(380px, calc(100vw - 24px)); animation: arIn .45s cubic-bezier(.2,.9,.3,1.25); }
.arrival .ab-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--accent, #0E9F9A); color: #fff; flex: none; animation: ring 1s ease 2; }
.arrival .ab-ic .ic { width: 22px; height: 22px; }
.arrival b { display: block; font-size: 15.5px; }
.arrival small { color: var(--muted, #667); font-weight: 600; font-size: 13px; }
.arrival .btn { margin-left: auto; }
.arrival.out { opacity: 0; transform: translate(-50%, -12px); transition: all .4s; }
@keyframes arIn { from { opacity: 0; transform: translate(-50%, -24px) scale(.96); } }
@keyframes ring { 20%, 60% { transform: rotate(-14deg); } 40%, 80% { transform: rotate(14deg); } }

/* ===== nuvem: entrar/criar conta, faixa do teste, tela de planos ===== */
.op-auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.op-auth-card { width: min(440px, 100%); background: var(--surface); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 26px 22px; display: flex; flex-direction: column; gap: 18px; }
.op-auth-card input { height: 46px; font-size: 16px; }
.op-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.op-tabs button { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2); border-radius: 14px; padding: 10px 8px; font: 800 14px var(--f-body); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.op-tabs button small { font-size: 11px; letter-spacing: .08em; opacity: .8; }
.op-tabs button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 24px -12px var(--accent); }
.op-faixa { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 14px; border-radius: 14px; background: var(--gold-soft); border: 1px solid color-mix(in oklab, var(--gold) 40%, transparent); font-weight: 750; }
.op-faixa span { display: flex; align-items: center; gap: 8px; }
.op-faixa .btn { height: 34px; padding: 0 14px; }
.op-faixa.bad { background: var(--todo-soft); border-color: color-mix(in oklab, var(--todo) 40%, transparent); }
.op-pay { position: fixed; inset: 0; z-index: 400; overflow: auto; display: grid; place-items: center; padding: 20px 14px; background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.op-pay-card { position: relative; width: min(480px, 100%); background: var(--surface-solid); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 26px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.op-pay-card h2 { font-family: var(--f-display); font-size: 26px; margin: 0; }
.op-x { position: absolute; top: 12px; right: 12px; }
.op-per { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.op-per button { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--surface-2); color: var(--ink); cursor: pointer; font: 600 14px var(--f-body); }
.op-per button i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex: 0 0 auto; }
.op-per button.on { border-color: var(--accent); background: var(--accent-soft); }
.op-per button.on i { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.op-per small { display: block; color: var(--ink-2); font-weight: 650; margin-top: 3px; }
.op-met { align-self: stretch; display: grid !important; grid-template-columns: 1fr 1fr; }
.op-tudo { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; font-weight: 650; font-size: 14px; color: var(--ink-2); }
.op-tudo li { display: flex; gap: 8px; align-items: flex-start; }
.op-tudo .ic { color: var(--done); flex: 0 0 auto; }

/* ===== tela de entrar com a boca em 3D ===== */
body.au-body { overflow: hidden; background: #030B0D; }
body.au-body #aurora { opacity: .55; }
.au { --mx: 0; --my: 0; position: relative; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, .85fr); color: #E6F5F2; isolation: isolate; }
.au-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 700px at 30% 40%, #0B2A2C 0%, #04110F 55%, #020809 100%); }
.au-grid { position: absolute; left: -20%; right: -20%; bottom: -30%; height: 75%; background-image: linear-gradient(rgba(127,242,223,.11) 1px, transparent 1px), linear-gradient(90deg, rgba(127,242,223,.11) 1px, transparent 1px); background-size: 56px 56px; transform: perspective(700px) rotateX(62deg); transform-origin: top center; mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 60%, transparent); animation: auGrid 9s linear infinite; }
@keyframes auGrid { to { background-position: 0 56px, 0 0; } }
.au-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; transform: translate(calc(var(--mx) * 40px), calc(var(--my) * 40px)); transition: transform .6s ease-out; }
.au-glow.g1 { width: 520px; height: 520px; left: 8%; top: 18%; background: #0E9F9A; }
.au-glow.g2 { width: 380px; height: 380px; left: 38%; top: 52%; background: #1B6FA8; opacity: .35; }
.au-glow.g3 { width: 300px; height: 300px; right: 6%; top: 8%; background: #C9932F; opacity: .22; }

.au-hero { position: relative; display: flex; flex-direction: column; padding: clamp(22px, 3.5vw, 44px) clamp(20px, 3.5vw, 52px) 26px; min-height: 0; }
.au-brand { position: relative; z-index: 3; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.au-brand b { font-family: var(--f-display); font-size: 21px; letter-spacing: -.01em; }
.au-logo { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #19C2B9, #0A7C78); box-shadow: 0 10px 30px -8px rgba(25,194,185,.7), inset 0 1px 0 rgba(255,255,255,.35); }
.au-new { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .02em; padding: 7px 12px; border-radius: 99px; color: #F3D38C; background: rgba(243,211,140,.09); border: 1px solid rgba(243,211,140,.28); }
.au-new i { width: 7px; height: 7px; border-radius: 50%; background: #F3D38C; box-shadow: 0 0 0 0 rgba(243,211,140,.7); animation: auPing 1.8s infinite; }
@keyframes auPing { 0% { box-shadow: 0 0 0 0 rgba(243,211,140,.6); } 100% { box-shadow: 0 0 0 10px rgba(243,211,140,0); } }
.au-h1 { position: relative; z-index: 3; font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 3.6vw, 54px); line-height: 1; letter-spacing: -.035em; margin: 24px 0 0; max-width: 820px; animation: auUp .9s cubic-bezier(.2,.8,.2,1) both; }
.au-h1 em { font-style: normal; background: linear-gradient(92deg, #7FF2DF 10%, #41D3C4 45%, #F3D38C 90%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: auShine 6s ease-in-out infinite; }
@keyframes auShine { 50% { background-position: 100% 0; } }
.au-sub { position: relative; z-index: 3; color: #9FC2BE; font-size: clamp(14px, 1.15vw, 17px); font-weight: 600; max-width: 520px; margin: 14px 0 0; animation: auUp .9s .1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes auUp { from { opacity: 0; transform: translateY(18px); } }

.au-stage { position: relative; flex: 1 1 auto; min-height: 320px; margin: -10px -20px 0; z-index: 2; }
.au-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; cursor: grab; filter: drop-shadow(0 30px 60px rgba(0,0,0,.55)); }
.au-stage.sem3d::after { content: ""; position: absolute; inset: 20%; border-radius: 50%; background: radial-gradient(closest-side, rgba(127,242,223,.25), transparent); }
.au-ring { position: absolute; left: 50%; top: 56%; border-radius: 50%; border: 1px solid rgba(127,242,223,.22); transform: translate(-50%, -50%) rotateX(72deg); pointer-events: none; }
.au-ring.r1 { width: min(78%, 620px); aspect-ratio: 1; box-shadow: 0 0 60px rgba(25,194,185,.25), inset 0 0 40px rgba(25,194,185,.18); animation: auRing 6s ease-in-out infinite; }
.au-ring.r2 { width: min(56%, 440px); aspect-ratio: 1; border-style: dashed; border-color: rgba(243,211,140,.25); animation: auSpin 22s linear infinite; }
@keyframes auRing { 50% { box-shadow: 0 0 90px rgba(25,194,185,.4), inset 0 0 60px rgba(25,194,185,.28); } }
@keyframes auSpin { to { transform: translate(-50%, -50%) rotateX(72deg) rotate(360deg); } }
.au-scan { position: absolute; left: 12%; right: 12%; height: 2px; top: 20%; background: linear-gradient(90deg, transparent, rgba(127,242,223,.8), transparent); box-shadow: 0 0 18px rgba(127,242,223,.7); opacity: .0; pointer-events: none; animation: auScan 4.2s ease-in-out infinite; }
@keyframes auScan { 0% { top: 22%; opacity: 0; } 15% { opacity: .9; } 70% { opacity: .7; } 85% { top: 82%; opacity: 0; } 100% { opacity: 0; } }

.au-tip { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; display: flex; align-items: center; gap: 10px; padding: 9px 13px 9px 11px; margin: -64px 0 0 26px; border-radius: 14px; background: rgba(8,26,28,.72); border: 1px solid rgba(127,242,223,.22); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); box-shadow: 0 14px 30px -12px rgba(0,0,0,.7); white-space: nowrap; will-change: transform; animation: auFade .6s .6s both; }
.au-tip::before { content: ""; position: absolute; left: -26px; bottom: -34px; width: 30px; height: 40px; border-left: 1.5px solid rgba(127,242,223,.55); border-bottom: 0; transform: skewX(-32deg); transform-origin: bottom left; }
.au-tip.esq { margin-left: -26px; translate: -100% 0; }
.au-tip.esq::before { left: auto; right: -26px; transform: skewX(32deg); border-left: 0; border-right: 1.5px solid rgba(127,242,223,.55); }
.au-tip b { display: block; font-size: 13px; font-weight: 800; }
.au-tip small { display: block; font-size: 11.5px; color: #9FC2BE; font-weight: 650; }
.au-tip .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.au-tip .dot.red { background: #FF5F66; box-shadow: 0 0 12px #FF5F66; }
.au-tip .dot.green { background: #2ECC88; box-shadow: 0 0 12px #2ECC88; }
.au-tip .dot.blue { background: #5C8DFF; box-shadow: 0 0 12px #5C8DFF; }
.au-tip .dot.gold { background: #F3D38C; box-shadow: 0 0 12px #F3D38C; }
.au-tip[hidden] { display: none; }
.au-tip.pick { border-color: rgba(243,211,140,.45); }
@keyframes auFade { from { opacity: 0; } }

.au-float { position: absolute; z-index: 5; display: flex; align-items: center; gap: 11px; padding: 11px 15px 11px 11px; border-radius: 18px; background: linear-gradient(160deg, rgba(20,48,51,.78), rgba(8,24,26,.7)); border: 1px solid rgba(255,255,255,.09); backdrop-filter: blur(16px) saturate(170%); -webkit-backdrop-filter: blur(16px) saturate(170%); box-shadow: 0 20px 44px -18px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.07); pointer-events: none; animation: auBob 6s ease-in-out infinite, auFade .8s both; }
.au-float b { display: block; font-size: 13.5px; font-weight: 800; }
.au-float small { display: block; font-size: 11.5px; color: #9FC2BE; font-weight: 650; }
.au-float.f1 { right: 1%; top: 36%; translate: calc(var(--mx) * -26px) calc(var(--my) * -18px); }
.au-float.f2 { left: 3%; bottom: 17%; animation-delay: -2s, .3s; translate: calc(var(--mx) * 22px) calc(var(--my) * 16px); }
.au-float.f3 { right: 9%; bottom: 9%; animation-delay: -4s, .5s; translate: calc(var(--mx) * -16px) calc(var(--my) * 22px); }
@keyframes auBob { 50% { transform: translateY(-10px); } }
.au-av { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #2B1D05; background: linear-gradient(145deg, #F3D38C, #C9932F); }
.au-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #2ECC88, #15A367); }
.au-ic.gold { background: linear-gradient(145deg, #19C2B9, #0A7C78); }
.au-ping { width: 9px; height: 9px; border-radius: 50%; background: #2ECC88; margin-left: 4px; animation: auPingG 1.6s infinite; }
@keyframes auPingG { 0% { box-shadow: 0 0 0 0 rgba(46,204,136,.7); } 100% { box-shadow: 0 0 0 10px rgba(46,204,136,0); } }
.au-mode { position: relative; z-index: 3; align-self: flex-start; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 800; padding: 8px 14px; border-radius: 99px; background: rgba(127,242,223,.07); border: 1px solid rgba(127,242,223,.2); }
.au-mode i { width: 8px; height: 8px; border-radius: 50%; background: #7FF2DF; box-shadow: 0 0 10px #7FF2DF; }
.au-mode small { color: #7E9F9B; font-weight: 650; font-size: 12px; }


.au-side { position: relative; z-index: 3; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; padding: 28px clamp(18px, 3vw, 44px); }
.au-card { position: relative; width: min(440px, 100%); padding: 26px 24px 22px; border-radius: 28px; background: linear-gradient(165deg, rgba(22,52,55,.66), rgba(7,22,24,.78)); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%); box-shadow: 0 40px 90px -30px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.08); animation: auUp .9s .15s cubic-bezier(.2,.8,.2,1) both; }
.au-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(127,242,223,.55), transparent 35%, transparent 65%, rgba(243,211,140,.45)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.au-card.swap .au-head, .au-card.swap .au-form { animation: auUp .45s both; }
.au-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 16px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.06); }
.au-tabs button { position: relative; z-index: 1; height: 42px; border: 0; background: none; color: #9FC2BE; font: 800 14px var(--f-body); cursor: pointer; border-radius: 12px; transition: color .25s; }
.au-tabs:not(.novo) button:first-of-type, .au-tabs.novo button:last-of-type { color: #fff; }
.au-pill { display: block; position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 12px; background: linear-gradient(150deg, #19C2B9, #0A8A85); box-shadow: 0 8px 22px -8px rgba(25,194,185,.8); transition: transform .35s cubic-bezier(.3,1.3,.5,1); }

.au-tabs.novo .au-pill { transform: translateX(100%); }
.au-head { margin: 22px 0 16px; }
.au-head h2 { font-family: var(--f-display); font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin: 0; color: #fff; }
.au-head p { margin: 4px 0 0; color: #9FC2BE; font-weight: 650; font-size: 14px; }
.au-form { display: flex; flex-direction: column; gap: 11px; }
.au-in { position: relative; display: block; }
.au-in > span { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #6E9692; display: grid; transition: color .2s; pointer-events: none; }
.au-in input { width: 100%; height: 56px; padding: 20px 46px 6px 46px; border-radius: 15px; border: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.3); color: #fff; font: 700 16px var(--f-body); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.au-in em { position: absolute; left: 46px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 15px; font-weight: 650; color: #7E9F9B; pointer-events: none; transition: all .18s; }
.au-in input:focus, .au-in input:not(:placeholder-shown) { background: rgba(0,0,0,.4); }
.au-in input:focus { border-color: #19C2B9; box-shadow: 0 0 0 4px rgba(25,194,185,.18); }
.au-in input:focus ~ em, .au-in input:not(:placeholder-shown) ~ em { top: 15px; transform: none; font-size: 11px; font-weight: 800; letter-spacing: .03em; color: #7FF2DF; }
.au-in:focus-within > span { color: #7FF2DF; }
.au-in input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #0b1f21 inset; caret-color: #fff; }
.au-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 10px; background: none; color: #7E9F9B; display: grid; place-items: center; cursor: pointer; }
.au-eye.on { color: #7FF2DF; }
.au-msg { min-height: 18px; font-size: 13px; font-weight: 750; color: #FF8A8F; }
.au-go { position: relative; overflow: hidden; height: 58px; border: 0; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; color: #04211F; font: 800 17px var(--f-body); background: linear-gradient(120deg, #7FF2DF, #19C2B9 45%, #F3D38C); background-size: 180% 100%; box-shadow: 0 18px 40px -14px rgba(25,194,185,.9); transition: transform .15s, background-position .5s, box-shadow .3s; }
.au-go:hover { background-position: 100% 0; box-shadow: 0 22px 50px -14px rgba(25,194,185,1); }
.au-go:active { transform: scale(.985); }
.au-go::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: auSweep 3.4s ease-in-out infinite; }
@keyframes auSweep { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.au-go .ic { transition: transform .2s; }
.au-go:hover .ic { transform: translateX(4px); }
.au-go.load span { opacity: .6; }
.au-go.load .ic { animation: auSpinI .8s linear infinite; }
@keyframes auSpinI { to { transform: rotate(360deg); } }
.au-note { text-align: center; font-size: 13px; color: #9FC2BE; font-weight: 650; }
.au-note b { color: #F3D38C; }
.au-link { border: 0; background: none; color: #9FC2BE; font: 750 14px var(--f-body); cursor: pointer; padding: 6px; }
.au-link:hover { color: #fff; }
.au-trust { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.au-trust span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 750; color: #9FC2BE; padding: 7px 11px; border-radius: 99px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.au-trust .ic { width: 15px; height: 15px; color: #7FF2DF; }

@media (max-width: 980px) {
  body.au-body { overflow-y: auto; }
  .au { grid-template-columns: minmax(0, 1fr); }
  .au-hero { padding: 14px 16px 0; padding-top: max(14px, env(safe-area-inset-top)); }
  .au-brand b { font-size: 18px; } .au-logo { width: 38px; height: 38px; border-radius: 12px; }
  .au-new { font-size: 11px; padding: 5px 10px; }
  .au-h1 { font-size: clamp(26px, 7.4vw, 38px); margin-top: 14px; }
  .au-sub { display: none; }
  .au-stage { flex: none; height: min(34vh, 270px); min-height: 220px; margin: -24px -16px 0; }
  .au-float.f1, .au-float.f3, .au-mode { display: none; }
  .au-float.f2 { left: 8px; bottom: 10px; padding: 7px 11px 7px 7px; border-radius: 14px; }
  .au-float.f2 small { display: none; }
  .au-float.f2 .au-ic { width: 28px; height: 28px; border-radius: 9px; }
  .au-tip { padding: 6px 10px 6px 8px; margin-top: -48px; border-radius: 11px; }
  .au-tip b { font-size: 12px; } .au-tip small { display: none; }
  .au-tip[data-t="36"] { display: none; }
  .au-side { padding: 4px 12px 26px; justify-content: flex-start; }
  .au-card { padding: 18px 14px 16px; border-radius: 22px; }
  .au-head { margin: 16px 0 12px; } .au-head h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { .au *, .au *::before, .au *::after { animation: none !important; } }

/* ===== PIN e permissões ===== */
.pin-modal .mdl-h { display: none; }
.pp { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 6px 0 2px; }
.pp-ic { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #19C2B9, #0A7C78); box-shadow: 0 12px 28px -10px rgba(25,194,185,.7); }
.pp h3 { margin: 4px 0 0; font-family: var(--f-display); font-size: 22px; }
.pp p { margin: 0; color: var(--ink-2); font-weight: 650; font-size: 14px; max-width: 300px; }
.pp-dots { display: flex; gap: 14px; margin: 10px 0 2px; }
.pp-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); transition: all .15s; }
.pp-dots i.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px var(--accent); }
.pp-dots.shake { animation: ppShake .4s; }
@keyframes ppShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pp-msg { min-height: 18px; font-size: 13px; font-weight: 750; color: var(--todo); }
.pp-keys { display: grid; grid-template-columns: repeat(3, 72px); gap: 10px; margin: 2px 0 8px; }
.pp-keys button { height: 60px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 800 22px var(--f-display); cursor: pointer; transition: transform .08s, background .15s; }
.pp-keys button:active { transform: scale(.94); background: var(--accent-soft); }
.perm-row { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.perm-row b { display: block; font-size: 14.5px; }
.perm-row small { display: block; color: var(--ink-2); font-weight: 600; font-size: 12.5px; margin-top: 2px; max-width: 560px; }
input.switch { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 46px; height: 27px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .2s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(19px); }

/* ===== painel mestre (conta administradora) ===== */
body.adm-on { overflow: hidden; }
.adm { position: fixed; inset: 0; z-index: 45; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: radial-gradient(1200px 600px at 10% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.adm-in { max-width: 1040px; margin: 0 auto; padding: 18px 18px calc(40px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.adm-h { display: flex; align-items: center; gap: 12px; min-width: 0; position: sticky; top: 0; z-index: 2; padding: 10px 18px; margin: -18px -18px 0;
  padding-top: max(12px, env(safe-area-inset-top)); background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-bottom: 1px solid var(--line); }
.adm-h h1 { margin: 0; font: 800 22px/1.15 var(--f-display); letter-spacing: -.01em; }
.adm-h small { color: var(--ink-3); font-weight: 650; font-size: 12.5px; display: block; }
.adm-h .grow { flex: 1; min-width: 0; }
.adm-logo { width: 44px; height: 44px; flex: none; border-radius: 13px; overflow: hidden; display: grid; place-items: center; }
.adm-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.adm-logo .av { width: 44px; height: 44px; border-radius: 13px; font-size: 15px; }
.adm-tabs { align-self: flex-start; }
.adm-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.adm-k { text-align: left; cursor: pointer; border: 1px solid var(--line); font: inherit; color: inherit; min-width: 0; }
.adm-k .k-v { font-size: 26px; }
.adm-k .k-s { overflow-wrap: anywhere; }
.adm-busca { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); backdrop-filter: var(--blur); }
.adm-busca input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: 600 15px var(--f-body); color: var(--ink); height: 100%; }
.adm-f .chip b { margin-left: 4px; opacity: .65; font-variant-numeric: tabular-nums; }
.adm-ord .seg { flex-wrap: wrap; }
.adm-lista { display: flex; flex-direction: column; gap: 10px; }
.adm-c { display: flex; flex-direction: column; gap: 10px; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); padding: 14px; min-width: 0; width: 100%; }
.adm-c:hover { border-color: var(--accent-mid); }
.adm-c-top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.adm-c-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-c-n b { font-size: 15.5px; }
.adm-c-n small { color: var(--ink-3); font-weight: 650; font-size: 12.5px; }
.adm-c-pills, .adm-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-c-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.adm-c-meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.adm-c-meta .ic { width: 14px; height: 14px; opacity: .7; flex: none; }
.adm-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-acts .btn { flex: 1 1 auto; }
.adm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.adm-sec { padding: 16px; min-width: 0; }
.adm-sec h3 { margin: 0 0 10px; font: 750 15.5px var(--f-display); display: flex; align-items: center; gap: 8px; }
.adm-sec h3 .ic { color: var(--accent); }
.adm-li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; min-width: 0; }
.adm-li:last-child { border-bottom: 0; }
.adm-li span { color: var(--ink-3); font-weight: 650; flex: none; max-width: 48%; }
.adm-li b { flex: 1 1 0; text-align: right; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.adm-li b .pill { max-width: 100%; white-space: normal; height: auto; min-height: 24px; }
.adm-li b small { color: var(--ink-3); font-weight: 650; }
.adm-sub { margin: 14px 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.adm-sec > .adm-sub:first-of-type { margin-top: 2px; }
.adm-sec .btn.block { margin-top: 10px; }
.adm-bars { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; height: 64px; align-items: end; }
.adm-bars i { display: block; border-radius: 4px 4px 2px 2px; background: var(--line-2); min-height: 3px; }
.adm-bars i.on { background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 70%, #fff), var(--accent)); }
.adm-bars-l { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--ink-3); margin-top: 4px; }
.adm-num { display: inline-flex; gap: 6px; align-items: center; }
.adm-num input { width: 86px; height: 32px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-solid); color: var(--ink); padding: 0 10px; font: 700 14px var(--f-body); }
.adm-tpl { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-nota { display: flex; flex-direction: column; gap: 8px; }
.adm-nota textarea { min-height: 76px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-solid); color: var(--ink); padding: 10px 12px; font: 600 14px var(--f-body); resize: vertical; width: 100%; }
.adm-nota .btn { align-self: flex-end; }
.adm-n { position: relative; padding: 10px 36px 10px 0; border-bottom: 1px dashed var(--line); }
.adm-n small { color: var(--ink-3); font-weight: 700; font-size: 11.5px; }
.adm-n p { margin: 2px 0 0; font-weight: 600; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-n .btn { position: absolute; right: 0; top: 8px; }
.adm-erro { padding: 14px; color: var(--todo); font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-load { padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.adm-topo .ic { color: var(--gold); }
.btn.adm-entra .ic { color: currentColor; }
@media (max-width: 860px) {
  .adm-in { padding: 12px 12px calc(32px + env(safe-area-inset-bottom)); gap: 12px; }
  .adm-h { margin: -12px -12px 0; padding-left: 12px; padding-right: 12px; }
  .adm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .adm-k { padding: 12px; }
  .adm-k .k-v { font-size: 21px; }
  .adm-k .k-ic { display: none; }
  .adm-k .k-l, .adm-k .k-s { font-size: 11.5px; }
  .adm-grid { grid-template-columns: minmax(0, 1fr); }
  .adm-h h1 { font-size: 19px; }
  .adm-f { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 0 12px 4px; scrollbar-width: none; }
  .adm-f::-webkit-scrollbar { display: none; }
  .adm-f .chip { flex: none; }
}

/* ===== ver como o cliente ===== */
#ver-bar { position: fixed; z-index: 450; left: 50%; transform: translateX(-50%); top: max(10px, env(safe-area-inset-top)); width: min(640px, calc(100% - 20px));
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 14px; background: linear-gradient(180deg, #E8C276, var(--gold)); color: #2B1D05;
  font-weight: 700; font-size: 13.5px; box-shadow: 0 14px 30px -12px rgba(0,0,0,.45); }
#ver-bar .grow { flex: 1; min-width: 0; }
#ver-bar .btn { background: #2B1D05; color: #F6E2B5; border-color: transparent; flex: none; }
body.ver-on .topbar { padding-top: 64px; }
@media (max-width: 860px) { #ver-bar { font-size: 12.5px; } #ver-bar .btn { padding: 0 11px; } #ver-bar .vb-l { display: none; } #ver-bar .vb-m { display: inline; } }

@media (max-width: 430px) { .present .p-bot .glass-btn .ic { display: none; } .present .p-bot .glass-btn { font-size: 12px; } }

/* conta de demonstração */
body.demo-on #ver-bar { background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 80%, #fff), var(--accent)); color: #fff; }
body.demo-on #ver-bar .btn { background: #fff; color: #063235; }
#ver-bar .vb-m { display: none; }
#ver-bar .vb-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
#ver-bar .vb-t b, #ver-bar .vb-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ver-bar .vb-t small { font-weight: 650; opacity: .85; font-size: 12px; }
.onb-g { align-items: stretch; }
.onb-c b { font-family: var(--f-display); }
.onb-demo { border-color: color-mix(in oklab, var(--gold) 45%, transparent); }
.onb-ok { display: flex; align-items: center; gap: 6px; color: var(--done); font-weight: 700; }
.onb-ok .ic { width: 16px; height: 16px; }
.op-dica { display: flex; align-items: center; gap: 8px; text-align: left; width: 100%; padding: 10px 12px; border-radius: 12px; cursor: pointer; font: 650 13px var(--f-body);
  background: var(--gold-soft); color: var(--ink); border: 1px solid color-mix(in oklab, var(--gold) 40%, transparent); }
.op-dica .ic { color: var(--gold); flex: none; }
.op-dica b { color: var(--gold); }

/* ===== tabelas viram cartões no celular ===== */
@media (max-width: 860px) {
  .tbl-wrap:has(> .tbl-m) { overflow: visible; }
  table.tbl-m, .tbl-m tbody { display: block; width: 100%; }
  .tbl-m thead { display: none; }
  .tbl-m tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-auto-flow: row dense; gap: 3px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: center; }
  .tbl-m tbody tr:last-child { border-bottom: 0; }
  .tbl-m td { display: block; padding: 0; border: 0 !important; min-width: 0; grid-column: 1; }
  .tbl-m td.r { grid-column: 2; justify-self: end; text-align: right; }
  .tbl-m td.hide-m { display: none; }
  .tbl-m td[colspan] { grid-column: 1 / -1; }
  .tbl-m td[data-l]::before { content: attr(data-l); display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1px; }
}

/* ===== videoaulas e instalar ===== */
.aulas-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px; }
.aulas-top b { font: 750 17px var(--f-display); }
.aulas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.aula { display: flex; align-items: center; gap: 14px; padding: 14px; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); min-width: 0; }
.aula:hover { border-color: var(--accent-mid); }
.aula.breve { cursor: default; opacity: .78; }
.aula .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aula small { color: var(--accent); font-weight: 800; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }
.aula b { font-size: 15px; }
.aula-d { color: var(--ink-3); font-weight: 600; font-size: 12.5px; }
.aula-n { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; font: 800 16px var(--f-display); background: var(--accent-soft); color: var(--accent); }
.aula-v { width: 100%; max-height: 70vh; border-radius: 14px; background: #000; display: block; }
.pwa-passos { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
@media (max-width: 860px) { .aulas { grid-template-columns: minmax(0, 1fr); } .aulas-top { flex-direction: column; align-items: stretch; } .aulas-top .btn { width: 100%; } }

/* celular: rolagem (e foco nos campos) para acima da barra de baixo */
@media (max-width: 900px) { html { scroll-padding-bottom: 96px; scroll-padding-top: 70px; } }

/* capa das videoaulas */
.aula-capa { position: relative; flex: none; width: 132px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #071c1e; border: 1px solid var(--line); }
.aula-capa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aula-capa .aula-n { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
@media (max-width: 600px) { .aula-capa { width: 96px; } .aula-capa .aula-n { width: 28px; height: 28px; } }
