/* 00-tokens.css */
/* Orch Digital — tokens do sistema de design (editorial monocromático + champanhe) */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

:root {
  --bg: #FAF8F4;
  --surface: #F3F0EA;
  --surface-2: #ECE7DE;
  --card: #FFFFFF;
  --ink: #141414;
  --ink-2: #6B6760;
  --ink-3: #9C978E;
  --line: #E6E1D8;
  --line-2: #D6CFC3;
  --accent: #A8844F;
  --accent-ink: #7D6033;
  --accent-soft: #F1E9DC;
  --on-ink: #FAF8F4;
  --ok: #2F6F4A;   --ok-soft: #E4F0E8;
  --warn: #9A5A0C; --warn-soft: #FAEEDC;
  --err: #A8322A;  --err-soft: #F9E6E3;
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;

  --fs-xs: .75rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-xl: clamp(1.35rem, 1.1rem + 1vw, 1.6rem);
  --fs-2xl: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --fs-3xl: clamp(2.6rem, 1.8rem + 4vw, 4.4rem);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 28px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(20,20,20,.04);
  --shadow-2: 0 1px 2px rgba(20,20,20,.04), 0 8px 24px -8px rgba(20,20,20,.10);
  --shadow-3: 0 2px 6px rgba(20,20,20,.06), 0 24px 48px -12px rgba(20,20,20,.18);
  --ease: cubic-bezier(.2,.7,.2,1);
  --t-fast: 120ms; --t-med: 220ms; --t-slow: 420ms;
  --sidebar: 248px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211; --surface: #1A1A18; --surface-2: #232320; --card: #1C1C1A;
    --ink: #F3F0EA; --ink-2: #ABA69C; --ink-3: #7A766E; --line: #2C2B28; --line-2: #3A3934;
    --accent: #CFAE7C; --accent-ink: #E3C899; --accent-soft: #2A241A; --on-ink: #121211;
    --ok: #7CC79A; --ok-soft: #16271D; --warn: #E2A75A; --warn-soft: #2B2113; --err: #EE8A80; --err-soft: #2E1715;
    --shadow-2: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -8px rgba(0,0,0,.5);
    --shadow-3: 0 2px 6px rgba(0,0,0,.4), 0 24px 48px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --surface: #1A1A18; --surface-2: #232320; --card: #1C1C1A;
  --ink: #F3F0EA; --ink-2: #ABA69C; --ink-3: #7A766E; --line: #2C2B28; --line-2: #3A3934;
  --accent: #CFAE7C; --accent-ink: #E3C899; --accent-soft: #2A241A; --on-ink: #121211;
  --ok: #7CC79A; --ok-soft: #16271D; --warn: #E2A75A; --warn-soft: #2B2113; --err: #EE8A80; --err-soft: #2E1715;
  --shadow-2: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -8px rgba(0,0,0,.5);
  --shadow-3: 0 2px 6px rgba(0,0,0,.4), 0 24px 48px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* 10-base.css */
/* 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(--ink);
  font: 400 var(--fs-md)/1.55 var(--sans); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0 0 var(--s3); line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
h1 { font: 500 var(--fs-2xl)/1.08 var(--serif); letter-spacing: -.015em; }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
.serif { font-family: var(--serif); font-weight: 500; }
.display { font: 500 var(--fs-3xl)/1 var(--serif); letter-spacing: -.02em; }
p { margin: 0 0 var(--s3); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent); }
img, svg { max-width: 100%; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86em; background: var(--surface); padding: .1em .4em; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
[hidden] { display: none !important; }

.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }
.small { font-size: var(--fs-sm); } .xs { font-size: var(--fs-xs); }
.center { text-align: center; } .nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow { display: block; margin: 0 0 var(--s2); font: 600 .7rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.mark { width: 28px; height: 28px; color: var(--ink); flex: none; }

.row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .row.center { justify-content: center; }
.stack { display: flex; flex-direction: column; gap: var(--s4); }
.stack.tight { gap: var(--s2); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.grow { flex: 1; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } .hide-sm { display: none !important; } }
@media (min-width: 721px) { .show-sm { display: none !important; } }

/* Transições entre páginas (MPA) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}

/* 20-components.css */
/* ---------------------------------------------------------------- Botões */
.btn {
  --b-bg: var(--ink); --b-fg: var(--on-ink); --b-bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s5); border-radius: var(--r-pill);
  border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg);
  font: 600 var(--fs-sm)/1 var(--sans); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-fast) var(--ease), background var(--t-med), border-color var(--t-med), box-shadow var(--t-med), opacity var(--t-med);
}
.btn:hover { box-shadow: var(--shadow-2); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: default; box-shadow: none; transform: none; }
.btn.secondary { --b-bg: var(--card); --b-fg: var(--ink); --b-bd: var(--line-2); }
.btn.ghost { --b-bg: transparent; --b-fg: var(--ink); --b-bd: transparent; }
.btn.ghost:hover { --b-bg: var(--surface); box-shadow: none; }
.btn.accent { --b-bg: var(--accent); --b-fg: #fff; --b-bd: var(--accent); }
.btn.danger { --b-bg: var(--err); --b-fg: #fff; --b-bd: var(--err); }
.btn.danger-ghost { --b-bg: transparent; --b-fg: var(--err); --b-bd: color-mix(in srgb, var(--err) 35%, transparent); }
.btn.sm { min-height: 36px; padding: 0 var(--s4); font-size: .8125rem; }
.btn.lg { min-height: 56px; padding: 0 var(--s6); font-size: var(--fs-md); }
.btn.block { width: 100%; }
.btn.icon-only { width: 40px; min-height: 40px; padding: 0; }
.btn.icon-only.sm { width: 34px; min-height: 34px; }
.btn .icon { width: 1.1em; height: 1.1em; }
.btn.is-busy { pointer-events: none; opacity: .7; }
.btn.is-busy::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn.danger { color: var(--err); }

/* ---------------------------------------------------------------- Campos */
.field { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); font-weight: 500; color: var(--ink); }
.field > .hint { font-weight: 400; color: var(--ink-3); font-size: var(--fs-xs); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--err); }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink);
  font: 400 16px/1.4 var(--sans); transition: border-color var(--t-med), box-shadow var(--t-med);
}
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; padding-right: 38px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--ink); }
input[type=range] { padding: 0; min-height: 28px; border: 0; background: transparent; accent-color: var(--accent); }
input[type=color] { padding: 4px; width: 56px; height: 46px; cursor: pointer; }
input[type=file] { padding: 9px; }
.input-wrap { position: relative; }
.input-wrap > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input-wrap > input { padding-left: 42px; }
.input-wrap > .reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.search { border-radius: var(--r-pill); }
.search.lg { min-height: 56px; font-size: 1.05rem; }
.check { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); cursor: pointer; }
.error { color: var(--err); font-size: var(--fs-sm); margin: 0; display: flex; gap: 6px; align-items: center; }
.strength { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.strength > span { display: block; height: 100%; width: 0; background: var(--err); transition: width var(--t-med), background var(--t-med); }

/* Segmentado (rádio) */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; background: var(--surface); border-radius: var(--r-pill); }
.segmented label { position: relative; display: block; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border-radius: var(--r-pill); color: var(--ink-2); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; transition: background var(--t-med), color var(--t-med), box-shadow var(--t-med); }
.segmented input:checked + span { background: var(--card); color: var(--ink); box-shadow: var(--shadow-2); }
.segmented input:focus-visible + span { box-shadow: var(--focus); }

