/* Zelo · Patrimônio FIEC — interface */
:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-d: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-m: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --r: 20px; --r-sm: 12px;
  --rail: 264px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);

  --bg: #06070b; --bg-2: #0b0d15;
  --surface: rgba(255, 255, 255, .032); --surface-2: rgba(255, 255, 255, .058); --surface-3: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .075); --line-2: rgba(255, 255, 255, .14);
  --tx: #eef0f7; --tx-2: #a5aabd; --tx-3: #6b7087;
  --c-brand: #ff3b4e; --c-brand-2: #d4145a; --c-violet: #a78bfa; --c-cyan: #2ee6f6; --c-green: #2ee59d; --c-amber: #ffb547; --c-red: #ff5a6a;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --glass: rgba(14, 16, 24, .62);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f4f8; --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, .72); --surface-2: rgba(255, 255, 255, .92); --surface-3: rgba(10, 14, 30, .06);
  --line: rgba(14, 18, 40, .08); --line-2: rgba(14, 18, 40, .16);
  --tx: #10131f; --tx-2: #4d5368; --tx-3: #868b9f;
  --c-brand: #e3132b; --c-brand-2: #b80f4e; --c-violet: #7c4dff; --c-cyan: #0596b0; --c-green: #0a9e67; --c-amber: #c27400; --c-red: #d92638;
  --shadow: 0 24px 50px -28px rgba(20, 24, 50, .35);
  --glass: rgba(255, 255, 255, .72);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--tx);
  font: 15px/1.5 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  opacity: 0; transition: opacity .4s;
}
body.pronto { opacity: 1; }
body.scanning { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-d); letter-spacing: -.02em; margin: 0; line-height: 1.15; }
p { margin: 0; }
.mono { font-family: var(--font-m); letter-spacing: .02em; }
.muted { color: var(--tx-2); }
.small { font-size: 13px; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.big { width: 34px; height: 34px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--c-cyan); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--c-brand) 40%, transparent); }

/* ---------- Fundo ---------- */
.bg-aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bg-aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; animation: deriva 26s var(--ease) infinite alternate; }
.bg-aurora i:nth-child(1) { width: 52vmax; height: 52vmax; left: -14vmax; top: -18vmax; background: radial-gradient(circle, #ff2a44 0, transparent 62%); }
.bg-aurora i:nth-child(2) { width: 46vmax; height: 46vmax; right: -16vmax; top: 6vmax; background: radial-gradient(circle, #6a2bd9 0, transparent 62%); animation-duration: 32s; animation-delay: -8s; }
.bg-aurora i:nth-child(3) { width: 40vmax; height: 40vmax; left: 30vmax; bottom: -22vmax; background: radial-gradient(circle, #0fb5d6 0, transparent 62%); opacity: .28; animation-duration: 38s; }
[data-theme="light"] .bg-aurora i { opacity: .16; }
@keyframes deriva { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); } }
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .5;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0, transparent 75%);
}

/* ---------- Estrutura ---------- */
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 20;
  display: none; flex-direction: column; gap: 22px; padding: 22px 16px;
  border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(20px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px; }
.brand-mark { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 6px 18px rgba(255, 40, 70, .45)); }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-txt b { font: 700 20px var(--font-d); letter-spacing: -.03em; }
.brand-txt small { color: var(--tx-3); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--tx-2); font-weight: 500; transition: .2s var(--ease); position: relative; }
.rail-nav a:hover { background: var(--surface-2); color: var(--tx); }
.rail-nav a.on { color: var(--tx); background: linear-gradient(90deg, color-mix(in srgb, var(--c-brand) 18%, transparent), transparent); }
.rail-nav a.on::before { content: ''; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--c-brand); box-shadow: 0 0 14px var(--c-brand); }
.rail-nav a.on .ic { color: var(--c-brand); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.rail-scan { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 14px; border: 0; border-radius: 14px; cursor: pointer; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--c-brand), var(--c-brand-2)); box-shadow: 0 12px 30px -10px var(--c-brand); }
.rail-scan kbd { font: 600 11px var(--font-m); padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .2); }
.rail-sig { color: var(--tx-3); font-size: 12px; text-align: center; }

.main { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line);
}
.brand-sm { padding: 0; gap: 8px; }
.brand-sm .brand-mark { width: 32px; height: 32px; }
.brand-sm b { font: 700 18px var(--font-d); letter-spacing: -.03em; }
.topbar-title { display: none; font: 600 15px var(--font-d); color: var(--tx-2); }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; min-width: 0; }
.ctx-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 58vw; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface-2); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.ctx-chip span { overflow: hidden; text-overflow: ellipsis; }
.ctx-chip .ic { width: 16px; height: 16px; color: var(--c-cyan); }
.ctx-chip.vazio { border-style: dashed; color: var(--tx-2); }
.net.off { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--c-amber); padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c-amber) 12%, transparent); }
.net .ic { width: 15px; height: 15px; }

.view { max-width: 1240px; margin: 0 auto; padding: 20px 16px calc(120px + var(--safe-b)); display: flex; flex-direction: column; gap: 18px; outline: none; }
.view.enter > * { animation: subir .5s var(--ease) both; }
.view.enter > *:nth-child(2) { animation-delay: 40ms; } .view.enter > *:nth-child(3) { animation-delay: 80ms; }
.view.enter > *:nth-child(4) { animation-delay: 120ms; } .view.enter > *:nth-child(5) { animation-delay: 160ms; }
@keyframes subir { from { opacity: 0; transform: translateY(14px); } }

