/* CobraSystem — identidade própria. Paleta: índigo noturno + esmeralda, azul e violeta (as 3 camadas do símbolo). Fonte: pilha do sistema (sem recursos externos). */
:root {
  --brand: #120E2E; --brand-2: #1C1745; --accent: #10B981; --accent-ink: #022C1E;
  --bg: #F5F5FA; --surface: #FFFFFF; --surface-2: #F8F8FC; --line: #E4E3EF; --line-2: #EFEEF6;
  --ink: #15132B; --ink-2: #4A4866; --ink-3: #807E9A;
  --blue: #1684ED; --blue-bg: #E6F2FE; --green: #0E9F6E; --green-bg: #E5F6EC; --red: #D93B3B; --red-bg: #FDECEC;
  --amber: #C27803; --amber-bg: #FFF4DC; --violet: #6D28D9; --violet-bg: #F1EAFE; --gray-bg: #EEF1F5;
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(15,27,45,.05), 0 4px 16px rgba(15,27,45,.05);
  --side: 248px; --top: 60px;
  --font: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0B0A1C; --surface: #131130; --surface-2: #18163A; --line: #2A2752; --line-2: #1F1D45;
  --ink: #ECEBF8; --ink-2: #B1AFCB; --ink-3: #7D7B9C; --brand-2: #0F0C27; --violet: #8B5CF6;
  --blue-bg: #102A4D; --green-bg: #0B2E24; --red-bg: #3A1820; --amber-bg: #352611; --violet-bg: #2A1B52; --gray-bg: #1F1D45;
  --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.red { color: var(--red); } .green { color: var(--green); } .amber { color: var(--amber); }
.hidden { display: none !important; }

/* ---------- boot / spinner ---------- */
.boot { display: grid; place-items: center; height: 100vh; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; grid-template-rows: var(--top) 1fr; height: 100vh; }
.shell.collapsed { --side: 72px; }
.sidebar { grid-row: 1 / span 2; background: var(--brand); color: #C8C6E3; display: flex; flex-direction: column; overflow: hidden; }
.brand { height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 18px; color: #fff; font-weight: 700; font-size: 17px; flex-shrink: 0; }
.brand img { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.brand b { color: var(--accent); font-weight: 700; }
.nav { padding: 8px 12px; overflow-y: auto; flex: 1; }
.nav-group { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: #6F81A0; padding: 16px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: #C9D4E5; margin-bottom: 2px; position: relative; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: rgba(16,185,129,.14); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav .count { margin-left: auto; background: rgba(255,255,255,.1); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 99px; }
.nav .count.hot { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.side-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.side-foot button { width: 100%; display: flex; gap: 12px; align-items: center; background: none; border: 0; color: #8C9BB5; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.side-foot button:hover { background: rgba(255,255,255,.06); color: #fff; }
.shell.collapsed .nav-label, .shell.collapsed .nav-group, .shell.collapsed .brand span, .shell.collapsed .nav .count { display: none; }
.shell.collapsed .nav a, .shell.collapsed .side-foot button { justify-content: center; }
.side-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 10px; font-weight: 600; cursor: pointer; margin: 4px 0 6px; }
.side-btn:hover { filter: brightness(1.05); }
.shell.collapsed .side-btn span { display: none; }

.topbar { display: flex; align-items: center; gap: 12px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); min-width: 0; }
.gsearch { position: relative; flex: 0 1 360px; }
.gsearch input { width: 100%; height: 38px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 0 12px 0 36px; outline: none; }
.gsearch input:focus { border-color: var(--blue); background: var(--surface); }
.gsearch > svg { position: absolute; left: 11px; top: 10px; width: 18px; height: 18px; color: var(--ink-3); }
.gsearch kbd { position: absolute; right: 8px; top: 8px; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--ink-3); background: var(--surface); }
.dropdown { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,27,45,.15); z-index: 40; overflow: hidden; }
.dropdown a { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.dropdown a:hover, .dropdown a.sel { background: var(--surface-2); }
.pills { display: flex; gap: 8px; margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13px; color: var(--ink-2); }
.pill:hover { border-color: var(--ink-3); }
.pill b { font-weight: 700; color: var(--ink); }
.pill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.iconbtn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; position: relative; color: var(--ink-2); }
.iconbtn:hover { color: var(--ink); border-color: var(--ink-3); }
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn .dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10.5px; display: grid; place-items: center; font-weight: 700; }
.userbtn { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 10px; position: relative; }
.userbtn:hover { background: var(--surface-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex-shrink: 0; }
.userbtn .who { text-align: left; line-height: 1.2; } .userbtn .who small { display: block; color: var(--ink-3); font-size: 11.5px; }
.menu { position: absolute; right: 0; top: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,27,45,.15); min-width: 240px; z-index: 50; padding: 6px; }
.menu button, .menu a { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu .item-sub { display: block; font-size: 12px; color: var(--ink-3); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

.main { overflow-y: auto; padding: 26px 28px 48px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--ink-3); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Botões / form ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .btn.primary { background: var(--blue); border-color: var(--blue); }
.btn.primary:hover { filter: brightness(1.15); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input { height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--surface); outline: none; width: 100%; }
textarea.input { height: auto; min-height: 86px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.row3 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr 1fr; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: 13px; color: var(--ink-2); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; cursor: pointer; transition: .15s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }

/* ---------- Cards / KPIs ---------- */
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; }
.card-h h3 { font-size: 15px; font-weight: 650; }
.card-b { padding: 0 18px 18px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative; cursor: default; border-top: 3px solid var(--line); }
.kpi.link { cursor: pointer; } .kpi.link:hover { border-color: var(--ink-3); }
.kpi .lbl { color: var(--ink-2); font-size: 12.5px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.kpi .lbl svg { width: 16px; height: 16px; }
.kpi .val { font-size: 26px; font-weight: 750; letter-spacing: -.02em; }
.kpi .val small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 3px; }
.kpi .val .cur { font-size: 14px; color: var(--ink-3); font-weight: 600; margin-right: 3px; }
.kpi .sub { color: var(--ink-3); font-size: 12px; }
.kpi.t-blue { border-top-color: var(--blue); } .kpi.t-green { border-top-color: var(--green); } .kpi.t-red { border-top-color: var(--red); }
.kpi.t-amber { border-top-color: var(--amber); } .kpi.t-violet { border-top-color: var(--violet); } .kpi.t-brand { border-top-color: var(--brand); }
.kpi.sel { box-shadow: 0 0 0 2px var(--brand) inset, var(--shadow); }
:root[data-theme="dark"] .kpi.sel { box-shadow: 0 0 0 2px var(--accent) inset; }
.mb { margin-bottom: 16px; }

/* ---------- Tabelas ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 650; color: var(--ink-3); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.sortable { cursor: pointer; user-select: none; } .tbl th.sortable:hover { color: var(--ink); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr { transition: background .08s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--surface-2); }
.tbl tbody tr.sel { background: var(--blue-bg); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .who b { display: block; font-weight: 600; font-size: 13.5px; } .tbl .who small { color: var(--ink-3); font-size: 12px; }
.empty { padding: 40px; text-align: center; color: var(--ink-3); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }

/* ---------- Badges / chips / tabs ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--gray-bg); color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-em_aberto { background: var(--gray-bg); color: var(--ink-2); }
.b-cobrado { background: var(--blue-bg); color: var(--blue); }
.b-sem_retorno { background: var(--amber-bg); color: var(--amber); }
.b-acordo { background: var(--violet-bg); color: var(--violet); }
.b-execucao { background: var(--red-bg); color: var(--red); }
.b-pago, .b-baixado { background: var(--green-bg); color: var(--green); }
.b-ignorado { background: var(--gray-bg); color: var(--ink-3); } .b-nao_encontrado { background: var(--red-bg); color: var(--red); }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.search { position: relative; min-width: 240px; }
.search input { padding-left: 34px; height: 36px; }
.search svg { position: absolute; left: 10px; top: 9px; width: 17px; height: 17px; color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px dashed var(--line); background: var(--surface); font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.chip b { font-weight: 700; font-size: 11.5px; color: var(--ink-3); }
.chip.on { border-style: solid; border-color: var(--brand); background: var(--brand); color: #fff; } .chip.on b { color: var(--accent); }
.chip:disabled { opacity: .45; cursor: default; }
.tabs { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { padding: 13px 12px; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; color: var(--ink-3); font-weight: 600; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.tab .n { font-size: 11px; background: var(--gray-bg); padding: 1px 7px; border-radius: 99px; }
.tab.on .n { background: var(--brand); color: #fff; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 0 12px; height: 34px; cursor: pointer; color: var(--ink-3); font-weight: 600; font-size: 12.5px; }
.seg button.on { background: var(--brand); color: #fff; }

/* ---------- Barras / gráficos ---------- */
.bars .bar-row { display: grid; grid-template-columns: 130px 1fr 120px; gap: 12px; align-items: center; padding: 7px 0; }
.bar { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--blue)); width: 0; transition: width .5s ease; }
.bar.blue > i { background: linear-gradient(90deg, var(--brand), var(--blue)); }
.bar.red > i { background: var(--red); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
svg.chart { width: 100%; height: 240px; display: block; }
svg.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
svg.chart .grid-l { stroke: var(--line-2); }

/* ---------- Fila: visão dividida ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.preview { position: sticky; top: 0; }
.preview .head { padding: 18px; border-bottom: 1px solid var(--line); }
.preview .head h3 { font-size: 16px; }
.preview .meta { color: var(--ink-3); font-size: 12.5px; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 18px; }
.mini div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.mini small { color: var(--ink-3); font-size: 11.5px; display: block; } .mini b { font-size: 17px; }
.dl { padding: 0 18px; } .dl div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; } .dl span { color: var(--ink-3); }
.plist { padding: 8px 18px; max-height: 260px; overflow-y: auto; }
.plist .p { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.plist .p small { color: var(--ink-3); display: block; font-size: 11.5px; }
.note { margin: 10px 18px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--ink-2); }
.preview .foot { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); align-items: center; }

/* ---------- Cockpit ---------- */
.client-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.client-head h1 { font-size: 24px; }
.client-head .meta { display: flex; gap: 10px; align-items: center; color: var(--ink-3); margin-top: 8px; flex-wrap: wrap; }
.crumbs { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.timeline { padding: 4px 18px 18px; }
.tl { display: grid; grid-template-columns: 18px 1fr; gap: 10px; position: relative; padding-bottom: 14px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line-2); }
.tl:last-child::before { display: none; }
.tl .dotc { width: 14px; height: 14px; border-radius: 50%; border: 3px solid currentColor; background: var(--surface); margin-top: 3px; }
.tl .h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.tl p { margin: 5px 0 0; font-size: 13.5px; }
.msgbox { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.form-card .tag { display: inline-flex; background: var(--amber-bg); color: var(--amber); font-weight: 600; font-size: 12px; padding: 4px 10px; border-radius: 99px; margin-bottom: 14px; }
.side-stack { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; }

/* ---------- Modal / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8,15,28,.5); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 16px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,.3); }
.modal.wide { max-width: 760px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 17px; }
.modal-b { padding: 20px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 16px 16px; }
#toast-root { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--brand); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 380px; font-size: 13.5px; animation: up .18s; border-left: 4px solid var(--accent); }
.toast.err { border-left-color: var(--red); } .toast.ok { border-left-color: var(--green); }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Login ---------- */
.login { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 100vh; }
.login-l { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 7vw, 110px); background: var(--surface); }
.login-l .brand { color: var(--ink); padding: 0; height: auto; margin-bottom: 36px; }
.login-l h1 { font-size: 30px; margin-bottom: 8px; }
.login-l p.lead { color: var(--ink-3); margin: 0 0 28px; }
.login-l form { max-width: 380px; }
.login-l .btn { width: 100%; height: 44px; }
.login-r { background: linear-gradient(180deg, rgba(18,14,46,0) 35%, rgba(18,14,46,.85) 75%), url(/img/login-bg.webp) center top / cover no-repeat, var(--brand); justify-content: flex-end !important; color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 90px); }
.login-r h2 { font-size: 34px; line-height: 1.15; max-width: 480px; }
.login-r h2 b { color: var(--accent); }
.login-r ul { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; max-width: 460px; }
.login-r li { display: flex; gap: 12px; align-items: flex-start; color: #D4D2EE; }
.login-r li svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.login-r .secure { margin-top: 40px; font-size: 12.5px; color: #9896BE; display: flex; gap: 8px; align-items: center; }
.err-box { background: var(--red-bg); color: var(--red); padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.pw { position: relative; } .pw button { position: absolute; right: 6px; top: 5px; }

/* ---------- Guia ---------- */
.steps { counter-reset: s; }
.step { padding: 18px; } .step .n { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--accent); display: grid; place-items: center; font-weight: 700; margin-bottom: 10px; }
.step b { display: block; margin-bottom: 4px; } .step span { color: var(--ink-3); font-size: 13px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 28px; padding: 6px 18px 18px; }
.perm-grid h4 { grid-column: 1 / -1; margin: 14px 0 4px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.perm { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.perm small { display: block; color: var(--ink-3); font-size: 11.5px; }
.pct-input { width: 76px; height: 34px; text-align: right; }

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) { .split { grid-template-columns: 1fr; } .preview { position: static; } .g-main { grid-template-columns: 1fr; } .side-stack { position: static; } }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pills { display: none; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; } .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 90; transform: translateX(-100%); transition: transform .2s; }
  .shell.mobile-open .sidebar { transform: none; } .menu-toggle { display: grid !important; }
  .g3, .g2 { grid-template-columns: 1fr; } .main { padding: 18px 16px 40px; } .userbtn .who { display: none; }
  .login { grid-template-columns: 1fr; } .login-r { display: none; } .row, .row3 { grid-template-columns: 1fr; }
  .bars .bar-row { grid-template-columns: 100px 1fr 90px; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr; } .gsearch { display: none; } }
.menu-toggle { display: none !important; }
.spinner.center { margin: 0 auto; }
.login-r .secure svg { width: 16px; height: 16px; }
.login-l .pw .btn { width: auto; height: 30px; padding: 0 8px; }
.login-l .pw .input { padding-right: 44px; }
code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line-2); padding: 1px 5px; border-radius: 5px; }
.flex1 { flex: 1; }
.side-foot svg { width: 18px; height: 18px; flex-shrink: 0; }
.tbl th.right, .tbl td.right { text-align: right; }

/* ---------- Identidade v2 ---------- */
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.25); }
:root[data-theme="dark"] .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.login-l .brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 14px rgba(18,14,46,.18); }
.login-l .brand { font-size: 20px; }
@media (max-width: 860px) {
  .login-l { background: linear-gradient(180deg, rgba(18,14,46,.15) 0, rgba(18,14,46,.55) 120px, var(--surface) 190px), url(/img/login-bg.webp) center -60px / 100% auto no-repeat, var(--surface); padding-top: 40px; justify-content: flex-start; }
  .login-l .brand { color: #fff; margin-bottom: 100px; }
}