/* ---------------------------------------------------------------- Superfícies */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow-1); }
.card.flat { box-shadow: none; }
.card.pad-lg { padding: var(--s6); }
.card + .card { margin-top: var(--s4); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.card-head h2, .card-head h3 { margin: 0; }
.section { margin-top: var(--s7); }
.section-title { font: 500 var(--fs-xl)/1.2 var(--serif); margin: 0 0 var(--s4); }
.stack > .hairline { margin: 0; }
.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); border: 0; margin: var(--s6) 0; }
.rule-accent { width: 48px; height: 1px; background: var(--accent); border: 0; margin: var(--s4) auto; }

details.disclosure { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
details.disclosure > summary { list-style: none; cursor: pointer; padding: var(--s4) var(--s5); font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary .icon { transition: transform var(--t-med) var(--ease); color: var(--ink-3); }
details.disclosure[open] > summary .icon { transform: rotate(180deg); }
details.disclosure > .body { padding: 0 var(--s5) var(--s5); }

/* ---------------------------------------------------------------- Badges, chips, avisos */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--r-pill); font: 600 .7rem/1.3 var(--sans); letter-spacing: .02em; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.err { background: var(--err-soft); color: var(--err); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.badge.ink { background: var(--ink); color: var(--on-ink); border-color: transparent; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--ink-3); flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.err { background: var(--err); }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); font: 500 var(--fs-sm)/1 var(--sans); cursor: pointer; white-space: nowrap; text-decoration: none; transition: all var(--t-med); }
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip .n { font-size: .72rem; opacity: .7; font-variant-numeric: tabular-nums; }

