/* VOZ-PRO — design system. Laranja + grafite (da marca). Mobile-first.
   Fontes: Bricolage Grotesk (display) · IBM Plex Sans (texto) · IBM Plex Mono (dados) */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesk:opsz,wght@12..96,600;12..96,700;12..96,800&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg:        #f6f5f2;
  --bg-tint:   #efece6;
  --surface:   #ffffff;
  --surface-2: #f2efe9;
  --ink:       #17140f;
  --ink-2:     #4a443b;
  --ink-3:     #857d70;
  --line:      rgba(23, 20, 15, .11);
  --line-2:    rgba(23, 20, 15, .06);

  --ac:        #e2620d;   /* laranja de sinal, confiante — não neon */
  --ac-press:  #c3540b;
  --ac-ink:    #ffffff;
  --ac-soft:   #fae5d3;
  --ac-glow:   rgba(226, 98, 13, .22);

  --ok:   #1c7a48;  --ok-soft:   #dcefe3;
  --warn: #9a6a0c;  --warn-soft: #f6ebd4;
  --crit: #b23b2a;  --crit-soft: #f7e0da;

  --r-sm: 8px;  --r: 13px;  --r-lg: 20px;
  --sh-1: 0 1px 2px rgba(23,20,15,.05), 0 1px 1px rgba(23,20,15,.04);
  --sh-2: 0 2px 6px -1px rgba(23,20,15,.08), 0 10px 28px -12px rgba(23,20,15,.16);
  --sh-pop: 0 8px 20px -6px rgba(23,20,15,.14), 0 30px 60px -20px rgba(23,20,15,.30);

  --f-display: "Bricolage Grotesk", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --f-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #131110;
    --bg-tint:   #1a1715;
    --surface:   #1d1a17;
    --surface-2: #262220;
    --ink:       #f0eae0;
    --ink-2:     #c3bab0;
    --ink-3:     #8c8377;
    --line:      rgba(240, 234, 224, .12);
    --line-2:    rgba(240, 234, 224, .06);

    --ac:        #ff8636;
    --ac-press:  #e5702a;
    --ac-ink:    #1b0e05;
    --ac-soft:   rgba(255, 134, 54, .15);
    --ac-glow:   rgba(255, 134, 54, .28);

    --ok:   #43c07f;  --ok-soft:  rgba(67,192,127,.15);
    --warn: #e0a341;  --warn-soft:rgba(224,163,65,.15);
    --crit: #ef7059;  --crit-soft:rgba(239,112,89,.15);

    --sh-1: 0 1px 2px rgba(0,0,0,.4);
    --sh-2: 0 2px 8px rgba(0,0,0,.35), 0 14px 40px -16px rgba(0,0,0,.6);
    --sh-pop: 0 10px 28px -8px rgba(0,0,0,.5), 0 40px 80px -24px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --bg: #131110; --bg-tint: #1a1715; --surface: #1d1a17; --surface-2: #262220;
  --ink: #f0eae0; --ink-2: #c3bab0; --ink-3: #8c8377;
  --line: rgba(240,234,224,.12); --line-2: rgba(240,234,224,.06);
  --ac: #ff8636; --ac-press: #e5702a; --ac-ink: #1b0e05; --ac-soft: rgba(255,134,54,.15); --ac-glow: rgba(255,134,54,.28);
  --ok: #43c07f; --ok-soft: rgba(67,192,127,.15); --warn: #e0a341; --warn-soft: rgba(224,163,65,.15); --crit: #ef7059; --crit-soft: rgba(239,112,89,.15);
  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 2px 8px rgba(0,0,0,.35), 0 14px 40px -16px rgba(0,0,0,.6);
  --sh-pop: 0 10px 28px -8px rgba(0,0,0,.5), 0 40px 80px -24px rgba(0,0,0,.7);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
::selection { background: var(--ac-glow); }
a { color: var(--ac); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 4px; }