.tabbar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 30; height: 66px;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px;
  border-radius: 22px; border: 1px solid var(--line-2); background: var(--glass); backdrop-filter: blur(22px) saturate(1.5); box-shadow: var(--shadow);
}
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--tx-3); background: none; border: 0; cursor: pointer; padding: 6px 0; }
.tabbar a.on { color: var(--tx); }
.tabbar a.on .ic { color: var(--c-brand); filter: drop-shadow(0 0 8px var(--c-brand)); }
.tab-fab { position: relative; }
.fab-core {
  width: 62px; height: 62px; margin-top: -30px; border-radius: 20px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #ff5263, var(--c-brand) 40%, var(--c-brand-2)); box-shadow: 0 14px 30px -8px var(--c-brand), inset 0 1px 0 rgba(255, 255, 255, .35);
  position: relative; overflow: hidden;
}
.fab-core .ic { width: 28px; height: 28px; }
.fab-core::after { content: ''; position: absolute; left: 8px; right: 8px; height: 2px; top: 50%; background: #fff; box-shadow: 0 0 10px #fff; opacity: .8; animation: varre 2.2s ease-in-out infinite; }
@keyframes varre { 0%, 100% { transform: translateY(-14px); } 50% { transform: translateY(14px); } }

@media (min-width: 980px) {
  .rail { display: flex; }
  .main { margin-left: var(--rail); }
  .tabbar, .brand-sm { display: none; }
  .topbar { padding: 14px 28px; }
  .topbar-title { display: block; }
  .view { padding: 28px 28px 60px; gap: 22px; }
  .ctx-chip { max-width: 420px; }
}

/* ---------- Superfícies ---------- */
.card {
  position: relative; border-radius: var(--r); padding: 20px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); backdrop-filter: blur(16px); box-shadow: var(--shadow);
}
.card-glow { position: relative; border-radius: calc(var(--r) + 4px); isolation: isolate; }
.card-glow::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1;
  background: conic-gradient(from var(--ang, 0deg), rgba(255, 59, 78, .9), rgba(167, 139, 250, .5), rgba(46, 230, 246, .7), rgba(255, 255, 255, .06) 60%, rgba(255, 59, 78, .9));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: gira 8s linear infinite;
}
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes gira { to { --ang: 360deg; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head:not(:first-child) { margin-top: 20px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.card-head h3 .ic { color: var(--tx-3); width: 18px; height: 18px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tx-3); display: flex; align-items: center; gap: 8px; }
.link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--c-cyan); background: none; border: 0; cursor: pointer; padding: 0; }
.link .ic { width: 15px; height: 15px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h2 { font-size: clamp(26px, 4vw, 36px); margin-top: 4px; }
.page-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Botões e controles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 12px; border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s, border-color .2s; position: relative; overflow: hidden;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn .ic { width: 18px; height: 18px; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #ff5465, var(--c-brand) 45%, var(--c-brand-2)); box-shadow: 0 10px 26px -10px var(--c-brand), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover { box-shadow: 0 14px 34px -10px var(--c-brand), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-ghost { background: var(--surface-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--line-2); }
.btn-glass { background: var(--surface-2); border-color: var(--line-2); backdrop-filter: blur(10px); }
.btn-soft { background: color-mix(in srgb, var(--c-cyan) 10%, transparent); color: var(--c-cyan); border-color: color-mix(in srgb, var(--c-cyan) 22%, transparent); }
.btn-soft:hover { background: color-mix(in srgb, var(--c-cyan) 16%, transparent); }
.btn-danger { background: color-mix(in srgb, var(--c-red) 12%, transparent); color: var(--c-red); border-color: color-mix(in srgb, var(--c-red) 25%, transparent); }
.btn-shine::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); animation: brilho 4.5s ease-in-out infinite; }
@keyframes brilho { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; flex: none; transition: .15s; }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }
.icon-btn:disabled { opacity: .3; pointer-events: none; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 500;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--tx-2); transition: .15s;
}
.chip i { font-style: normal; font: 600 11px var(--font-m); padding: 1px 6px; border-radius: 6px; background: var(--surface-3); }
.chip .ic { width: 14px; height: 14px; }
.chip:hover { color: var(--tx); border-color: var(--line-2); }
.chip.on { color: var(--tx); border-color: color-mix(in srgb, var(--c-brand) 60%, transparent); background: color-mix(in srgb, var(--c-brand) 16%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-brand) 10%, transparent); }
.chip.sm { padding: 5px 10px; font-size: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.lab { font-size: 13px; font-weight: 600; color: var(--tx-2); }
.lab small { font-weight: 400; color: var(--tx-3); }
.req { color: var(--c-brand); font-style: normal; margin-left: 3px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--bg) 55%, transparent); outline: none; transition: border-color .15s, box-shadow .15s; font-size: 16px;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { border-color: color-mix(in srgb, var(--c-cyan) 70%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-cyan) 14%, transparent); }
@media (min-width: 700px) { input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 14px; } }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin-bottom: 14px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--c-brand); margin-top: 2px; flex: none; }
.check small { display: block; color: var(--tx-3); font-size: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 10px; border-radius: 10px; border: 0; background: none; cursor: pointer; color: var(--tx-2); font-weight: 600; font-size: 13px; transition: .2s var(--ease); }
.seg button.on { background: var(--surface-3); color: var(--tx); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg-lg button { flex-direction: column; align-items: flex-start; text-align: left; padding: 12px 14px; gap: 2px; }
.seg-lg small { font-weight: 400; color: var(--tx-3); font-size: 12px; }
.seg-lg button.on { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-brand) 60%, transparent); background: color-mix(in srgb, var(--c-brand) 10%, transparent); }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle span { display: flex; flex-direction: column; }
.toggle small { color: var(--tx-3); font-size: 12px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle i { width: 46px; height: 28px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); position: relative; flex: none; transition: .2s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--tx-2); transition: .25s var(--ease); }
.toggle input:checked + i { background: linear-gradient(135deg, var(--c-brand), var(--c-brand-2)); border-color: transparent; }
.toggle input:checked + i::after { transform: translateX(18px); background: #fff; }
.toggle input:focus-visible + i { outline: 2px solid var(--c-cyan); outline-offset: 2px; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pill-ok { color: var(--c-green); background: color-mix(in srgb, var(--c-green) 13%, transparent); }
.pill-div { color: var(--c-amber); background: color-mix(in srgb, var(--c-amber) 13%, transparent); }
.pill-sem { color: var(--c-violet); background: color-mix(in srgb, var(--c-violet) 15%, transparent); }
.pill-reg { color: var(--c-cyan); background: color-mix(in srgb, var(--c-cyan) 12%, transparent); }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; background: var(--surface-3); color: var(--tx-2); }
.tag .ic { width: 13px; height: 13px; }
.warn-txt { color: var(--c-amber); }
.ok-txt { color: var(--c-green); }

.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; margin-bottom: 14px; border: 1px solid; }
.note .ic { width: 18px; height: 18px; margin-top: 1px; }
.note-cyan { color: var(--tx); border-color: color-mix(in srgb, var(--c-cyan) 25%, transparent); background: color-mix(in srgb, var(--c-cyan) 7%, transparent); }
.note-cyan .ic { color: var(--c-cyan); }
.note-amber { border-color: color-mix(in srgb, var(--c-amber) 25%, transparent); background: color-mix(in srgb, var(--c-amber) 7%, transparent); }
.note-amber .ic { color: var(--c-amber); }
.note-violet { border-color: color-mix(in srgb, var(--c-violet) 28%, transparent); background: color-mix(in srgb, var(--c-violet) 8%, transparent); }
.note-violet .ic { color: var(--c-violet); }
.note-red { border-color: color-mix(in srgb, var(--c-red) 28%, transparent); background: color-mix(in srgb, var(--c-red) 8%, transparent); }
.note-red .ic { color: var(--c-red); }
.note-green { border-color: color-mix(in srgb, var(--c-green) 25%, transparent); background: color-mix(in srgb, var(--c-green) 7%, transparent); }
.note-green .ic { color: var(--c-green); }