.notice { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sm); margin: 0 0 var(--s4); }
.notice .icon { margin-top: 2px; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.err { background: var(--err-soft); color: var(--err); }
.notice.accent { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------------------------------------------------------------- Listas e tabelas */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list.compact > li { padding: var(--s2) 0; font-size: var(--fs-sm); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.table th { position: sticky; top: 0; z-index: 1; background: var(--card); text-align: left; font: 600 .7rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.table th button:focus-visible { box-shadow: var(--focus); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.table tr.is-selected { background: var(--accent-soft) !important; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Indicadores */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: var(--s3); }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.stat strong { font: 500 2.4rem/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: lining-nums; }
.stat strong small { font-size: .5em; color: var(--ink-3); }
.stat span { font-size: var(--fs-xs); color: var(--ink-2); letter-spacing: .02em; }
.stat.accent { background: var(--accent-soft); border-color: transparent; }
.stat.ink { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.stat.ink span { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }

.bar { height: 6px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width var(--t-slow) var(--ease); }
.bar.ink > span { background: var(--ink); }
.bar.lg { height: 10px; }
.ring { width: 64px; height: 64px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: var(--surface-2); }
.ring .val { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset var(--t-slow) var(--ease); }
.ring-wrap { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring-wrap > b { position: absolute; font: 600 .7rem/1 var(--sans); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Estados */
.empty { text-align: center; padding: var(--s7) var(--s5); border: 1px dashed var(--line-2); border-radius: var(--r-xl); background: var(--card); position: relative; overflow: hidden; }
.empty .motif { position: absolute; inset: auto -60px -120px auto; width: 280px; color: var(--line); opacity: .7; pointer-events: none; }
.empty h2 { font: 500 var(--fs-xl)/1.2 var(--serif); }
.empty p { color: var(--ink-2); max-width: 420px; margin: 0 auto var(--s5); }
.loading { display: flex; align-items: center; justify-content: center; gap: var(--s3); padding: var(--s7); color: var(--ink-2); font-size: var(--fs-sm); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-md); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.rise { animation: rise var(--t-slow) var(--ease) both; }

/* ---------------------------------------------------------------- Toasts */
.toasts { position: fixed; z-index: 100; left: 50%; bottom: calc(var(--s5) + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: var(--s2); align-items: center; pointer-events: none; width: min(92vw, 440px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s3); padding: 12px 16px; border-radius: var(--r-md); background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-3); font-size: var(--fs-sm); font-weight: 500; animation: rise var(--t-med) var(--ease) both; width: 100%; }
.toast.err { background: var(--err); color: #fff; }
.toast.ok .icon { color: var(--accent); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: all var(--t-med); }
@media (max-width: 860px) { body.has-bottombar .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* ---------------------------------------------------------------- Diálogos e folhas */
dialog { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: min(560px, calc(100vw - 32px)); width: 100%; }
dialog::backdrop { background: rgba(20,20,20,.38); backdrop-filter: blur(3px); }
dialog[open] { animation: pop var(--t-med) var(--ease); }
.dialog-card { background: var(--card); border-radius: var(--r-xl); padding: var(--s6); box-shadow: var(--shadow-3); border: 1px solid var(--line); max-height: calc(100dvh - 48px); overflow: auto; }
.dialog-card h2 { font: 500 var(--fs-xl)/1.2 var(--serif); }
.dialog-actions { display: flex; gap: var(--s2); justify-content: flex-end; margin-top: var(--s5); flex-wrap: wrap; }
@media (max-width: 640px) {
  dialog.sheet { margin: auto 0 0; max-width: 100vw; }
  dialog.sheet .dialog-card { border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(var(--s6) + env(safe-area-inset-bottom)); }
  dialog.sheet[open] { animation: rise var(--t-med) var(--ease); }
}

/* Menu suspenso */
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > .menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-3); animation: pop var(--t-fast) var(--ease); }
details.menu.left > .menu-pop { left: 0; right: auto; }
details.menu.up > .menu-pop { top: auto; bottom: calc(100% + 6px); }
.menu-pop a, .menu-pop button { display: flex; width: 100%; align-items: center; gap: var(--s3); padding: 10px 12px; border-radius: var(--r-sm); background: none; border: 0; color: var(--ink); font: 500 var(--fs-sm)/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface); }
.menu-pop .sep { height: 1px; background: var(--line); margin: 6px 0; }
.menu-pop .label { padding: 8px 12px 4px; font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.menu-pop form { margin: 0; }

/* Interruptor de tema */
.theme-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--surface); }
.theme-switch button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }

/* QR */
.qr { width: 100%; max-width: 240px; margin: var(--s3) auto; background: #fff; border-radius: var(--r-md); padding: 8px; box-shadow: 0 0 0 1px var(--line); }
.qr svg { width: 100%; height: auto; display: block; }

/* Motivo da marca (arcos concêntricos) */
.motif { color: var(--line-2); }

/* 30-layout.css */
/* ---------------------------------------------------------------- Estrutura da área de gestão */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: var(--s5);
  padding: var(--s5) var(--s4); border-right: 1px solid var(--line); background: var(--bg);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.05rem/1 var(--sans); letter-spacing: .04em; }
.brand .word { font: 500 1.5rem/1 var(--serif); letter-spacing: .01em; }
.sidebar .brand { padding: 0 var(--s2); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: var(--s4) var(--s3) var(--s2); font: 600 .68rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.nav a { display: flex; align-items: center; gap: var(--s3); padding: 9px var(--s3); border-radius: var(--r-md); color: var(--ink-2); font: 500 var(--fs-sm)/1.2 var(--sans); text-decoration: none; transition: background var(--t-fast), color var(--t-fast); min-width: 0; }
.nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.nav a[aria-current="page"] .icon { color: var(--accent); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--s3); padding-top: var(--s4); border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--on-ink); font: 600 .78rem/1 var(--sans); letter-spacing: .02em; }
.user-chip .who { min-width: 0; line-height: 1.25; }
.user-chip .who b { display: block; font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .who span { display: block; font-size: var(--fs-xs); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { width: 100%; max-width: 1180px; margin: 0 auto; padding: var(--s6) var(--s6) var(--s8); flex: 1; }
.content.narrow { max-width: 760px; }
.content.wide { max-width: 1440px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s6); }
.page-head h1 { margin: 0; }
.page-head p { margin: var(--s2) 0 0; color: var(--ink-2); }

/* Cabeçalho do evento + separadores */
.event-head { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--surface) 50%, var(--bg))); }
.event-head-in { max-width: 1180px; margin: 0 auto; padding: var(--s6) var(--s6) 0; }
.event-head-in.wide { max-width: 1440px; }
.event-title { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); }
.event-title h1 { margin: 0; font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.4rem); }
.event-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s2); color: var(--ink-2); font-size: var(--fs-sm); }
.event-meta span { display: inline-flex; align-items: center; gap: 6px; }
.tabs { display: flex; gap: var(--s1); margin-top: var(--s5); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 12px 12px 13px; color: var(--ink-2); text-decoration: none; font: 500 var(--fs-sm)/1 var(--sans); white-space: nowrap; border-bottom: 2px solid transparent; transition: color var(--t-fast), border-color var(--t-fast); }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs a[aria-current="page"] .icon { color: var(--accent); }

/* Barra inferior (telemóvel) */
.bottombar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar {
    display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: var(--s3);
    padding: 10px var(--s4); padding-top: calc(10px + env(safe-area-inset-top));
    background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .content { padding: var(--s5) var(--s4) var(--s8); }
  .topbar .user-chip .who { display: none; }
  .event-head-in { padding: var(--s5) var(--s4) var(--s4); }
  .event-head .tabs { display: none; }
  body.has-bottombar .content { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .bottombar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
    border-top: 1px solid var(--line);
  }
  .bottombar a, .bottombar summary { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: var(--r-md); color: var(--ink-3); font: 500 .68rem/1 var(--sans); text-decoration: none; cursor: pointer; list-style: none; }
  .bottombar summary::-webkit-details-marker { display: none; }
  .bottombar .icon { width: 22px; height: 22px; }
  .bottombar a[aria-current="page"], .bottombar details[open] summary, .bottombar summary[aria-current="page"] { color: var(--ink); }
  .bottombar a[aria-current="page"] .icon { color: var(--accent); }
  .bottombar details > .menu-pop { right: 6px; bottom: calc(100% + 10px); top: auto; min-width: 230px; }
  .bottombar details { position: static; }
}

/* Páginas públicas (sem barra lateral) */
.public-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); max-width: 1180px; margin: 0 auto; padding: var(--s5) var(--s5); }
.public-foot { border-top: 1px solid var(--line); margin-top: var(--s8); }
.public-foot .in { max-width: 1180px; margin: 0 auto; padding: var(--s6) var(--s5); display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; color: var(--ink-2); font-size: var(--fs-sm); }