/* ------- marca ------- */
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; display: block; box-shadow: 0 0 0 1px var(--line), var(--sh-1); }
.brand .wm {
  font-family: var(--f-display); font-weight: 800; font-size: 1.16rem;
  letter-spacing: -.015em; line-height: 1;
}
.brand .wm b { color: var(--ac); font-weight: 800; }
.brand .sfx { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); align-self: flex-start; margin-top: .1rem; }

/* ------- topbar ------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1040px; margin: 0 auto; padding: .8rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.topbar-r { display: flex; align-items: center; gap: .6rem; }
.userchip { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--ink-2); font-weight: 500; }
.userchip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }

/* ------- subnav (seções do painel) ------- */
.subnav {
  max-width: 1040px; margin: 0 auto; padding: .9rem 1.2rem 0;
  display: flex; gap: .3rem; flex-wrap: wrap;
}
.subnav a {
  font-size: .86rem; font-weight: 600; color: var(--ink-3);
  padding: .45rem .8rem; border-radius: 999px; text-decoration: none;
}
.subnav a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.subnav a.on { color: var(--ac); background: var(--ac-soft); }

/* ------- shell ------- */
.shell { max-width: 1040px; margin: 0 auto; padding: 1.4rem 1.2rem 5rem; }
.grid { display: grid; gap: 1rem; }
@media (min-width: 780px) { .grid.two { grid-template-columns: 1fr 1fr; } }

/* ------- cards ------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.4rem;
  box-shadow: var(--sh-1);
}
.card + .card { margin-top: 1rem; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.eyebrow { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ac); display: block; margin-bottom: .35rem; }
h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.1rem); letter-spacing: -.02em; line-height: 1.08; text-wrap: balance; }
h2 { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }
h3 { font-family: var(--f-display); font-weight: 600; font-size: 1rem; letter-spacing: -.005em; }
.card h2 { font-size: 1.14rem; }
.sub { color: var(--ink-3); font-size: .92rem; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--f-mono); }

/* ------- forms ------- */
.field { display: block; margin-bottom: .9rem; }
.label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .4rem; }
.label .opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
input, select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: .68rem .8rem; min-height: 44px;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-glow); }
input::placeholder { color: var(--ink-3); opacity: .7; }
.upper, input.upper { text-transform: uppercase; }
.formrow { display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end; }
.formrow .field { flex: 1 1 170px; margin-bottom: 0; }