.tone-brand { --tone: var(--c-brand); } .tone-green { --tone: var(--c-green); } .tone-amber { --tone: var(--c-amber); }
.tone-violet { --tone: var(--c-violet); } .tone-cyan { --tone: var(--c-cyan); } .tone-red { --tone: var(--c-red); }

/* ---------- Início ---------- */
.hero { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 26px 22px; background: linear-gradient(160deg, color-mix(in srgb, var(--c-brand) 9%, var(--surface-2)), var(--surface) 55%); border: 0; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 700; margin: 12px 0 12px; letter-spacing: -.04em; }
.grad { background: linear-gradient(100deg, #ff6676, var(--c-brand) 30%, #c86bff 70%, var(--c-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: flui 8s ease-in-out infinite alternate; }
@keyframes flui { to { background-position: 100% 0; } }
.lead { color: var(--tx-2); font-size: 16px; max-width: 54ch; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.hero-cta .btn-glass span, .hero-cta .btn-glass { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.hero-sources { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 20px; color: var(--tx-3); font-size: 12.5px; }
.hero-sources span { display: inline-flex; align-items: center; gap: 6px; }
.hero-sources .ic { width: 15px; height: 15px; color: var(--tx-2); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-green); box-shadow: 0 0 0 0 var(--c-green); animation: pulsa 2s infinite; }
@keyframes pulsa { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-green) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.hero-r { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.ring-wrap { position: relative; width: 196px; height: 196px; display: grid; place-items: center; }
.ring-wrap > .ring { position: absolute; inset: 14px; width: 168px; height: 168px; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--c-brand) 45%, transparent)); }
.ring-bg { fill: none; stroke: var(--surface-3); }
.ring-fg { fill: none; stroke-linecap: round; animation: anelIn 1.4s var(--ease) .15s forwards; }
@keyframes anelIn { to { stroke-dashoffset: var(--alvo); } }
.ring-center { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.ring-center b { font: 700 46px var(--font-d); letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-center b small { font-size: 20px; color: var(--tx-2); margin-left: 2px; }
.ring-center > span { color: var(--tx-2); font-size: 13px; margin-top: 4px; }
.ring-orbit { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed var(--line-2); animation: orbita 14s linear infinite; }
.ring-orbit i { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--c-cyan); box-shadow: 0 0 12px var(--c-cyan); }
@keyframes orbita { to { transform: rotate(360deg); } }
.inv-chip { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; text-align: left; max-width: 100%; }
.inv-chip span { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; min-width: 0; }
.inv-chip small { font-weight: 500; font-size: 11px; color: var(--tx-3); text-transform: uppercase; letter-spacing: .06em; }
.inv-chip .ic:first-child { color: var(--c-violet); }
@media (min-width: 860px) { .hero { grid-template-columns: 1.5fr 1fr; padding: 40px 40px; } }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kpis > .kpi:first-child { grid-column: span 2; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(5, 1fr); } .kpis > .kpi:first-child { grid-column: auto; } .kpis-3 { grid-template-columns: repeat(3, 1fr); } }
.kpis-3 > .kpi:first-child { grid-column: auto; }
@media (max-width: 699px) { .kpis-3 { grid-template-columns: 1fr 1fr 1fr; } .kpis-3 .kpi-s { display: none; } }
.kpi { position: relative; overflow: hidden; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.kpi::before { content: ''; position: absolute; width: 120px; height: 120px; right: -40px; top: -50px; border-radius: 50%; background: var(--tone); opacity: .14; filter: blur(30px); }
.kpi-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); margin-bottom: 12px; }
.kpi-ic .ic { width: 18px; height: 18px; }
.kpi-n { font: 700 32px var(--font-d); letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.kpi-r { font-weight: 600; margin-top: 6px; font-size: 14px; }
.kpi-s { color: var(--tx-3); font-size: 12px; margin-top: 2px; }

.notice { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.notice-ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--c-cyan), #5b6cff); box-shadow: 0 10px 24px -8px var(--c-cyan); }
.notice h3 { font-size: 19px; margin: 6px 0; }
.notice-acts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (min-width: 1100px) { .notice { grid-template-columns: auto 1fr 1.25fr; align-items: center; } .notice-acts { grid-column: auto; grid-template-columns: repeat(3, 1fr); } }
.mini-tile { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; cursor: pointer; text-align: left; font-weight: 600; font-size: 13px; border: 1px solid color-mix(in srgb, var(--tone) 22%, var(--line)); background: color-mix(in srgb, var(--tone) 7%, transparent); transition: .2s var(--ease); }
.mini-tile .ic { color: var(--tone); }
.mini-tile:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--tone) 13%, transparent); }