/* 40-pages.css */
/* ================================================================ Início */
.landing-page { overflow-x: hidden; }
.hero { position: relative; text-align: center; padding: var(--s8) var(--s5) calc(var(--s8) * 1.5); overflow: hidden; }
.hero-motif { position: absolute; width: min(620px, 130vw); left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--line); opacity: .45; pointer-events: none; -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 72%); mask-image: radial-gradient(circle, #000 35%, transparent 72%); }
.hero-in { position: relative; max-width: 820px; margin: 0 auto; }
.hero .display { margin: var(--s4) 0 var(--s5); }
.hero .display em { font-style: italic; color: var(--accent-ink); }
.lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--ink-2); max-width: 620px; margin: 0 auto var(--s6); }
.landing-section { max-width: 1180px; margin: 0 auto; padding: var(--s8) var(--s5); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto var(--s7); }
.section-head .section-title { font-size: var(--fs-2xl); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); counter-reset: s; }
.step-card { position: relative; padding: var(--s6) var(--s5); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med); }
.step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.step-n { position: absolute; top: var(--s4); right: var(--s5); font: 500 1.6rem/1 var(--serif); color: var(--line-2); }
.step-icon { width: 28px; height: 28px; color: var(--accent); margin-bottom: var(--s4); }
.step-card h3 { font: 600 var(--fs-md)/1.3 var(--sans); }
.step-card p { color: var(--ink-2); font-size: var(--fs-sm); margin: 0; }
.band { background: var(--ink); color: var(--on-ink); }
.band-in { max-width: 1180px; margin: 0 auto; padding: var(--s8) var(--s5); display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s7); align-items: center; }
.band .eyebrow { color: var(--accent); }
.band .section-title { font-size: var(--fs-2xl); color: var(--on-ink); }
.band p { color: color-mix(in srgb, var(--on-ink) 72%, transparent); }
.band-demo { display: flex; flex-direction: column; gap: var(--s3); }
.demo-flash { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--s6); border-radius: var(--r-xl); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-3); }
.demo-flash strong { font: 500 1.8rem/1.1 var(--serif); }
.demo-table { font: 600 2.6rem/1 var(--serif); color: var(--accent-ink); margin-top: var(--s2); }
.demo-status { display: flex; align-items: center; justify-content: center; gap: var(--s2); font-size: var(--fs-sm); padding: 10px; border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, var(--on-ink) 18%, transparent); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.feature { background: var(--card); padding: var(--s6); }
.feature > .icon { width: 24px; height: 24px; color: var(--accent); margin-bottom: var(--s3); }
.feature h3 { margin-bottom: var(--s2); }
.feature p { color: var(--ink-2); font-size: var(--fs-sm); margin: 0; }
.cta { position: relative; overflow: hidden; text-align: center; margin: 0 var(--s5) var(--s8); padding: var(--s8) var(--s5); border-radius: var(--r-xl); background: var(--accent-soft); }
.cta .display { font-size: var(--fs-2xl); margin-bottom: var(--s5); position: relative; }
.cta .btn { position: relative; }
.cta-motif { position: absolute; width: 520px; right: -140px; bottom: -220px; color: color-mix(in srgb, var(--accent) 22%, transparent); }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } .features { grid-template-columns: repeat(2, 1fr); } .band-in { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .steps, .features { grid-template-columns: 1fr; } .hero { padding-top: var(--s7); } .public-top .btn.ghost { display: none; } .public-top .theme-switch { display: none; } }

/* ================================================================ Autenticação */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100dvh; }
.auth-art { position: relative; overflow: hidden; background: var(--ink); color: var(--on-ink); display: flex; align-items: flex-end; padding: var(--s7); }
.auth-motif { position: absolute; width: 140%; left: -20%; top: -10%; color: color-mix(in srgb, var(--on-ink) 8%, transparent); }
.auth-quote { position: relative; }
.auth-quote .eyebrow { color: var(--accent); }
.auth-quote p { font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem); line-height: 1.05; margin: 0; }
.auth-main { display: flex; flex-direction: column; padding: var(--s5) var(--s6); }
.auth-top { display: flex; justify-content: space-between; align-items: center; }
.auth-box { width: 100%; max-width: 400px; margin: auto; padding: var(--s7) 0; }
.auth-box h1 { margin-bottom: var(--s2); }
.auth-box > p { margin-bottom: var(--s6); }
.auth-links { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s5); font-size: var(--fs-sm); color: var(--ink-2); }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } .auth-main { padding: var(--s4); } }

.center-page { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3); text-align: center; padding: var(--s5); }
.mark-lg { width: 56px; height: 56px; color: var(--ink); }
.mark-xl { width: 88px; height: 88px; color: var(--ink); }

