/* Cockpit AgencyInABox — IDV: preto #0B0B0D, laranja #FF6A00, amarelo #FFC400, Urbanist */
:root {
  --bg: #0B0B0D;
  --panel: #141418;
  --panel-2: #1A1A20;
  --line: #26262E;
  --line-soft: #1F1F26;
  --ink: #F3F3F5;
  --muted: #8A8A96;
  --muted-2: #5E5E6A;
  --orange: #FF6A00;
  --yellow: #FFC400;
  --green: #35C46A;
  --blue: #4AA3FF;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1100px 480px at 80% -12%, rgba(255,106,0,.10), transparent 60%),
    radial-gradient(900px 420px at 5% 0%, rgba(255,196,0,.06), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: 'Urbanist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1400px; margin: 0 auto; padding: 22px 26px 60px; }

/* ---- Topbar ---- */
.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand svg { width: 44px; height: 44px; display: block; }
.brand .titles { line-height: 1.05; }
.brand h1 {
  font-size: 20px; margin: 0; font-weight: 800; letter-spacing: .3px;
  text-transform: uppercase;
}
.brand h1 .amp { color: var(--orange); }
.brand .sub { font-size: 11.5px; color: var(--muted); letter-spacing: 2.5px; text-transform: uppercase; font-weight: 600; }
.topbar .spacer { flex: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  white-space: nowrap;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.pill.live .dot { background: var(--green); box-shadow: 0 0 0 0 rgba(53,196,106,.6); animation: pulse 1.8s infinite; }
.pill.dry { color: var(--yellow); border-color: rgba(255,196,0,.35); }
.pill.dry .dot { background: var(--yellow); }
.pill.paused { color: #ff5a5a; border-color: rgba(255,90,90,.35); }
.pill.paused .dot { background: #ff5a5a; }
.clock { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 700; }

.btn {
  cursor: pointer; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); border-radius: 10px; padding: 8px 14px; font-weight: 700;
  font-family: inherit; font-size: 13px; transition: .15s;
}
.btn:hover { border-color: var(--orange); color: var(--orange); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #120a00; }
.btn.primary:hover { background: var(--yellow); border-color: var(--yellow); color: #1a1400; }
.btn.ghost { background: transparent; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ---- KPI row ---- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; position: relative; overflow: hidden;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line); }
.kpi.run::before { background: var(--yellow); }
.kpi.gate::before { background: var(--orange); }
.kpi.done::before { background: var(--green); }
.kpi.orq::before { background: var(--blue); }
.kpi .n { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 8px; font-weight: 700; }

/* ---- HOME: grade de sistemas (a home clicável) ---- */
.sysgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 30px; }
@media (max-width: 1080px) { .sysgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .sysgrid { grid-template-columns: 1fr; } }

.syscard {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 16px; cursor: pointer;
  transition: .15s; overflow: hidden; text-align: left;
}
.syscard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line); }
.syscard.ok::before   { background: var(--green); }
.syscard.warn::before { background: var(--yellow); }
.syscard.err::before  { background: #ff5a5a; }
.syscard.idle::before { background: var(--muted-2); }
.syscard:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: var(--shadow); }
.syscard .sc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.syscard .sc-ico {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line);
}
.syscard .sc-ico svg { width: 21px; height: 21px; display: block; }
.syscard .sc-titles { flex: 1; min-width: 0; }
.syscard .sc-title { font-size: 15px; font-weight: 800; line-height: 1.15; }
.syscard .sc-sub { font-size: 10.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-top: 2px; }
.sc-status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px; padding: 4px 9px; border-radius: 999px; flex: none;
  border: 1px solid var(--line); color: var(--muted);
}
.sc-status .d { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.sc-status.ok   { color: var(--green);  border-color: rgba(53,196,106,.35); } .sc-status.ok .d   { background: var(--green); }
.sc-status.warn { color: var(--yellow); border-color: rgba(255,196,0,.35); }  .sc-status.warn .d { background: var(--yellow); }
.sc-status.err  { color: #ff6a6a;       border-color: rgba(255,90,90,.4); }   .sc-status.err .d  { background: #ff5a5a; }
.sc-status.idle { color: var(--muted-2); }
.syscard .sc-summary { font-size: 13px; color: var(--ink); line-height: 1.4; min-height: 36px; font-weight: 600; }
.syscard .sc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line-soft); }
.syscard .sc-last { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.syscard .sc-last b { color: var(--ink); font-variant-numeric: tabular-nums; }
.syscard .sc-open { font-size: 11.5px; color: var(--orange); font-weight: 800; }
.syscard .sc-note { font-size: 10.5px; color: var(--muted-2); margin-top: 8px; line-height: 1.35; font-style: italic; }

/* ---- Drawer (painel de execuções ao clicar num sistema) ---- */
.drawer-ov { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 92vw); z-index: 61;
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: -18px 0 50px rgba(0,0,0,.5);
  display: flex; flex-direction: column; animation: slide .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes slide { from { transform: translateX(30px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.drawer .dh { display: flex; align-items: flex-start; gap: 13px; padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.drawer .dh .sc-ico { width: 44px; height: 44px; }
.drawer .dh .dh-x { margin-left: auto; background: transparent; border: 1px solid var(--line); color: var(--muted); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: 700; flex: none; }
.drawer .dh .dh-x:hover { border-color: var(--orange); color: var(--orange); }
.drawer .dh h3 { margin: 0; font-size: 17px; font-weight: 800; }
.drawer .dh .dh-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.drawer .db { padding: 16px 20px; overflow-y: auto; flex: 1; }
.drawer .d-note { background: rgba(255,196,0,.08); border: 1px solid rgba(255,196,0,.3); color: var(--yellow); font-size: 11.5px; padding: 9px 12px; border-radius: 9px; margin-bottom: 16px; line-height: 1.4; }
.exec-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted-2); font-weight: 800; margin: 4px 0 10px; }
.exec { display: grid; grid-template-columns: 8px 1fr auto; gap: 11px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.exec:last-child { border-bottom: none; }
.exec .ed { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; background: var(--muted-2); }
.exec .el { min-width: 0; }
.exec .el .t { font-weight: 700; font-size: 13px; line-height: 1.25; word-break: break-word; }
.exec .el .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.exec .ea { font-size: 11px; color: var(--muted-2); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.exec .ea.money { color: var(--green); font-weight: 800; }
.drawer .df { padding: 14px 20px 20px; border-top: 1px solid var(--line); }
.drawer .df .btn { width: 100%; text-align: center; display: block; text-decoration: none; }

/* ---- Layout ---- */
.grid-main { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
@media (max-width: 1080px) { .grid-main { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2,1fr); } }

.section-title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-size: 13px; text-transform: uppercase; letter-spacing: 1.6px; font-weight: 800; color: var(--muted);
}
.section-title .bar { width: 22px; height: 3px; background: var(--orange); border-radius: 2px; }
.section-title .count { color: var(--muted-2); font-weight: 700; letter-spacing: 0; }

/* ---- Kanban board ---- */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr 1fr; } }
.col {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; min-height: 120px;
}
.col > .col-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px;
  padding: 2px 4px 12px; color: var(--muted);
}
.col .badge { font-size: 11px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--ink); }
.col-head .swatch { width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; display: inline-block; }

