/* Extreme Sign — design system (mockups 2Vkz7zY1V9Kqx28FiLa63T e 5FXFSqHo1PP9xNF5ZEnUqJ). */
@font-face { font-family: 'Manrope'; font-weight: 600; font-display: swap; src: url(/fonts/manrope-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url(/fonts/manrope-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap; src: url(/fonts/manrope-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 700; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Caveat'; font-weight: 600; font-display: swap; src: url(/fonts/caveat-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Caveat'; font-weight: 700; font-display: swap; src: url(/fonts/caveat-latin-700-normal.woff2) format('woff2'); }

:root {
  --ground: #F5F6FB; --surface: #FFFFFF; --surface-2: #FBFCFE; --surface-3: #F1F3F9;
  --ink: #151830; --muted: #5C6178; --faint: #8C91A6;
  --border: #E5E8F2; --border-strong: #D3D8E8;
  /* identidade Extreme Sign (06/10/2026): teal da marca; #08798B dá contraste 5:1 com texto branco */
  --primary: #08798B; --primary-ink: #065F6D; --primary-soft: #DDF3F5;
  --accent: #10B892; --marca-navy: #031A2A; --marca-ciano: #3FE3EE; --marca-verde: #12F0C0;
  --ok: #12996B; --ok-soft: #DCF4E9;
  --warn: #C77400; --warn-soft: #FBEED6;
  --wait: #3D74C9; --wait-soft: #E1ECFA;
  --danger: #D0433B; --danger-soft: #FBE3E1;
  --zap: #12996B;
  --shadow: 0 1px 2px rgba(21,24,48,.05), 0 6px 20px -12px rgba(21,24,48,.22);
  --shadow-lg: 0 12px 40px -16px rgba(21,24,48,.28);
  --r: 14px; --r-sm: 10px;
  --display: 'Manrope', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --script: 'Caveat', 'Segoe Script', cursive;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -.015em; text-wrap: balance; }
a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.grid2 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.grid-form .full { grid-column: 1 / -1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- shell */
.app { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.mark { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; }
.mark img { width: 100%; height: 100%; display: block; }
.brand b i, .abar b i { font-style: normal; background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand b { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: -.02em; display: block; }
.brand span { display: block; font-size: 11px; color: var(--faint); font-weight: 600; margin-top: -2px; }
.nav-label { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); padding: 14px 8px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--muted); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.nav a svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a.on { background: var(--primary-soft); color: var(--primary-ink); }
.nav a .pill { margin-left: auto; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 1px 7px; font-family: var(--mono); }
.side-foot { margin-top: auto; padding: 12px 8px 0; font-size: 11px; color: var(--faint); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 12px 26px; }
.tenant { display: flex; align-items: center; gap: 9px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px 5px 6px; font-weight: 600; font-size: 13px; min-width: 0; }
.tenant .av { width: 24px; height: 24px; border-radius: 6px; background: #12303A; color: #7FE7C4; display: grid; place-items: center; font-size: 11px; font-weight: 800; font-family: var(--display); overflow: hidden; flex: 0 0 auto; }
.tenant .av img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.tenant .av.logo { width: auto; max-width: 120px; height: 26px; background: none; border-radius: 0; }
.tenant .av.logo img { width: auto; height: 26px; max-width: 120px; background: none; }
.tenant small { color: var(--faint); font-weight: 600; white-space: nowrap; }
.tenant .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; position: relative; }
.saldo-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #BFE6D4; background: var(--ok-soft); color: var(--ok); border-radius: 20px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.saldo-chip b { font-family: var(--mono); color: var(--ink); font-weight: 600; }
.saldo-chip.warn { background: var(--warn-soft); color: var(--warn); border-color: #F0D29E; }
.saldo-chip.err { background: var(--danger-soft); color: var(--danger); border-color: #F2B8B3; }
.saldo-chip:hover { filter: brightness(.97); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.me { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: grid; place-items: center; font-weight: 800; font-family: var(--display); border: 0; cursor: pointer; font-size: 13px; }
.menu { position: absolute; right: 0; top: 46px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--shadow-lg); min-width: 230px; padding: 6px; z-index: 30; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu .who b { display: block; font-size: 13px; }
.menu .who span { font-size: 12px; color: var(--faint); }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 9px; padding: 9px 10px; border: 0; background: none; border-radius: 8px; font: inherit; font-weight: 600; font-size: 13px; color: var(--ink); cursor: pointer; text-align: left; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-3); }
.menu svg { width: 16px; height: 16px; color: var(--muted); }
.hamb { display: none; }

.content { padding: 26px; display: flex; flex-direction: column; gap: 20px; max-width: 1200px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; letter-spacing: -.025em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.head-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; background: none; border: 0; padding: 0; margin-bottom: 6px; }
.back:hover { color: var(--ink); }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 10px 16px; font-family: var(--body); font-weight: 700; font-size: 13.5px; cursor: pointer; border: 1px solid transparent; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.btn svg { width: 17px; height: 17px; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-ink); }
.btn-grad { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: var(--shadow); font-family: var(--display); font-weight: 800; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-sm { padding: 7px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: progress; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary-ink); font-weight: 700; font-size: 12.5px; cursor: pointer; font-family: inherit; }

/* ---------------------------------------------------------------- KPI / cards */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 9px; }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; }
.kpi .k-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.kpi .k-ico svg { width: 18px; height: 18px; }
.kpi .k-lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .k-val { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: 12px; font-weight: 600; color: var(--faint); }
.ico-blue { background: var(--primary-soft); color: var(--primary-ink); }
.ico-amber { background: var(--warn-soft); color: var(--warn); }
.ico-green { background: var(--ok-soft); color: var(--ok); }
.ico-wait { background: var(--wait-soft); color: var(--wait); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-h h2 { font-size: 15px; letter-spacing: -.01em; }
.card-h p { margin: 0; font-size: 12.5px; color: var(--muted); width: 100%; }
.card-h .link { margin-left: auto; color: var(--primary-ink); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.card-b { padding: 18px; }
.card-f { padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface-2); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------------------------------------------------------------- tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 700; padding: 10px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 12px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.doc { display: flex; align-items: center; gap: 11px; min-width: 200px; }
.doc .fi { width: 30px; height: 30px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-ink); display: grid; place-items: center; flex: 0 0 auto; }
.doc .fi svg { width: 16px; height: 16px; }
.doc b { font-weight: 700; font-size: 13px; display: block; }
.doc small { color: var(--faint); font-family: var(--mono); font-size: 11px; }
.who { font-weight: 600; min-width: 150px; }
.who small { display: block; color: var(--faint); font-weight: 500; }
.empty { text-align: center; color: var(--muted); padding: 34px 18px; }
.empty b { display: block; color: var(--ink); font-family: var(--display); font-size: 15px; margin-bottom: 4px; }

/* ---------------------------------------------------------------- chips */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; border-radius: 20px; padding: 3px 9px; white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-ok { background: var(--ok-soft); color: var(--ok); }
.st-wait { background: var(--wait-soft); color: var(--wait); }
.st-warn { background: var(--warn-soft); color: var(--warn); }
.st-can { background: var(--danger-soft); color: var(--danger); }
.st-neutral { background: var(--surface-3); color: var(--muted); }
.lvl { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 600; }
.channels { display: flex; gap: 6px; }
.ch { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--border); color: var(--muted); }
.ch svg { width: 13px; height: 13px; }
.ch.zap { color: var(--zap); background: var(--ok-soft); border-color: transparent; }
.ch.mail { color: var(--wait); background: var(--wait-soft); border-color: transparent; }
.progress-mini { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.bar { height: 6px; border-radius: 10px; background: var(--surface-3); overflow: hidden; width: 70px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* ---------------------------------------------------------------- tabs / filtros */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 20px; padding: 6px 12px; font: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.tabs button.on { background: var(--primary-soft); color: var(--primary-ink); border-color: transparent; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; color: var(--faint); min-width: 240px; }
.search input { border: 0; background: transparent; outline: none; color: var(--ink); font: inherit; width: 100%; padding: 0; }
.search svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl-t { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.field .req { color: var(--danger); }
.help { font-size: 12px; color: var(--faint); }
.inp, select.inp, textarea.inp { width: 100%; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; padding: 10px 12px; font: inherit; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.inp[readonly] { background: var(--surface-3); color: var(--muted); }
.inp.err { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.field .msg-err { font-size: 12px; color: var(--danger); font-weight: 600; }
textarea.inp { min-height: 84px; resize: vertical; }
.pw { position: relative; }
.pw .inp { padding-right: 44px; }
.pw .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: none; color: var(--faint); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.pw .eye:hover { color: var(--ink); background: var(--surface-3); }
.pw .eye svg { width: 18px; height: 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 600; font-size: 13px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin-top: 1px; flex: 0 0 auto; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; font-size: 13px; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 20px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { left: 19px; }

.opt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.opt { border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; background: var(--surface); }
.opt:hover { border-color: var(--border-strong); }
.opt input { margin-top: 2px; accent-color: var(--primary); width: 17px; height: 17px; flex: 0 0 auto; }
.opt.on { border-color: var(--primary); background: var(--primary-soft); }
.opt b { display: block; font-size: 13.5px; }
.opt span { font-size: 12px; color: var(--muted); }
.opt .ch { flex: 0 0 auto; }

.drop { border: 1.5px dashed var(--border-strong); border-radius: var(--r); background: var(--surface-2); padding: 26px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-soft); }
.drop svg { width: 34px; height: 34px; color: var(--primary); }
.drop b { display: block; font-family: var(--display); margin-top: 6px; }
.drop.has { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }

.sig-row { display: grid; grid-template-columns: 28px 1.4fr 1fr 1.3fr 1fr 0.95fr 34px; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.sig-row:last-child { border-bottom: 0; }
.sig-row .n { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-ink); display: grid; place-items: center; font-weight: 800; font-size: 12px; margin-top: 7px; font-family: var(--mono); }
.sig-row .rm { margin-top: 4px; }

.logo-box { width: 180px; height: 90px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2) center/contain no-repeat; display: grid; place-items: center; color: var(--faint); font-size: 12px; }

/* ---------------------------------------------------------------- alerts / toast / modal */
.alert { border-radius: var(--r-sm); padding: 11px 14px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.alert.err { background: var(--danger-soft); color: #9d2b24; }
.alert.ok { background: var(--ok-soft); color: #0c6b4b; }
.alert.warn { background: var(--warn-soft); color: #8a5200; }
.alert.info { background: var(--wait-soft); color: #274f8f; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: min(380px, calc(100vw - 36px)); }
.toast { background: var(--ink); color: #fff; border-radius: 10px; padding: 11px 14px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); animation: entra .18s ease-out; }
.toast.err { background: #9d2b24; }
.toast.ok { background: #0c6b4b; }
.toast.warn { background: #8a5200; }
@keyframes entra { from { transform: translateY(8px); opacity: 0; } }
.modal-bg { position: fixed; inset: 0; background: rgba(21,24,48,.42); display: grid; place-items: center; z-index: 90; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-lg); width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.modal .card-h { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal .x { margin-left: auto; }

/* ---------------------------------------------------------------- charts / timeline */
.bars { display: flex; align-items: flex-end; gap: 9px; height: 120px; margin-top: 8px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; align-items: center; height: 100%; }
.bars .b i { width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(var(--primary), var(--accent)); display: block; min-height: 4px; opacity: .9; }
.bars .b span { font-size: 10.5px; color: var(--faint); font-weight: 600; }
.bars .b em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--muted); font-family: var(--mono); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--faint); font-family: var(--mono); font-size: 11.5px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--faint); font-weight: 600; }
.kv dd { margin: 0; word-break: break-word; }

.signer-card { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.signer-card .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.signer-card .n { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-ink); display: grid; place-items: center; font-weight: 800; font-size: 12px; font-family: var(--mono); flex: 0 0 auto; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; }
.linkbox code { font-family: var(--mono); font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 60%), var(--ground); }
.auth .card { width: min(410px, 100%); }
.auth .qr { display: grid; place-items: center; gap: 8px; padding: 10px; background: var(--surface-2); border-radius: var(--r-sm); border: 1px solid var(--border); }
.auth .qr img { width: 190px; height: 190px; image-rendering: pixelated; }

/* ---------------------------------------------------------------- responsivo */
@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 60; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .side.aberta { transform: none; }
  .hamb { display: grid; }
  .sig-row { grid-template-columns: 26px 1fr 34px; }
  .sig-row .f-nome, .sig-row .f-cel, .sig-row .f-mail, .sig-row .f-cpf, .sig-row .f-func { grid-column: 2 / 3; }
  .sig-row .rm { grid-column: 3; grid-row: 1; }
}
@media (max-width: 620px) {
  .content { padding: 16px; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .tenant small { display: none; }
  .grid-form { grid-template-columns: 1fr; }
  .kv, .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .k-val { font-size: 22px; }
  .page-head h1 { font-size: 20px; }
  .head-actions { margin-left: 0; width: 100%; }
}

/* Conversão do arquivo enviado para PDF (novo envelope) */
.conv svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.conv .spin { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.previa-pdf { width: 100%; height: min(75vh, 900px); border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; }

/* Vários arquivos juntados num PDF (novo envelope) */
.lista-arq { display: grid; gap: 6px; }
.lista-arq .arq { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.lista-arq .arq .n { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); font: 700 12px/1 var(--body); }
.lista-arq .arq .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lista-arq .arq .nm small { margin-left: 8px; font-weight: 400; color: var(--muted); }
.lista-arq .icon-btn[disabled] { opacity: .35; cursor: default; }

/* Revisão de conteúdo (Admin Master): imagem borrada até clicar */
.img-moderacao { display: block; max-width: 100%; max-height: 65vh; margin: 0 auto; filter: blur(22px); cursor: pointer; transition: filter .2s; border-radius: var(--r-sm); }
.img-moderacao.revelada { filter: none; cursor: default; }

/* Aviso de versão nova (aba aberta desde antes de uma atualização) */
.faixa-versao { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg); }
.faixa-versao button { flex: 0 0 auto; border: 0; border-radius: 8px; padding: 8px 12px; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; }

/* Novo envelope: modo com vários arquivos (juntar × separados) */
.modo-arq { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modo-arq label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--r-sm); cursor: pointer; background: var(--surface); }
.modo-arq label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.modo-arq input { margin-top: 3px; accent-color: var(--primary); }
.modo-arq b { display: block; font-size: 14px; }
.modo-arq small { color: var(--muted); }
.lista-arq .arq.doc { align-items: flex-start; }
.lista-arq .arq.doc .doc-c { flex: 1; min-width: 0; display: grid; gap: 3px; }
.lista-arq .arq.doc .doc-c .inp { padding: 7px 10px; font-weight: 600; }
.lista-arq .arq.doc .doc-c small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-arq .arq.doc .doc-msg { color: #9d2b24 !important; white-space: normal !important; }
.lista-arq .chip .spin { width: 10px; height: 10px; border-width: 1.5px; margin-right: 4px; display: inline-block; vertical-align: -1px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; animation: gira .8s linear infinite; }
.chk-mesmos { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 14px; cursor: pointer; }
.chk-mesmos input { width: 18px; height: 18px; accent-color: var(--primary); }
.grupo-sigs { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px; margin-bottom: 12px; }
.grupo-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.grupo-h .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); font: 700 12px/1 var(--body); }
@media (max-width: 640px) { .modo-arq { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Ajuda (js/ajuda.js) */
.btn-ajuda { color: var(--muted); }
.btn-ajuda:hover { color: var(--primary-ink); }
.aj-bg { position: fixed; inset: 0; background: rgba(21,24,48,.32); z-index: 95; display: flex; justify-content: flex-end; }
.aj-gaveta { background: var(--surface); width: min(440px, 100%); height: 100%; overflow: auto; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: aj-entra .18s ease-out; }
@keyframes aj-entra { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .aj-gaveta { animation: none; } }
.aj-h { position: sticky; top: 0; background: var(--surface); padding: 18px 20px 12px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.aj-h h2 { margin: 0; font-family: var(--display); font-size: 19px; grid-column: 1; }
.aj-x { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.aj-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-ink); }
.aj-b { padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.aj-topico { display: flex; flex-direction: column; gap: 10px; }
.aj-topico h3 { margin: 0; font-family: var(--display); font-size: 16px; }
.aj-resumo { margin: 0; color: var(--muted); }
.aj-passos { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.aj-passos code { font-size: 12px; background: var(--primary-soft); padding: 1px 5px; border-radius: 4px; }
.aj-sub { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.aj-q, .aj-etapa { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.aj-q summary, .aj-etapa summary { cursor: pointer; font-weight: 600; }
.aj-q > div { margin-top: 8px; color: var(--muted); line-height: 1.5; }
.aj-etapa { display: flex; flex-direction: column; gap: 8px; }
.aj-etapa[open] summary { margin-bottom: 8px; }
.aj-etapa .aj-q { margin-top: 6px; }
.aj-sig { display: flex; flex-direction: column; gap: 10px; }
.aj-video { width: 100%; border-radius: 10px; background: #000; aspect-ratio: 16 / 9; }
.aj-suporte { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.aj-central { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.aj-grupo { display: flex; flex-direction: column; gap: 10px; }
.aj-grupo h2 { margin: 6px 0 0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.aj-card > summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.aj-card > summary::-webkit-details-marker { display: none; }
.aj-card[open] > summary { border-bottom: 1px solid var(--border); }

/* subtítulo dentro de um formulário (ex.: Responsável legal no cadastro da empresa) */
.sub-form { font-family: var(--display); font-size: 15px; font-weight: 800; margin: 22px 0 6px; padding-top: 18px; border-top: 1px solid var(--border); }