/* ================================================================ Painel de eventos */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--s5); }
.event-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; text-decoration: none; transition: transform var(--t-med) var(--ease), box-shadow var(--t-med); }
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
.event-cover { position: relative; aspect-ratio: 16 / 8; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.event-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.event-card:hover .event-cover img { transform: scale(1.03); }
.cover-motif { width: 62%; color: var(--line-2); opacity: .6; transform: translateY(18%); }
.cover-badge { position: absolute; top: var(--s3); left: var(--s3); }
.event-body { padding: var(--s5); display: flex; flex-direction: column; gap: 2px; flex: 1; }
.event-body h3 { font-size: 1.6rem; line-height: 1.1; margin: 0 0 var(--s1); }
.event-foot { display: flex; align-items: center; gap: var(--s3); margin-top: auto; padding-top: var(--s4); border-top: 1px solid var(--line); }
.event-grid.past .event-card { opacity: .75; }

/* ================================================================ Resumo do evento */
.stat-ring { position: relative; }
.stat-ring > div { display: flex; flex-direction: column; gap: 2px; }
.stat-ring > .ring-wrap { position: absolute; top: 12px; right: 12px; }
.overview-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--s4); margin-top: var(--s5); align-items: start; }
@media (max-width: 900px) { .overview-grid { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: var(--s4) 0 0; }
.checklist li a { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s2); border-radius: var(--r-md); text-decoration: none; transition: background var(--t-fast); }
.checklist li a:hover { background: var(--surface); }
.checklist li a > span.grow { display: flex; flex-direction: column; }
.checklist li a > .icon { color: var(--ink-3); }
.check-dot { width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed var(--line-2); display: grid; place-items: center; flex: none; }
.checklist li.done .check-dot { border: 0; background: var(--ink); color: var(--on-ink); }
.checklist li.done b { color: var(--ink-2); font-weight: 500; }
.check-dot .icon { width: 14px; height: 14px; stroke-width: 2.5; }
.chart { width: 100%; height: 110px; display: block; margin-bottom: var(--s2); }
.chart .bar-yes { fill: var(--accent); }
.chart .bar-no { fill: var(--line-2); }
.legend { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.legend.yes { background: var(--accent); } .legend.no { background: var(--line-2); }
.danger-zone { margin-top: var(--s4); border-color: color-mix(in srgb, var(--err) 25%, var(--line)); }
.danger-zone > summary { color: var(--err); }

/* ================================================================ Convidados */
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.help { margin-bottom: var(--s4); }
.help > summary { font-weight: 500; color: var(--ink-2); padding: var(--s3) var(--s4); justify-content: flex-start; }
.help > summary .icon:last-child { margin-left: auto; }
.toolbar { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; margin-bottom: var(--s3); }
.toolbar .input-wrap.grow { flex: 1; min-width: 220px; }
select.pill { width: auto; min-height: 36px; padding: 0 34px 0 14px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 500; background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; }
select.rsvp-yes { background-color: var(--ok-soft); color: var(--ok); border-color: transparent; }
select.rsvp-no { background-color: var(--err-soft); color: var(--err); border-color: transparent; }
select.rsvp-pending { background-color: var(--warn-soft); color: var(--warn); border-color: transparent; }
#guest-filters { margin-bottom: var(--s4); }
.bulkbar { position: sticky; top: var(--s3); z-index: 15; display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: 10px var(--s4); margin-bottom: var(--s3); border-radius: var(--r-pill); background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-3); animation: rise var(--t-med) var(--ease); }
.bulkbar select { background-color: var(--card); color: var(--ink); }
.bulkbar .btn.ghost { --b-fg: var(--on-ink); }
.bulkbar .btn:not(.ghost) { --b-bg: var(--accent); --b-bd: var(--accent); --b-fg: #fff; }
.table td.sel, .table th.sel { width: 44px; padding-right: 0; }
.g-who { display: flex; align-items: flex-start; gap: var(--s3); }
.g-who > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.avatar.sm { width: 32px; height: 32px; font-size: .7rem; background: var(--surface-2); color: var(--ink-2); }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.g-diet { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); }
.g-note { font-style: italic; }
.g-actions { white-space: nowrap; text-align: right; }
.g-actions > * { vertical-align: middle; }
.g-actions details.menu { display: inline-block; }
.menu-pop .danger { color: var(--err); }
.row-warn td { background: color-mix(in srgb, var(--warn-soft) 60%, transparent); }
.row-muted td { opacity: .55; }
#guest-count { margin-top: var(--s3); }
@media (max-width: 760px) {
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { position: relative; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
  .table.responsive td { border: 0; padding: 4px 0; }
  .table.responsive td[data-label] { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
  .table.responsive td[data-label]::before { content: attr(data-label); font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
  .table.responsive td.g-name::before { display: none; }
  .table.responsive td.sel { position: absolute; right: var(--s4); top: var(--s4); width: auto; }
  .table.responsive td.g-actions { text-align: left; padding-top: var(--s2); }
  .guests-table td.g-name { padding-right: 36px; }
}

/* ================================================================ Salão */
.floor-toolbar { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.tool-group { display: inline-flex; gap: 4px; align-items: center; padding: 4px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line); }
.tool-group [aria-pressed="true"] { --b-bg: var(--surface-2); }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s4); align-items: start; }
.floor-viewport { overflow: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); max-height: 78vh; }
.floor-viewport > svg { display: block; min-width: 100%; transition: width var(--t-med) var(--ease); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); position: sticky; top: var(--s5); max-height: 80vh; overflow: auto; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-empty { text-align: center; padding: var(--s5) 0; color: var(--ink-3); }
.panel-empty .icon { width: 32px; height: 32px; margin-bottom: var(--s3); }
@media (max-width: 960px) { .editor { grid-template-columns: 1fr; } .panel { position: static; max-height: none; } }