.card {
  background: var(--panel-2); border: 1px solid var(--line-soft); border-left: 3px solid var(--line);
  border-radius: 10px; padding: 12px; margin-bottom: 10px; cursor: pointer; transition: .13s;
}
.card:hover { border-color: var(--line); transform: translateY(-1px); box-shadow: var(--shadow); }
.card.sel { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.card .c-mission { font-weight: 700; font-size: 13.5px; line-height: 1.3; margin-bottom: 8px; }
.card .c-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.tag { background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); border-radius: 6px; padding: 1px 7px; font-weight: 600; }
.tag.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.card.run { border-left-color: var(--yellow); }
.card.gate { border-left-color: var(--orange); }
.card.done { border-left-color: var(--green); }
.card.orq { border-left-color: var(--blue); }
.mini-bar { height: 4px; background: var(--line-soft); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.mini-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--orange); }

/* ---- Mission detail card ---- */
.detail { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 18px; }
.detail.empty { color: var(--muted); text-align: center; padding: 40px 18px; }
.detail .status-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line);
}
.chip-run { color: var(--yellow); border-color: rgba(255,196,0,.4); }
.chip-gate { color: var(--orange); border-color: rgba(255,106,0,.4); }
.chip-done { color: var(--green); border-color: rgba(53,196,106,.4); }
.chip-orq { color: var(--blue); border-color: rgba(74,163,255,.4); }
.detail h2 { font-size: 17px; margin: 12px 0 4px; font-weight: 800; line-height: 1.25; }
.detail .who { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.detail .who b { color: var(--ink); font-weight: 700; }

.progress { margin: 14px 0 18px; }
.progress .p-top { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.progress .track { height: 8px; background: var(--line-soft); border-radius: 5px; overflow: hidden; }
.progress .track > i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--yellow)); border-radius: 5px; transition: width .4s; }