.cta-base { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; border-style: dashed; border-color: var(--line-2); }
.cta-base > div:first-child { color: var(--c-cyan); }
.cta-base h3 { font-size: 17px; margin-bottom: 4px; }
.cta-base .btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 800px) { .cta-base { grid-template-columns: auto 1fr auto; } .cta-base .btn { grid-column: auto; } }

.duo { display: grid; gap: 16px; }
@media (min-width: 900px) { .duo { grid-template-columns: 1fr 1fr; } }
.spark-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--tx-3); margin-bottom: 10px; }
.spark-head b { color: var(--tx-2); font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.bar i { width: 100%; height: var(--h); min-height: 3px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--c-cyan), color-mix(in srgb, var(--c-brand) 80%, transparent)); box-shadow: 0 0 14px -2px color-mix(in srgb, var(--c-cyan) 60%, transparent); transform-origin: bottom; animation: cresce .8s var(--ease) both; animation-delay: var(--d); }
@keyframes cresce { from { transform: scaleY(0); } }
.bar span { font: 500 10px var(--font-m); color: var(--tx-3); white-space: nowrap; }
.bars .bar:nth-child(odd) span { visibility: visible; }
@media (max-width: 600px) { .bars .bar:nth-child(even) span { visibility: hidden; } }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.timeline li:hover { background: var(--surface-2); }
.timeline li:last-child { border-bottom: 0; }
.tl-desc { color: var(--tx-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-time { color: var(--tx-3); font-size: 12px; white-space: nowrap; }
.empty-mini { display: flex; gap: 10px; align-items: center; color: var(--tx-3); font-size: 14px; padding: 18px 4px; }

/* ---------- Listas ---------- */
.toolbar { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 900px) { .toolbar { flex-direction: row; align-items: center; } .toolbar .search-box { max-width: 440px; } }
.search-box { position: relative; flex: 1; display: block; }
.search-box .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--tx-3); width: 18px; height: 18px; pointer-events: none; }
.search-box input { padding-left: 40px !important; border-radius: 14px !important; }
.search { margin-bottom: 12px; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); transition: .15s var(--ease);
}
.row:hover { border-color: var(--line-2); transform: translateX(2px); }
.rows.compact .row { cursor: default; padding: 10px 12px; }
.rows.compact .row:hover { transform: none; }
.row-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--c-green); box-shadow: 0 0 10px var(--c-green); }
.dot-div { background: var(--c-amber); box-shadow: 0 0 10px var(--c-amber); }
.dot-sem { background: var(--c-violet); box-shadow: 0 0 10px var(--c-violet); }
.dot-reg, .dot-cyan { background: var(--c-cyan); box-shadow: 0 0 10px var(--c-cyan); }
.row-main { flex: 1; min-width: 0; }
.row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-top b.mono { font-size: 15.5px; }
.row-desc { font-size: 14px; color: var(--tx); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--tx-3); margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row-sub .ic { width: 13px; height: 13px; flex: none; }
.row-time { text-align: right; font: 500 13px var(--font-m); color: var(--tx-2); display: flex; flex-direction: column; }
.row-time small { color: var(--tx-3); font-size: 11px; }
.row-go { color: var(--tx-3); }
.row-sel input { width: 20px; height: 20px; accent-color: var(--c-brand); }
.rows .empty, .rows .more { list-style: none; text-align: center; padding: 40px 16px; color: var(--tx-2); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rows .more { padding: 10px; }
.rows .empty .ic { color: var(--tx-3); }
.selbar {
  position: sticky; bottom: calc(86px + var(--safe-b)); z-index: 10; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between;
  padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--glass); backdrop-filter: blur(18px); box-shadow: var(--shadow);
}
@media (min-width: 980px) { .selbar { bottom: 16px; } }
.selbar-acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Conferência ---------- */
.drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 48px 24px; cursor: pointer; background: linear-gradient(180deg, var(--surface-2), var(--surface)); transition: .2s; }
.drop h3 { font-size: 24px; }
.drop p { max-width: 60ch; }
.drop.over { transform: scale(1.01); background: color-mix(in srgb, var(--c-cyan) 8%, var(--surface)); }
.drop-ic { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 24px; color: var(--c-cyan); background: color-mix(in srgb, var(--c-cyan) 10%, transparent); box-shadow: 0 0 40px -10px var(--c-cyan); animation: flutua 3s ease-in-out infinite; }
@keyframes flutua { 50% { transform: translateY(-6px); } }
.base-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.base-ic { color: var(--c-green); width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--c-green) 10%, transparent); }
.base-acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 800px) { .base-card { grid-template-columns: auto 1fr auto; } .base-acts { grid-column: auto; } }
.setores { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.setor { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); animation: subir .5s var(--ease) both; animation-delay: var(--d); }
.setor.vis { border-color: color-mix(in srgb, var(--c-cyan) 30%, var(--line)); }
.setor.full { border-color: color-mix(in srgb, var(--c-green) 35%, var(--line)); }
.setor-ring { position: relative; width: 64px; height: 64px; display: grid; place-items: center; }
.setor-ring .ring { position: absolute; inset: 0; }
.setor-ring b { font: 700 14px var(--font-d); position: relative; }
.setor-txt { min-width: 0; }
.setor-txt h4 { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setor-txt p { color: var(--tx-3); font-size: 12.5px; margin-top: 3px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 12px; margin-top: 14px; }
.table-wrap { overflow: auto; border-radius: 12px; border: 1px solid var(--line); max-height: 260px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tbl th { position: sticky; top: 0; background: var(--bg-2); font-weight: 600; color: var(--tx-2); }

/* ---------- Solicitações ---------- */
.tipos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tipo {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 18px; min-height: 150px;
  border-radius: 20px; cursor: pointer; overflow: hidden; border: 1px solid color-mix(in srgb, var(--tone) 22%, var(--line));
  background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--tone) 16%, transparent), transparent 60%), linear-gradient(180deg, var(--surface-2), var(--surface));
  transition: .25s var(--ease); animation: subir .5s var(--ease) both; animation-delay: var(--d);
}
.tipo:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -20px color-mix(in srgb, var(--tone) 70%, transparent); }
.tipo-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); margin-bottom: 8px; }
.tipo b { font: 600 17px var(--font-d); }
.tipo small { color: var(--tx-2); font-size: 13px; }
.tipo-go { position: absolute; right: 16px; top: 18px; color: var(--tx-3); transition: .2s; }
.tipo:hover .tipo-go { color: var(--tone); transform: translateX(3px); }
.sol-grid { display: grid; gap: 18px; }
@media (min-width: 860px) { .sol-grid { grid-template-columns: 1fr 1.05fr; } }
.add-item { display: flex; gap: 8px; flex-wrap: wrap; }
.add-item input { flex: 1 1 160px; }
.sol-itens { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.sol-itens li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.sol-itens li .desc { flex: 1; color: var(--tx-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sol-itens li.vazio { color: var(--tx-3); justify-content: center; border-style: dashed; }
.preview { border-radius: 16px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg) 60%, transparent); overflow: hidden; }
.preview-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 12.5px; color: var(--tx-2); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.preview-head .ic { width: 16px; height: 16px; color: var(--c-cyan); }
.preview-subj { padding: 12px 14px 0; font-weight: 600; font-size: 14px; }
.preview-body { margin: 0; padding: 10px 14px 14px; font: 12.5px/1.55 var(--font-m); color: var(--tx-2); white-space: pre-wrap; word-break: break-word; max-height: 300px; overflow: auto; }
.pick { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow: auto; }
.pick li { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.pick .check { margin: 0; }
.pick small { display: block; }

/* ---------- Exportar ---------- */
.export-grid { display: grid; gap: 16px; }
@media (min-width: 1000px) { .export-grid { grid-template-columns: 1fr 1.1fr; align-items: start; } }
.export-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.big-n { display: flex; align-items: baseline; gap: 8px; margin-right: auto; }
.big-n b { font: 700 40px var(--font-d); letter-spacing: -.04em; }
.big-n span { color: var(--tx-2); }
.cols { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cols li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); opacity: .55; transition: .15s; }
.cols li.on { opacity: 1; background: var(--surface-2); }
.cols input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--c-brand); }
.cols .col-rot { min-height: 36px !important; padding: 6px 10px !important; font-size: 14px !important; border-color: transparent !important; background: transparent !important; }
.cols .col-rot:focus { border-color: var(--line-2) !important; background: var(--surface-2) !important; }
.cols .col-key { display: none; }