.floor { width: 100%; height: auto; display: block; user-select: none; -webkit-user-select: none; }
.hall-bg { fill: var(--surface); stroke: var(--line-2); stroke-width: 2; }
.hall-grid { display: none; pointer-events: none; }
.show-grid .hall-grid { display: inline; }
.grid-line { fill: none; stroke: var(--line-2); stroke-width: 1; opacity: .5; }
.floor .table { fill: var(--card); stroke: var(--ink); stroke-width: 1.75; }
.floor .chair { fill: var(--card); stroke: var(--ink-3); stroke-width: 1.5; transition: fill var(--t-slow), stroke var(--t-slow); }
.floor .chair.taken { fill: var(--accent); stroke: var(--accent); }
.floor .tlabel { font: 600 15px var(--sans); fill: var(--ink); pointer-events: none; }
.floor .elabel { font: 500 13px var(--sans); fill: var(--ink-2); pointer-events: none; letter-spacing: .08em; text-transform: uppercase; }
.floor .element { fill: transparent; stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 6 5; }
.floor .el-dance { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.floor .el-stage { fill: color-mix(in srgb, var(--ink) 7%, transparent); }
.floor .el-bar { fill: color-mix(in srgb, var(--ink) 4%, transparent); }
.floor .item { transition: opacity var(--t-slow); }
.floor .item.dim { opacity: .3; }
.floor .item.hl .table { fill: var(--accent); stroke: var(--accent); animation: pulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.floor .item.hl .tlabel { fill: #fff; }
.floor .item.full .table { stroke: var(--ok); stroke-width: 3; }
@keyframes pulse { 50% { transform: scale(1.07); } }
.editing .item { cursor: grab; touch-action: none; }
.editing .item:active { cursor: grabbing; }
.editing .item.sel .table, .editing .item.sel .element { stroke: var(--accent); stroke-width: 3.5; }
.editing .item.over .table { stroke: var(--err); stroke-width: 3; }

/* ================================================================ Partilhar */
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); align-items: start; }
.poster { text-align: center; padding: var(--s6); }
.poster h2 { font-size: var(--fs-2xl); margin-bottom: var(--s2); }
.card-head h2 { display: flex; align-items: center; gap: var(--s2); }
@media (max-width: 860px) { .share-grid { grid-template-columns: 1fr; } }

/* ================================================================ Impressão */
.print-body { background: #fff; color: #141414; }
.print-page { max-width: 1040px; margin: 0 auto; padding: var(--s5); }
.print-toolbar { display: flex; align-items: center; gap: var(--s3); justify-content: space-between; flex-wrap: wrap; margin-bottom: var(--s5); padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.print-head { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s5); }
.print-head h1 { font-size: 2rem; margin: 0; }
.print-head p { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.print-card { display: flex; align-items: center; gap: var(--s3); border: 1px solid #ddd6ca; border-radius: 10px; padding: 12px; break-inside: avoid; }
.print-card .qr { width: 92px; margin: 0; padding: 0; box-shadow: none; flex: none; }
.print-card > div:last-child { display: flex; flex-direction: column; min-width: 0; }
.print-card .eyebrow { font-size: .55rem; margin: 0 0 2px; }
.print-card strong { font: 600 1rem/1.2 var(--sans); }
.print-card .tbl { font: 500 1.35rem/1.2 var(--serif); }
.print-list-wrap { columns: 2; column-gap: var(--s6); }
.print-letter { break-inside: avoid-column; margin-bottom: var(--s4); }
.print-letter h2 { font: 500 1.5rem/1 var(--serif); border-bottom: 1px solid #141414; padding-bottom: 4px; margin-bottom: 4px; }
.print-list { width: 100%; border-collapse: collapse; font-size: .85rem; }
.print-list td { padding: 5px 4px; border-bottom: 1px solid #eee; }
.print-list td.box { width: 16px; } .print-list td.box::before { content: ""; display: inline-block; width: 12px; height: 12px; border: 1px solid #888; border-radius: 3px; vertical-align: middle; }
.print-list td.tbl { text-align: right; font-weight: 600; white-space: nowrap; }
.poster-print { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--s3); }
.poster-print .display { font-size: 3.4rem; }
.poster-print .qr { max-width: 340px; box-shadow: none; }
@media (max-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } .print-list-wrap { columns: 1; } }
@media print {
  @page { margin: 12mm; }
  .no-print { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .print-page { padding: 0; max-width: none; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .toasts { display: none; }
}

/* ================================================================ Check-in */
.checkin { max-width: 640px; margin: 0 auto; }
.ci-bar { display: flex; align-items: center; gap: var(--s3); padding: 8px 8px 8px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-pill); margin-bottom: var(--s4); }
.ci-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--fs-sm); }
.ci-prepare { padding: var(--s7) var(--s5); }
.icon-xl { width: 44px; height: 44px; margin: 0 auto; color: var(--accent); stroke-width: 1.4; }
.icon.accent { color: var(--accent); }
.ci-counter { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.ci-counter > div:first-child { display: flex; flex-direction: column; }
.ci-counter strong { font: 500 3rem/1 var(--serif); font-variant-numeric: lining-nums; }
.ci-counter span { font-size: var(--fs-sm); color: var(--ink-2); }
.scanner { position: relative; display: none; border-radius: var(--r-xl); overflow: hidden; background: #000; margin-bottom: var(--s3); aspect-ratio: 1; }
.scanner.active { display: block; animation: pop var(--t-med) var(--ease); }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 18%; border-radius: 22px; box-shadow: 0 0 0 999px rgba(0,0,0,.42); border: 2px solid rgba(255,255,255,.9); }
.scanner .frame::after { content: ""; position: absolute; left: 8%; right: 8%; height: 2px; top: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); animation: scan 2.2s ease-in-out infinite; }
@keyframes scan { 0%, 100% { transform: translateY(-110px); } 50% { transform: translateY(110px); } }
#ci-scan { margin-bottom: var(--s3); }
.flash { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: var(--s6) var(--s5); border-radius: var(--r-xl); margin: var(--s3) 0 var(--s4); cursor: pointer; animation: pop var(--t-med) var(--ease); }
.flash .eyebrow { color: inherit; margin: 0; opacity: .9; }
.flash-icon { width: 34px; height: 34px; margin-bottom: 4px; }
.flash-name { font: 500 2rem/1.1 var(--serif); }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash.err { background: var(--err-soft); color: var(--err); }
.flash .row { margin-top: var(--s3); }
.flash-table { margin-top: var(--s3); padding: var(--s3) var(--s6); border-radius: var(--r-lg); background: var(--card); color: var(--ink); display: flex; flex-direction: column; box-shadow: var(--shadow-2); }
.flash-table span { font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.flash-table strong { font: 600 2.6rem/1 var(--serif); }
.results { list-style: none; padding: 0; margin: var(--s3) 0; display: flex; flex-direction: column; gap: 6px; }
.result { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); text-align: left; padding: 12px 16px; min-height: 60px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.result:hover { border-color: var(--ink-3); }
.result > span { display: flex; flex-direction: column; font-weight: 600; }
.result > span .icon { color: var(--ok); display: inline; margin-right: 4px; }
.result small { font-weight: 400; color: var(--ink-2); font-size: var(--fs-xs); }
.result strong { font: 500 1.35rem/1 var(--serif); white-space: nowrap; }
.result.done { opacity: .65; }
.result.on { border-color: var(--accent); background: var(--accent-soft); }
.ci-recent { margin-top: var(--s5); }
.checkin.kiosk { max-width: none; padding: var(--s5) max(var(--s5), calc((100vw - 720px) / 2)); background: var(--bg); overflow: auto; }
.checkin.kiosk .flash-name { font-size: 2.8rem; }
.checkin.kiosk .flash-table strong { font-size: 3.6rem; }

/* ================================================================ Ao vivo */
.live-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s4); }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
.dot.pulse { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.live-hero { display: grid; grid-template-columns: auto 1fr; gap: var(--s6); align-items: center; padding: var(--s6); border-radius: var(--r-xl); background: var(--ink); color: var(--on-ink); margin-bottom: var(--s4); }
.live-num { display: flex; flex-direction: column; }
.live-num strong { font: 500 clamp(4rem, 3rem + 6vw, 8rem)/.9 var(--serif); letter-spacing: -.03em; }
.live-num span { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }
.live-side { display: flex; flex-direction: column; gap: var(--s3); }
.live-hero .bar { background: color-mix(in srgb, var(--on-ink) 14%, transparent); }
.live-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--s4); align-items: start; }
.table-live { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.table-live li { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); font-size: var(--fs-sm); }
.table-live li .bar { grid-column: 1 / -1; }
.table-live li.full { border-color: var(--ok); background: var(--ok-soft); }
.live.tv { background: var(--bg); padding: var(--s6); overflow: auto; }
.live.tv .live-num strong { font-size: 10rem; }
@media (max-width: 900px) { .live-cols { grid-template-columns: 1fr; } .live-hero { grid-template-columns: 1fr; gap: var(--s4); } }

/* ================================================================ Páginas públicas: temas do convite */
.theme-classico, .theme-jardim {
  --bg: #FAF8F4; --surface: #F3F0EA; --surface-2: #ECE7DE; --card: #FFFFFF; --ink: #141414; --ink-2: #6B6760; --ink-3: #9C978E;
  --line: #E6E1D8; --line-2: #D6CFC3; --on-ink: #FAF8F4; --accent-soft: #F1E9DC;
  --ok: #2F6F4A; --ok-soft: #E4F0E8; --warn: #9A5A0C; --warn-soft: #FAEEDC; --err: #A8322A; --err-soft: #F9E6E3;
  color-scheme: light;
}
.theme-classico { --accent: #A8844F; --accent-ink: #7D6033; }
.theme-jardim { --bg: #F2F1EA; --surface: #E8E8DE; --line: #DCDDD0; --line-2: #C9CBBA; --accent: #5E7356; --accent-ink: #4A5C43; --accent-soft: #E3E8DC; }
.theme-noite {
  --bg: #121211; --surface: #1A1A18; --surface-2: #232320; --card: #1C1C1A; --ink: #F3F0EA; --ink-2: #ABA69C; --ink-3: #7A766E;
  --line: #2C2B28; --line-2: #3A3934; --accent: #CFAE7C; --accent-ink: #E3C899; --accent-soft: #2A241A; --on-ink: #121211;
  --ok: #7CC79A; --ok-soft: #16271D; --warn: #E2A75A; --warn-soft: #2B2113; --err: #EE8A80; --err-soft: #2E1715;
  color-scheme: dark;
}
body.public { background: var(--bg); color: var(--ink); }

.invite { max-width: 560px; margin: 0 auto; padding: 0 var(--s4) var(--s7); display: flex; flex-direction: column; gap: var(--s4); }
.inv-hero { position: relative; margin: 0 calc(var(--s4) * -1); padding: var(--s8) var(--s5) var(--s7); text-align: center; overflow: hidden; color: var(--ink); }
.inv-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 0%, var(--accent-soft), transparent 70%); }
.inv-hero.has-cover { min-height: 520px; display: flex; align-items: flex-end; justify-content: center; color: #fff; }
.inv-hero.has-cover::before { background: linear-gradient(180deg, rgba(0,0,0,.05) 20%, rgba(0,0,0,.65) 100%); z-index: 1; }
.inv-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inv-hero-in { position: relative; z-index: 2; }
.inv-hero.has-cover .eyebrow, .inv-hero.has-cover .inv-sub, .inv-hero.has-cover .inv-date { color: #fff; }
.inv-hero.has-cover .rule-accent { background: #fff; opacity: .7; }
.monogram { width: 76px; height: 76px; margin: 0 auto var(--s4); border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; font: 500 1.6rem/1 var(--serif); letter-spacing: .02em; position: relative; }
.monogram::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px solid currentColor; opacity: .35; }
.inv-mark { width: 44px; height: 44px; margin: 0 auto var(--s4); display: block; color: var(--ink); }
.inv-title { font: 500 clamp(2.6rem, 2rem + 4vw, 3.8rem)/1 var(--serif); letter-spacing: -.02em; margin: var(--s2) 0; }
.inv-sub { color: var(--ink-2); margin: 0; }
.inv-date { font-size: var(--fs-md); color: var(--ink-2); line-height: 1.6; margin: 0; }
.inv-date strong { font: 500 1.5rem/1.3 var(--serif); color: inherit; }
.inv-hero.has-cover .inv-date strong { color: #fff; }
.countdown { display: inline-flex; gap: var(--s5); margin-top: var(--s5); padding: var(--s3) var(--s5); border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.countdown span { display: flex; flex-direction: column; align-items: center; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.countdown b { font: 500 1.6rem/1.1 var(--serif); letter-spacing: 0; opacity: 1; }
.countdown-now { font: 500 1.3rem/1 var(--serif); text-transform: none; letter-spacing: 0; }
.inv-letter { text-align: center; padding: var(--s6) var(--s5); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-2); }
.inv-dear { color: var(--ink-2); }
.inv-message { font: italic 500 1.4rem/1.45 var(--serif); white-space: pre-line; margin: var(--s4) 0 var(--s5); }
.inv-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); margin: 0 0 var(--s5); text-align: left; border-top: 1px solid var(--line); padding-top: var(--s5); }
.inv-facts div { display: flex; flex-direction: column; gap: 2px; }
.inv-facts dt { display: flex; align-items: center; gap: 6px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.inv-facts dd { margin: 0; font-weight: 500; display: flex; flex-direction: column; }
.inv-actions { gap: var(--s2); }
.inv-rsvp { border-radius: var(--r-xl); padding: var(--s6) var(--s5); display: flex; flex-direction: column; gap: var(--s4); }
.rsvp-state { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); border-radius: var(--r-lg); background: var(--surface); }
.rsvp-state.ok { background: var(--ok-soft); color: var(--ok); }
.rsvp-state > .icon { width: 24px; height: 24px; margin-top: 2px; }
.rsvp-state div { display: flex; flex-direction: column; }
.rsvp-state span { font-size: var(--fs-sm); opacity: .9; }
.rsvp-form:has(input[name=status][value=no]:checked) .only-yes { display: none; }
.inv-foot { display: flex; align-items: center; justify-content: center; gap: var(--s2); color: var(--ink-3); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; padding-top: var(--s5); }
.inv-foot .mark { width: 18px; height: 18px; color: var(--ink-3); }
@media (max-width: 480px) { .inv-facts { grid-template-columns: 1fr; } .inv-hero.has-cover { min-height: 460px; } }

/* Passe */
.pass-page .invite { padding-top: var(--s6); }
.ticket { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-3); overflow: hidden; text-align: center; }
.ticket-top { padding: var(--s6) var(--s5) var(--s5); background: radial-gradient(120% 120% at 50% 0%, var(--accent-soft), transparent 70%); }
.ticket-top h1 { font-size: 2.2rem; margin: var(--s2) 0; }
.ticket-cut { position: relative; height: 0; border-top: 2px dashed var(--line-2); margin: 0 var(--s5); }
.ticket-cut::before, .ticket-cut::after { content: ""; position: absolute; top: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.ticket-cut::before { left: calc(var(--s5) * -1 - 14px); } .ticket-cut::after { right: calc(var(--s5) * -1 - 14px); }
.ticket-body { padding: var(--s5) var(--s5) var(--s6); }
.ticket-name { font-weight: 600; font-size: var(--fs-lg); margin: 0; }
.table-badge { display: inline-flex; flex-direction: column; padding: var(--s3) var(--s6); border-radius: var(--r-lg); background: var(--accent-soft); margin-top: var(--s3); }
.table-badge span { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.table-badge strong { font: 600 2rem/1.1 var(--serif); }
.map-card { padding: var(--s4); }
.map-card .eyebrow { margin-bottom: var(--s3); }

/* Encontre o seu lugar */
.find-head { text-align: center; padding: var(--s7) 0 var(--s4); }
.find-head .monogram { color: var(--ink); }
.find-head .display { font-size: clamp(2.4rem, 2rem + 3vw, 3.4rem); margin-top: var(--s2); }
.find-search { position: sticky; top: var(--s3); z-index: 5; }
.find-search .search { box-shadow: var(--shadow-2); }

/* ================================================================ Editor do convite */
.editor-split { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: var(--s5); align-items: start; }
.theme-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-top: var(--s2); }
.theme-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; font-size: var(--fs-sm); font-weight: 500; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.theme-card input { position: absolute; opacity: 0; }
.theme-card:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.theme-card:has(input:focus-visible) { box-shadow: var(--focus); }
.swatch { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-md); display: grid; place-items: center; font: 500 1.6rem/1 var(--serif); border: 1px solid var(--line); }
.cover-thumb { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--r-md); }
.danger-text { color: var(--err) !important; }
.preview-pane { position: sticky; top: var(--s5); }
.preview-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s2); }
.phone { border-radius: 38px; padding: 10px; background: var(--ink); box-shadow: var(--shadow-3); }
.invite-preview { border-radius: 30px; overflow: hidden auto; max-height: 72vh; background: var(--bg); color: var(--ink); padding: 0 var(--s4) var(--s5); scrollbar-width: none; }
.invite-preview .inv-hero { padding-top: var(--s7); }
.invite-preview .inv-hero.has-cover { min-height: 380px; }
.invite-preview .inv-title { font-size: 2.6rem; }
.invite-preview .inv-letter { box-shadow: none; }
@media (max-width: 1100px) { .editor-split { grid-template-columns: 1fr; } .preview-pane { position: static; max-width: 420px; margin: 0 auto; width: 100%; } }