.field { margin-bottom: 14px; }
.field .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted-2); font-weight: 800; margin-bottom: 5px; }
.field .v { font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.field .v.muted { color: var(--muted); }
.prs { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-link { font-size: 12px; font-weight: 700; color: var(--orange); text-decoration: none; border: 1px solid rgba(255,106,0,.3); padding: 2px 9px; border-radius: 6px; }
.pr-link:hover { background: rgba(255,106,0,.1); }
.detail-actions { display: flex; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }

/* ---- Placar dos robôs ---- */
.placar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
table.placar-t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.placar-t th { text-align: right; font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted-2); font-weight: 800; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.placar-t th:first-child, table.placar-t td:first-child { text-align: left; }
table.placar-t td { padding: 10px 8px; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
table.placar-t tr:last-child td { border-bottom: none; }
.rank { display: inline-flex; align-items: center; gap: 9px; }
.medal { font-size: 15px; width: 18px; text-align: center; }
.robo-name { font-weight: 700; }
.pos-val { color: var(--green); font-weight: 700; }
.neg-val { color: #ff6a6a; font-weight: 700; }
.roi-pill { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.roi-good { color: var(--green); background: rgba(53,196,106,.12); }
.roi-bad { color: #ff6a6a; background: rgba(255,90,90,.12); }
.roi-na { color: var(--muted-2); }

/* ---- Ops feed ---- */
.feed { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; max-height: 460px; overflow-y: auto; }
.ev { display: grid; grid-template-columns: 9px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.ev:last-child { border-bottom: none; }
.ev .odot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: var(--muted-2); }
.ev.ok .odot { background: var(--green); }
.ev.warn .odot { background: var(--yellow); }
.ev.err .odot { background: #ff5a5a; }
.ev .name { font-weight: 700; font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ev .src { font-size: 11px; color: var(--muted); }
.ev .ago { font-size: 11px; color: var(--muted-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 26px; align-items: start; }
@media (max-width: 1080px) { .two-col { grid-template-columns: 1fr; } }

.block { margin-top: 26px; }
.err-banner { background: rgba(255,90,90,.1); border: 1px solid rgba(255,90,90,.4); color: #ff8a8a; padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 18px; }
.empty-note { color: var(--muted-2); font-size: 12.5px; padding: 8px 4px; }
.footer { margin-top: 40px; text-align: center; color: var(--muted-2); font-size: 11.5px; letter-spacing: .3px; }
.footer b { color: var(--muted); }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--orange); color: #120a00; font-weight: 800; padding: 11px 22px;
  border-radius: 10px; box-shadow: var(--shadow); z-index: 50; font-size: 13.5px;
  animation: rise .25s ease;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(53,196,106,.5); } 70% { box-shadow: 0 0 0 7px rgba(53,196,106,0); } 100% { box-shadow: 0 0 0 0 rgba(53,196,106,0); } }
.spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- ops_logs: última execução real por sistema (task 86ajevky4) ---- */
.oplogs { margin: 26px 0 6px; }
.oplog-t { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.oplog-t th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-2); font-weight: 800; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.oplog-t td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13px; vertical-align: middle; }
.oplog-t tbody tr:last-child td { border-bottom: none; }
.oplog-t tbody tr:hover { background: var(--panel-2); }
.mono, .oplog-t .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.op-src { display: inline-block; font-weight: 800; color: var(--orange); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.op-aid { display: block; color: var(--muted); margin-top: 2px; font-size: 11px; }
.op-badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 800; border: 1px solid var(--line); color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.op-badge.ok  { color: var(--green);  border-color: rgba(53,196,106,.4); background: rgba(53,196,106,.08); }
.op-badge.err { color: #ff6a6a;       border-color: rgba(255,90,90,.45); background: rgba(255,90,90,.08); }
.op-badge.warn{ color: var(--yellow); border-color: rgba(255,196,0,.4); background: rgba(255,196,0,.07); }
.op-badge.run { color: var(--blue);   border-color: rgba(74,163,255,.4); background: rgba(74,163,255,.08); }
.oplog-errs { margin-top: 14px; background: rgba(255,90,90,.05); border: 1px solid rgba(255,90,90,.28); border-radius: var(--radius); padding: 12px 16px; }
.oplog-errs .oe-h { font-weight: 800; font-size: 12.5px; color: #ff7a7a; margin-bottom: 8px; }
.oplog-errs .oe { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 12px; }
.oplog-errs .oe .ago { color: var(--muted-2); white-space: nowrap; }
.oplog-feed { margin-top: 14px; }
.oplog-feed .of-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted-2); font-weight: 800; margin: 4px 0 8px; }

/* log real dentro do card e do drawer */
.syscard .sc-real { display: flex; align-items: center; gap: 8px; margin: 9px 0 2px; padding: 7px 9px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 9px; }
.syscard .sc-real .mono { color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.syscard .sc-real .sc-real-ago { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; font-weight: 700; }
.d-real { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.d-real .dr-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-2); font-weight: 800; margin-bottom: 8px; }
.d-real .dr-row { display: flex; align-items: center; gap: 10px; }
.d-real .dr-row .mono { color: var(--ink); flex: 1; min-width: 0; }
.d-real .dr-ago { color: var(--muted); white-space: nowrap; font-size: 12px; }
.d-real .dr-sub { font-size: 12px; color: var(--muted); margin-top: 7px; }

/* ═══════════════════════════════════════════════════════════════════════════
   F0 · Login + sidebar por função (task 86ak9dj70)
   Mesma paleta do painel: preto #0B0B0D, laranja #FF6A00, Urbanist.
   [FALTA: skill telas-aiab — não existe no host; segui a estética já no ar.]
   ═════════════════════════════════════════════════════════════════════════ */

/* ---- Tela de login ---- */
body.tela-login { display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 400px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 32px 30px 26px;
}
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.login-brand svg { width: 44px; height: 44px; display: block; }
.login-brand h1 {
  font-size: 19px; margin: 0; font-weight: 800; letter-spacing: .3px; text-transform: uppercase;
}
.login-brand h1 .amp { color: var(--orange); }
.login-brand .sub {
  font-size: 11px; color: var(--muted); letter-spacing: 2.4px;
  text-transform: uppercase; font-weight: 600;
}
.login-card label {
  display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--muted); margin: 0 0 7px;
}
.login-card input {
  width: 100%; padding: 11px 13px; margin-bottom: 17px; font-size: 15px;
  font-family: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; outline: none;
}
.login-card input:focus { border-color: var(--orange); }
.login-card .btn { width: 100%; justify-content: center; padding: 11px; font-size: 14.5px; }
.login-card .btn[disabled] { opacity: .6; cursor: default; }
.login-erro {
  margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  color: #ff8f8f; background: rgba(255,90,90,.08); border: 1px solid rgba(255,90,90,.3);
}
.login-rodape { margin: 22px 0 0; font-size: 12px; line-height: 1.55; color: var(--muted-2); }

/* ---- Shell: sidebar + área do módulo ---- */
.app-shell { display: flex; min-height: 100vh; align-items: stretch; }
.app-shell > .wrap { flex: 1; min-width: 0; }        /* min-width:0 = tabela larga não empurra a sidebar */

.sidebar {
  width: 224px; flex: none; padding: 22px 14px; border-right: 1px solid var(--line-soft);
  background: rgba(20,20,24,.55); display: flex; flex-direction: column; gap: 5px;
}
.sidebar .marca { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
.sidebar .marca svg { width: 32px; height: 32px; display: block; }
.sidebar .marca b { font-size: 13.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.sidebar .marca .amp { color: var(--orange); }
.sidebar .titulo {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--muted-2); padding: 4px 10px 8px;
}
.side-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; background: none; width: 100%; text-align: left;
  font-family: inherit;
}
.side-item:hover { color: var(--ink); background: var(--panel-2); }
.side-item.ativo { color: var(--ink); background: var(--panel-2); border-color: var(--line); }
.side-item.ativo svg { stroke: var(--orange); }
.side-item svg { width: 18px; height: 18px; flex: none; }
.side-item .acesso {
  margin-left: auto; font-size: 9.5px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted-2);
}
.sidebar .rodape { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.sidebar .usuario { padding: 0 11px 10px; }
.sidebar .usuario .nome { font-size: 13.5px; font-weight: 700; }
.sidebar .usuario .email {
  font-size: 11px; color: var(--muted-2); word-break: break-all; line-height: 1.4;
}

/* ---- Módulo ainda sem conteúdo (Clientes = F1) ---- */
.modulo-vazio {
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 44px 34px; text-align: center; margin-top: 8px;
}
.modulo-vazio h2 { margin: 0 0 10px; font-size: 22px; font-weight: 800; }
.modulo-vazio p { margin: 0 auto; max-width: 520px; color: var(--muted); line-height: 1.6; font-size: 14px; }
.modulo-vazio .marcador {
  display: inline-block; margin-bottom: 18px; padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--yellow); background: rgba(255,196,0,.08); border: 1px solid rgba(255,196,0,.3);
}

/* ---- Sem acesso (403) e carregando ---- */
.aviso-central { max-width: 560px; margin: 14vh auto; text-align: center; padding: 0 22px; }
.aviso-central h2 { font-size: 21px; font-weight: 800; margin: 0 0 12px; }
.aviso-central p { color: var(--muted); line-height: 1.6; margin: 0 0 20px; }

@media (max-width: 820px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    border-right: none; border-bottom: 1px solid var(--line-soft); padding: 12px;
  }
  .sidebar .marca { padding: 0 8px 0 4px; }
  .sidebar .titulo { display: none; }
  .side-item { width: auto; }
  .sidebar .rodape { margin: 0 0 0 auto; padding: 0; border: none; display: flex; align-items: center; gap: 10px; }
  .sidebar .usuario { display: none; }
}