/* ---------- Guia ---------- */
.guia-hero { display: grid; gap: 16px; padding: 24px; background: linear-gradient(160deg, color-mix(in srgb, var(--c-violet) 10%, var(--surface-2)), var(--surface)); }
.guia-hero h3 { font-size: clamp(20px, 3vw, 26px); margin: 8px 0; max-width: 30ch; }
.guia-acts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 900px) { .guia-hero { grid-template-columns: 1.3fr 1fr; align-items: center; } }
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq-item { border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); overflow: hidden; }
.faq-item summary { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 15px 16px; cursor: pointer; list-style: none; font-weight: 600; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ic { color: var(--tx-3); transition: transform .25s var(--ease); }
.faq-item[open] summary .ic { transform: rotate(90deg); color: var(--c-brand); }
.faq-n { font: 600 12px var(--font-m); color: var(--c-brand); padding: 4px 8px; border-radius: 8px; background: color-mix(in srgb, var(--c-brand) 12%, transparent); }
.faq-a { padding: 0 16px 16px 62px; color: var(--tx-2); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
@media (max-width: 600px) { .faq-a { padding-left: 16px; } }
.leg ul { margin: 0 0 12px; padding-left: 18px; color: var(--tx-2); font-size: 14px; display: grid; gap: 4px; }

/* ---------- Ajustes ---------- */
.settings { display: grid; gap: 16px; }
@media (min-width: 900px) { .settings { grid-template-columns: 1fr 1fr; align-items: start; } }
.roadmap ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.roadmap li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); opacity: .55; }
.roadmap li.on { opacity: 1; }
.roadmap li .ic { color: var(--c-cyan); }
.roadmap li span { display: flex; flex-direction: column; }
.roadmap small { color: var(--tx-3); font-size: 12.5px; }
.foot-sig { text-align: center; color: var(--tx-3); font-size: 12px; }
.inv-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.inv-list li { display: flex; align-items: center; gap: 8px; }
.inv-list li.vazio { color: var(--tx-3); }
.inv-pick { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; }
.inv-pick span { display: flex; flex-direction: column; }
.inv-pick small { color: var(--tx-3); font-size: 12px; }
.inv-list li.on .inv-pick { border-color: color-mix(in srgb, var(--c-green) 40%, transparent); background: color-mix(in srgb, var(--c-green) 7%, transparent); }
.inv-list li.on .inv-pick .ic { color: var(--c-green); }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.menu-tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; }
.menu-tile .ic { color: var(--c-brand); }