/* ================================================================ Enviar */
.send-progress { margin-bottom: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.big-num { font-size: 2.4rem; }
.send-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s4); align-items: start; }
.send-current { text-align: center; padding: var(--s6); display: flex; flex-direction: column; gap: var(--s3); position: sticky; top: var(--s5); }
.send-name { font-size: 2.2rem; margin: 0; }
.send-msg { margin: 0; padding: var(--s4); border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 4px; background: var(--surface); text-align: left; white-space: pre-line; font-size: var(--fs-sm); }
.btn.whatsapp { --b-bg: #1F7A4D; --b-bd: #1F7A4D; --b-fg: #fff; }
.send-done { display: flex; flex-direction: column; align-items: center; gap: var(--s3); padding: var(--s5) 0; }
.send-queue { list-style: none; padding: 0; margin: 0; max-height: 52vh; overflow: auto; }
.send-queue li { display: flex; align-items: center; gap: var(--s3); padding: 9px 10px; border-radius: var(--r-md); cursor: pointer; font-size: var(--fs-sm); }
.send-queue li > span:first-child { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: .72rem; flex: none; }
.send-queue li.on { background: var(--accent-soft); }
.send-queue li.done > span:first-child { background: var(--ok); color: #fff; }
.send-queue li.done .grow { color: var(--ink-3); text-decoration: line-through; }
.send-queue li.skipped .grow { color: var(--ink-3); }
.flat-d { border: 0; background: transparent; }
.flat-d > summary { padding: 0; justify-content: flex-start; gap: var(--s2); }
.flat-d > summary .icon:last-child { margin-left: auto; }
.flat-d > .body { padding: var(--s3) 0 0; }
@media (max-width: 900px) { .send-grid { grid-template-columns: 1fr; } .send-current { position: static; } }

/* ================================================================ Conta e organização */
.role-help { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-bottom: var(--s4); }
.role-help > div { padding: var(--s4); border-radius: var(--r-lg); background: var(--surface); display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); }
.role-help b { display: flex; align-items: center; gap: 6px; }
.role-help span { color: var(--ink-2); }
form.autosubmit { margin: 0; }
@media (max-width: 720px) { .role-help { grid-template-columns: 1fr; } }