/* ------- botões ------- */
.btn {
  --bh: var(--ac); --bt: var(--ac-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-family: var(--f-body); font-weight: 600; font-size: .92rem;
  min-height: 44px; padding: 0 1.1rem; border: 1px solid transparent;
  border-radius: var(--r-sm); cursor: pointer; white-space: nowrap;
  background: var(--bh); color: var(--bt);
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 6px 16px -8px var(--ac-glow);
  transition: filter .12s, transform .06s, background .12s;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { --bh: var(--crit); --bt: #fff; box-shadow: none; }
.btn.sm { min-height: 34px; padding: 0 .7rem; font-size: .82rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-link { background: none; border: 0; color: var(--ink-3); font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; padding: .3rem .2rem; }
.btn-link:hover { color: var(--ac); }

/* ------- pills / badges ------- */
.pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: .18rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.off { background: var(--crit-soft); color: var(--crit); }

.keychip { font-family: var(--f-mono); font-size: .78rem; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); padding: .16rem .48rem; border-radius: 6px; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ------- listas / rows ------- */
.rowitem {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 0; border-top: 1px solid var(--line-2);
}
.rowitem:first-child { border-top: 0; }
.rowitem .who { min-width: 0; }
.rowitem .who b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowitem .who small { color: var(--ink-3); font-size: .82rem; }

.tile {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface-2); padding: 1rem 1.1rem; margin-bottom: .7rem;
}
.tile:last-child { margin-bottom: 0; }
.tile-head { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; margin-bottom: .3rem; }
.tile-name { font-family: var(--f-display); font-weight: 700; letter-spacing: -.01em; }
.tile-acts { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }

/* ------- tabelas ------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; min-width: 34rem; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
.num { font-variant-numeric: tabular-nums; }

/* ------- notas ------- */
.note {
  display: flex; gap: .7rem; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: .9rem 1rem; font-size: .9rem; color: var(--ink-2);
}
.note .ic { flex-shrink: 0; width: 20px; height: 20px; color: var(--ink-3); }
.note.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: color-mix(in srgb, var(--warn) 85%, var(--ink)); }
.note.warn .ic { color: var(--warn); }
.note b { color: var(--ink); font-weight: 600; }

.empty { text-align: center; color: var(--ink-3); padding: 2rem 1rem; font-size: .92rem; }

/* ------- tela centrada: login / erro / sem acesso ------- */
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 2.5rem 1.3rem;
  background:
    radial-gradient(50% 40% at 50% 0%, var(--ac-glow) 0%, transparent 70%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 400px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 3.4rem 2.2rem 2.4rem;
  box-shadow: var(--sh-2); position: relative;
}
.seal {
  width: 84px; height: 84px; border-radius: 22px;
  position: absolute; top: -42px; left: 50%; transform: translateX(-50%);
  box-shadow: 0 0 0 6px var(--surface), 0 14px 34px -10px rgba(23,20,15,.4), 0 0 40px -6px var(--ac-glow);
}
.auth-card h1 { font-size: 1.55rem; margin: .2rem 0 .5rem; }
.auth-card .lede { color: var(--ink-3); font-size: .95rem; margin-bottom: 1.6rem; }
.auth-card form { text-align: left; }
.auth-foot { margin-top: 1.2rem; font-size: .8rem; color: var(--ink-3); }
.check { display: flex; align-items: center; gap: .55rem; font-size: .88rem; color: var(--ink-2); margin: .6rem 0 1.1rem; }
.check input { width: auto; min-height: 0; }
.errbox { background: var(--crit-soft); border: 1px solid color-mix(in srgb, var(--crit) 30%, transparent); color: var(--crit); border-radius: var(--r-sm); padding: .7rem .9rem; font-size: .88rem; font-weight: 500; margin-bottom: 1rem; text-align: left; }

/* ------- modal ad-hoc (operadores/papeis) ------- */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1.3rem; background: rgba(10,8,6,.55); backdrop-filter: blur(3px); }
.overlay .card { max-width: 440px; width: 100%; box-shadow: var(--sh-pop); }

/* ------- tablet (kiosk) ------- */
.kiosk { min-height: 100dvh; display: grid; place-items: center; padding: 1.6rem; }
.kiosk-card { width: 100%; max-width: 480px; text-align: center; }
.kiosk-card .card { padding: 2.4rem 2rem; }
.kiosk-seal { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 1.1rem; box-shadow: 0 0 0 1px var(--line), 0 0 34px -6px var(--ac-glow); }
.kiosk h1 { font-size: 1.4rem; }
.kiosk .lede { color: var(--ink-3); margin: .4rem 0 1.6rem; }
.lanes { display: grid; gap: .7rem; }
.lane {
  display: flex; align-items: center; gap: 1rem; text-align: left;
  padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); cursor: pointer; font: inherit; color: var(--ink);
  transition: border-color .12s, background .12s;
}
.lane:hover { border-color: var(--ac); background: var(--ac-soft); }
.lane .ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--ac-soft); color: var(--ac); display: grid; place-items: center; }
.lane .ic svg { width: 22px; height: 22px; }
.lane b { display: block; font-weight: 600; }
.lane small { color: var(--ink-3); }
video { width: 100%; max-width: 320px; aspect-ratio: 1; border-radius: var(--r); background: #000; object-fit: cover; }

.hide { display: none !important; }
.stack { display: flex; flex-direction: column; gap: .8rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; }
.right { display: flex; justify-content: flex-end; }
.mt { margin-top: 1rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.3rem 0; }

@media (max-width: 560px) {
  .topbar-in { flex-wrap: wrap; }
  .card-head { flex-direction: column; gap: .5rem; }
  .btn.responsive-block { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