/* ---------- Detalhe ---------- */
.det-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; font-size: 13px; }
.det-head .ic { width: 15px; height: 15px; vertical-align: -2px; }
.cad { padding: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface-2); margin-bottom: 16px; }
.cad h4 { font-size: 17px; margin: 6px 0 10px; }
.cad dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.cad dt { font-size: 11px; color: var(--tx-3); text-transform: uppercase; letter-spacing: .06em; }
.cad dd { margin: 2px 0 0; font-size: 14px; }
.foto-box { display: flex; align-items: center; gap: 12px; }
.foto { width: 96px; height: 96px; border-radius: 14px; border: 1px dashed var(--line-2); display: grid; place-items: center; color: var(--tx-3); overflow: hidden; flex: none; }
.foto img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Folhas (modais) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(3, 4, 8, .55); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s; }
.sheet {
  position: relative; width: 100%; max-height: 92dvh; display: flex; flex-direction: column;
  border-radius: 26px 26px 0 0; border: 1px solid var(--line-2); border-bottom: 0;
  background: color-mix(in srgb, var(--bg-2) 92%, transparent); backdrop-filter: blur(30px) saturate(1.4); box-shadow: 0 -30px 80px -20px rgba(0, 0, 0, .6);
  transform: translateY(105%); transition: transform .38s var(--ease); padding-bottom: var(--safe-b);
}
.sheet-wrap.in .sheet-backdrop { opacity: 1; }
.sheet-wrap.in .sheet { transform: none; }
.sheet-grip { width: 42px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 20px 10px; }
.sheet-head h3 { font-size: 21px; }
.sheet-head p { color: var(--tx-2); font-size: 13.5px; margin-top: 4px; }
.sheet-body { padding: 8px 20px 18px; overflow: auto; overscroll-behavior: contain; }
.sheet-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 20px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); }
.foot-msg { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tx-2); }
.foot-msg .ic { width: 16px; height: 16px; }
.foot-msg.warn { color: var(--c-amber); }
.foot-msg.ok { color: var(--c-green); }
@media (max-width: 640px) { .sheet-foot .foot-msg { width: 100%; } .sheet-foot .btn { flex: 1; } .sheet-foot .btn-danger { flex: 0 0 auto; } }
@media (min-width: 760px) {
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { max-width: 580px; border-radius: 26px; border-bottom: 1px solid var(--line-2); transform: translateY(24px) scale(.97); opacity: 0; transition: transform .35s var(--ease), opacity .25s; max-height: 88dvh; }
  .sheet-lg { max-width: 1040px; }
  .sheet-wrap.in .sheet { opacity: 1; }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 22px; }
}

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 90; top: calc(12px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(94vw, 460px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; font-size: 14px; font-weight: 500; border: 1px solid var(--line-2); background: var(--glass); backdrop-filter: blur(22px) saturate(1.5); box-shadow: var(--shadow); opacity: 0; transform: translateY(-12px) scale(.97); transition: .3s var(--ease); }
.toast.in { opacity: 1; transform: none; }
.toast-ok .ic { color: var(--c-green); } .toast-erro .ic { color: var(--c-red); } .toast-aviso .ic { color: var(--c-amber); } .toast-info .ic { color: var(--c-cyan); }

/* ---------- Leitor em tela cheia ---------- */
.scanner { position: fixed; inset: 0; z-index: 50; background: #000; color: #fff; overflow: hidden; opacity: 0; transition: opacity .25s; --tx: #fff; --tx-2: rgba(255, 255, 255, .72); --tx-3: rgba(255, 255, 255, .5); --line: rgba(255, 255, 255, .12); --line-2: rgba(255, 255, 255, .2); --surface-2: rgba(255, 255, 255, .1); --surface-3: rgba(255, 255, 255, .16); }
.scanner.in { opacity: 1; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.scan-overlay .hit { fill: rgba(46, 229, 157, .14); stroke: #2ee59d; stroke-width: 3; stroke-linejoin: round; filter: drop-shadow(0 0 8px #2ee59d); }
.scanner:not([data-modo="camera"]) video, .scanner:not([data-modo="camera"]) .reticle, .scanner:not([data-modo="camera"]) .scan-hint, .scanner:not([data-modo="camera"]) .scan-overlay { display: none; }
.scanner:not([data-modo="camera"]) { background: radial-gradient(120% 80% at 50% 0%, #2a0d1a, #06070b 60%); }
.scanner.cam-erro .reticle { opacity: .25; }
.scan-top { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(12px + var(--safe-t)) 14px 12px; }
.glass { background: rgba(10, 12, 18, .5) !important; backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .16) !important; color: #fff; }
.scan-top .icon-btn { width: 46px; height: 46px; border-radius: 14px; }
.scan-top .icon-btn.on { background: #ffd166 !important; color: #111; }
.scan-top .ctx-chip { max-width: 60vw; }
.scan-banner { position: absolute; z-index: 5; top: calc(70px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(46, 230, 246, .18); border: 1px solid rgba(46, 230, 246, .4); backdrop-filter: blur(12px); white-space: nowrap; max-width: 92vw; overflow: hidden; }
.scan-banner .ic { width: 16px; height: 16px; }

.reticle { position: absolute; z-index: 3; left: 50%; top: 40%; transform: translate(-50%, -50%); width: min(86vw, 560px); aspect-ratio: 2.3; border-radius: 22px; box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .52); transition: box-shadow .3s; }
.reticle .c { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .6)); transition: border-color .2s, transform .25s var(--ease); }
.reticle .tl { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 20px 0 0 0; }
.reticle .tr { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-radius: 0 20px 0 0; }
.reticle .bl { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 20px; }
.reticle .br { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 20px 0; }
.laser { position: absolute; left: 7%; right: 7%; height: 2px; top: 50%; border-radius: 2px; background: linear-gradient(90deg, transparent, #ff3b4e 15%, #ff8a95 50%, #ff3b4e 85%, transparent); box-shadow: 0 0 14px 2px rgba(255, 59, 78, .85), 0 0 40px 6px rgba(255, 59, 78, .35); animation: laser 1.9s ease-in-out infinite; }
@keyframes laser { 0%, 100% { transform: translateY(-34px); } 50% { transform: translateY(34px); } }
.reticle-flash { position: absolute; inset: 0; border-radius: inherit; opacity: 0; }
.reticle[data-fx] .reticle-flash { animation: flash .6s var(--ease); }
.reticle[data-fx=""] .reticle-flash { animation: none; }
@keyframes flash { 0% { opacity: .9; } 100% { opacity: 0; } }
.reticle[data-fx="ok"] .c, .reticle[data-fx="reg"] .c { border-color: #2ee59d; transform: scale(1.08); }
.reticle[data-fx="ok"] .reticle-flash, .reticle[data-fx="reg"] .reticle-flash { background: rgba(46, 229, 157, .25); box-shadow: 0 0 60px rgba(46, 229, 157, .6); }
.reticle[data-fx="dup"] .c, .reticle[data-fx="div"] .c { border-color: #ffb547; }
.reticle[data-fx="dup"] .reticle-flash, .reticle[data-fx="div"] .reticle-flash { background: rgba(255, 181, 71, .22); }
.reticle[data-fx="sem"] .c { border-color: #a78bfa; }
.reticle[data-fx="sem"] .reticle-flash { background: rgba(167, 139, 250, .25); }
.reticle[data-fx="ok"] .laser, .reticle[data-fx="reg"] .laser { background: #2ee59d; box-shadow: 0 0 16px 3px rgba(46, 229, 157, .9); }
.scan-hint { position: absolute; z-index: 4; left: 50%; top: calc(40% + min(86vw, 560px) / 4.6 + 24px); transform: translateX(-50%); width: min(90vw, 520px); text-align: center; font-size: 14px; font-weight: 500; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }

.scan-panel { position: absolute; z-index: 4; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(92vw, 460px); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.scan-panel h3 { font-size: 22px; }
.scan-panel p { color: rgba(255, 255, 255, .7); font-size: 14px; }
.pulse-ring { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(255, 59, 78, .35), rgba(255, 59, 78, .05) 70%); position: relative; }
.pulse-ring .ic { width: 40px; height: 40px; }
.pulse-ring::before, .pulse-ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 59, 78, .6); animation: onda 2.2s ease-out infinite; }
.pulse-ring::after { animation-delay: 1.1s; }
@keyframes onda { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.leitor-in { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.digitar { display: flex; gap: 8px; width: 100%; }
.digitar input { font: 600 22px var(--font-m) !important; letter-spacing: .08em; text-align: center; background: rgba(255, 255, 255, .08) !important; border-color: rgba(255, 255, 255, .2) !important; }

.scan-bottom { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; padding: 12px 12px calc(14px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .65) 40%); }
.scan-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 6px; font-size: 12.5px; color: rgba(255, 255, 255, .75); }
.scan-count b { color: #fff; font-family: var(--font-m); }
.scan-engine { font-size: 11px; color: rgba(255, 255, 255, .45); }
.scanner .seg { background: rgba(10, 12, 18, .55); border-color: rgba(255, 255, 255, .14); backdrop-filter: blur(16px); }
.scanner .seg button { color: rgba(255, 255, 255, .7); flex-direction: column; gap: 3px; font-size: 12px; padding: 8px 4px; }
.scanner .seg button.on { color: #fff; background: rgba(255, 255, 255, .14); }
.scanner .seg .ic { width: 19px; height: 19px; }

.last-card {
  border-radius: 20px; padding: 14px 16px; background: rgba(12, 14, 20, .78); backdrop-filter: blur(22px) saturate(1.5); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); animation: cartao .45s var(--ease); position: relative; overflow: hidden;
}
.last-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c-cyan); }
.last-card.fx-ok::before { background: #2ee59d; box-shadow: 0 0 20px #2ee59d; }
.last-card.fx-div::before, .last-card.fx-dup::before { background: #ffb547; }
.last-card.fx-sem::before { background: #a78bfa; }
@keyframes cartao { from { transform: translateY(30px) scale(.96); opacity: 0; } }
.lc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lc-time { font-size: 12px; color: rgba(255, 255, 255, .55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-chapa { font-size: 30px; font-weight: 700; letter-spacing: .06em; margin: 6px 0 2px; line-height: 1.1; }
.lc-desc { font-size: 14px; color: rgba(255, 255, 255, .8); }
.lc-warn { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: #ffb547; margin-top: 6px; }
.lc-warn .ic { width: 15px; height: 15px; }
.lc-estado { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.scanner .chip { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .8); }
.scanner .chip.on { background: rgba(255, 59, 78, .25); border-color: #ff3b4e; color: #fff; }
.lc-acts { display: flex; gap: 6px; margin-top: 10px; justify-content: flex-end; }
.lc-acts .btn-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #fff; }
@media (min-width: 760px) { .scan-bottom { left: 50%; transform: translateX(-50%); width: 560px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ring-fg { stroke-dashoffset: var(--alvo); }
}

/* ---------- Escolha de sala ---------- */
.salas { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; margin-top: 10px; max-height: 300px; overflow: auto; padding: 2px; overscroll-behavior: contain; }
.sala-grupo { grid-column: 1 / -1; margin: 6px 2px 0; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tx-3); }
.sala-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border-radius: 14px; cursor: pointer; text-align: left; border: 1px solid var(--line); background: var(--surface); transition: .15s var(--ease); min-height: 64px; }
.sala-tile b { font: 700 20px var(--font-d); letter-spacing: -.02em; display: flex; align-items: baseline; gap: 5px; line-height: 1.1; }
.sala-tile b small { font: 500 11px var(--font); color: var(--tx-3); text-transform: uppercase; letter-spacing: .06em; }
.sala-tile span { font-size: 11.5px; color: var(--tx-2); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sala-tile:hover { border-color: var(--line-2); background: var(--surface-2); }
.sala-tile.on { border-color: color-mix(in srgb, var(--c-brand) 70%, transparent); background: color-mix(in srgb, var(--c-brand) 14%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-brand) 12%, transparent); }
.sala-tile.on b { color: var(--tx); }
.sala-tile.livre { grid-column: 1 / -1; border-style: dashed; border-color: color-mix(in srgb, var(--c-cyan) 40%, transparent); }
.sala-tile.livre b { font-size: 15px; color: var(--c-cyan); }
.sala-tile.livre .ic { width: 16px; height: 16px; }
.toolbar .seg { flex: none; }
.toolbar .seg .ic { width: 16px; height: 16px; }
