/* Makker OS — sistema de gestão para estética automotiva
   Desenvolvido por Caçador Digital (cacadordigital.com.br) */
:root {
  --acc: #6D5EF8;           /* cor da marca da empresa (definida em Empresa) */
  --acc-ink: #FFFFFF;       /* texto sobre a cor da marca */
  --acc-soft: color-mix(in srgb, var(--acc) 13%, transparent);
  --acc-line: color-mix(in srgb, var(--acc) 35%, transparent);
  --acc-text: color-mix(in srgb, var(--acc) 72%, #000);

  --bg: #F3F4F7;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --surface-3: #EEF0F4;
  --line: #E6E8EE;
  --line-2: #D9DCE3;
  --text: #12141A;
  --text-2: #636A77;
  --text-3: #9198A4;
  --ink: #12141A;

  --green: #12A150; --green-soft: color-mix(in srgb, #12A150 13%, transparent);
  --red: #E0453A; --red-soft: color-mix(in srgb, #E0453A 12%, transparent);
  --blue: #2F6FEB; --blue-soft: color-mix(in srgb, #2F6FEB 12%, transparent);
  --amber: #C77A06; --amber-soft: color-mix(in srgb, #F2A51A 16%, transparent);
  --purple: #8B3FD1;

  --r-sm: 9px; --r: 14px; --r-lg: 20px;
  --shadow: 0 1px 2px rgba(16, 18, 24, .04), 0 1px 1px rgba(16, 18, 24, .02);
  --shadow-lg: 0 24px 60px -12px rgba(16, 18, 24, .28), 0 2px 8px rgba(16,18,24,.06);
  --sidebar: 256px;

  /* compatibilidade */
  --laranja: var(--acc); --laranja-forte: var(--acc-text); --laranja-suave: var(--acc-soft);
  --grafite: var(--ink); --grafite-2: var(--text-2); --borda: var(--line); --fundo: var(--bg); --card: var(--surface);
  --texto: var(--text); --texto-2: var(--text-2); --cinza: var(--text-3);
  --verde: var(--green); --verde-suave: var(--green-soft); --vermelho: var(--red); --vermelho-suave: var(--red-soft);
  --azul: var(--blue); --azul-suave: var(--blue-soft); --raio: var(--r); --sombra: var(--shadow);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0C0E12;
  --surface: #14171C;
  --surface-2: #1A1E24;
  --surface-3: #22272F;
  --line: #242932;
  --line-2: #313742;
  --text: #ECEEF2;
  --text-2: #A1A8B4;
  --text-3: #6E7582;
  --ink: #ECEEF2;
  --acc-text: color-mix(in srgb, var(--acc) 80%, #fff);
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, Arial, sans-serif;
  font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
code { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
::selection { background: var(--acc-soft); }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.verde { color: var(--green); } .vermelho { color: var(--red); } .laranja { color: var(--amber); }
.num { font-variant-numeric: tabular-nums; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* ---------- Marca Makker OS ---------- */
.mk-mark { width: 30px; height: 30px; flex: none; display: block; }
.mk-word { font-weight: 750; font-size: 17px; letter-spacing: -.03em; display: flex; align-items: center; gap: 6px; }
.mk-word .os { font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 2px 6px; border-radius: 6px; background: var(--text); color: var(--surface); }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line); transition: transform .22s ease;
}
.sb-top { padding: 18px 18px 10px; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.tenant { margin: 6px 12px 4px; padding: 10px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; text-decoration: none; }
.tenant-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; }
.tenant-logo img { width: 86%; height: 86%; object-fit: contain; }
.tenant-nome { font-weight: 650; font-size: 13px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tenant-sub { font-size: 11px; color: var(--text-3); }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.nav-group { margin-top: 16px; }
.nav-title { font-size: 11px; font-weight: 650; color: var(--text-3); padding: 0 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--text-2); font-size: 13.5px; font-weight: 500; position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.ativo { background: var(--acc-soft); color: var(--text); font-weight: 650; }
.nav a.ativo svg { color: var(--acc-text); }
.nav a.ativo::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acc); }
.nav svg { width: 18px; height: 18px; flex: none; }
.credito { padding: 12px 18px 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--text-3); line-height: 1.5; }
.credito a { color: var(--text-2); text-decoration: none; font-weight: 650; }
.credito a:hover { color: var(--acc-text); }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px 28px; min-height: 64px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.topbar.rolou { border-bottom-color: var(--line); }
.topbar .menu-btn { display: none; }
.busca-placa { position: relative; flex: 1; max-width: 440px; }
.busca-placa input { width: 100%; padding: 10px 56px 10px 38px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); outline: none; box-shadow: var(--shadow); }
.busca-placa input:focus { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
.busca-placa > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--text-3); }
.busca-placa kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 11px/1 inherit; color: var(--text-3); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--surface-2); }
.busca-res { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 50; padding: 6px; }
.busca-res a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; text-decoration: none; border-radius: 9px; }
.busca-res a:hover { background: var(--surface-2); }
.top-acoes { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text-2); box-shadow: var(--shadow); }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn svg { width: 18px; height: 18px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; box-shadow: var(--shadow); }
.user-chip .nm { font-weight: 600; font-size: 13px; line-height: 1.15; }
.user-chip .nm small { display: block; font-weight: 400; color: var(--text-3); font-size: 11px; }
.avatar { width: 30px; height: 30px; border-radius: 9px; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.content { padding: 8px 28px 40px; max-width: 1440px; width: 100%; }
.overlay { display: none; }

/* ---------- Componentes ---------- */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 20px; }
.page-head h1 { font-size: 24px; display: flex; align-items: center; gap: 10px; letter-spacing: -.025em; font-weight: 700; }
.page-head h1 > svg { width: 22px; height: 22px; color: var(--acc-text); }
.page-head .acoes { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card > .tabela-wrap:first-child { border-radius: var(--r-lg); }
.card-pad { padding: 20px; }
.card h3 { font-size: 15px; margin-bottom: 14px; font-weight: 650; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 11px; cursor: pointer; font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow); transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primario { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn-primario:hover { background: color-mix(in srgb, var(--acc) 88%, #000); border-color: color-mix(in srgb, var(--acc) 88%, #000); }
.btn-escuro { background: var(--text); border-color: var(--text); color: var(--surface); }
.btn-escuro:hover { background: color-mix(in srgb, var(--text) 85%, var(--surface)); }
.btn-verde { background: var(--green); border-color: var(--green); color: #fff; }
.btn-verde:hover { background: color-mix(in srgb, var(--green) 88%, #000); border-color: transparent; }
.btn-perigo { color: var(--red); }
.btn-perigo:hover { background: var(--red-soft); border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 9px; }
.btn-icone { padding: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Atalhos rápidos */
.atalhos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.atalho { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 650; cursor: pointer; border: 1px solid var(--line); box-shadow: var(--shadow); text-align: left; transition: transform .12s, border-color .12s, box-shadow .12s; }
.atalho:hover { transform: translateY(-2px); border-color: var(--acc-line); box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--acc) 60%, transparent); }
.atalho .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; flex: none; }
.atalho svg { width: 18px; height: 18px; }
.atalho small { display: block; font-weight: 400; color: var(--text-3); font-size: 12px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .rot { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kpi .val { font-size: 23px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi.destaque { background: var(--text); border-color: var(--text); color: var(--surface); }
.kpi.destaque .rot, .kpi.destaque .small { color: color-mix(in srgb, var(--surface) 65%, transparent); }
.kpi.destaque::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--acc); opacity: .35; filter: blur(18px); }
.kpi.destaque .val.verde, .kpi.destaque .val.vermelho, .kpi.destaque .val.laranja { color: inherit; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .busca { flex: 1; min-width: 200px; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--text-2); font-size: 13px; }
.seg button:hover { color: var(--text); }
.seg button.ativo { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* Tabelas */
.tabela-wrap { overflow-x: auto; }
table.tabela { width: 100%; border-collapse: collapse; }
.tabela th { text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabela td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabela tbody tr:last-child td { border-bottom: 0; }
.tabela tbody tr.clicavel { cursor: pointer; }
.tabela tbody tr.clicavel:hover td { background: var(--surface-2); }
.tabela tfoot td { font-weight: 700; background: var(--surface-2); padding: 12px 16px; border-top: 1px solid var(--line); }
.tabela .grupo td { background: var(--surface-2); font-weight: 650; font-size: 12px; color: var(--text-2); padding: 7px 16px; }
.vazio { padding: 44px 16px; text-align: center; color: var(--text-2); }
.vazio svg { width: 36px; height: 36px; color: var(--text-3); display: block; margin: 0 auto 10px; opacity: .7; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.b-verde { background: var(--green-soft); color: var(--green); }
.b-vermelho { background: var(--red-soft); color: var(--red); }
.b-laranja { background: var(--amber-soft); color: var(--amber); }
.b-azul { background: var(--blue-soft); color: var(--blue); }
.b-cinza { background: var(--surface-3); color: var(--text-2); }
:root[data-theme="dark"] .b-laranja { color: #F5B544; }
.placa { display: inline-block; font-family: "Cascadia Mono", Consolas, "Courier New", monospace; font-weight: 700; letter-spacing: 1px; font-size: 11.5px; padding: 1px 7px; border: 1.5px solid #1D2433; border-radius: 4px; background: #fff; color: #1D2433; border-top: 4px solid #2457C5; line-height: 1.5; }

/* Formulários */
.form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 14px; }
.campo { grid-column: span 12; display: flex; flex-direction: column; gap: 6px; position: relative; }
.campo label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.campo label .obr { color: var(--red); }
.campo h4 { font-size: 13px; color: var(--text); padding-top: 8px; border-top: 1px dashed var(--line); }
.c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c8 { grid-column: span 8; } .c9 { grid-column: span 9; }
.input, .campo input, .campo select, .campo textarea, select.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); outline: none; transition: border-color .12s, box-shadow .12s;
}
.campo textarea { min-height: 74px; resize: vertical; }
.input:focus, .campo input:focus, .campo select:focus, .campo textarea:focus, .itens input:focus, .itens select:focus { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
.campo .check { flex-direction: row; display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); cursor: pointer; }
.campo input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--acc); padding: 0; }
.campo .ajuda { font-size: 11.5px; color: var(--text-3); }
.lookup-lista { position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); max-height: 280px; overflow-y: auto; z-index: 70; padding: 5px; }
.lookup-lista div { padding: 8px 10px; cursor: pointer; border-radius: 8px; }
.lookup-lista div:hover, .lookup-lista div.sel { background: var(--surface-2); }
.lookup-lista .novo { color: var(--acc-text); font-weight: 650; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }

/* Itens de venda */
.itens { width: 100%; border-collapse: collapse; }
.itens th { font-size: 12px; text-align: left; color: var(--text-3); padding: 6px; font-weight: 600; }
.itens td { padding: 4px 6px; vertical-align: top; }
.itens input, .itens select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); outline: none; }
.totais { display: flex; justify-content: flex-end; gap: 22px; align-items: center; padding: 14px 6px 0; flex-wrap: wrap; margin-top: 12px; border-top: 1px dashed var(--line); }
.totais .total { font-size: 22px; font-weight: 750; letter-spacing: -.02em; }

/* Modal */
.modal-fundo { position: fixed; inset: 0; background: rgba(10, 12, 16, .5); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; z-index: 100; overflow-y: auto; animation: fade .15s; }
.modal { background: var(--surface); border-radius: var(--r-lg); width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); animation: sobe .18s cubic-bezier(.2,.8,.2,1); border: 1px solid var(--line); }
.modal.largo { max-width: 940px; }
.modal.medio { max-width: 720px; }
.modal-head { display: flex; align-items: center; padding: 18px 22px 0; }
.modal-head h2 { font-size: 18px; letter-spacing: -.02em; }
.modal-head .x { margin-left: auto; border: 0; background: var(--surface-3); width: 32px; height: 32px; border-radius: 10px; font-size: 20px; cursor: pointer; color: var(--text-2); line-height: 1; }
.modal-head .x:hover { color: var(--text); }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.modal-foot .esq { margin-right: auto; display: flex; gap: 8px; flex-wrap: wrap; }
@keyframes sobe { from { transform: translateY(10px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--text); color: var(--surface); padding: 12px 16px 12px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); max-width: 380px; animation: sobe .18s; display: flex; gap: 10px; align-items: center; font-weight: 500; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); flex: none; }
.toast.erro::before { background: var(--red); }
.toast.ok::before { background: #34D27B; }

/* Calendário */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-head h3 { margin: 0; min-width: 150px; text-align: center; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--text-3); padding: 4px 0; }
.cal .dia { min-height: 76px; border-radius: 12px; background: var(--surface-2); padding: 8px; cursor: pointer; border: 1px solid transparent; display: flex; flex-direction: column; gap: 4px; transition: border-color .12s, background .12s; }
.cal .dia:hover { border-color: var(--acc-line); background: var(--surface); }
.cal .dia.fora { background: transparent; cursor: default; }
.cal .dia.fora:hover { border-color: transparent; }
.cal .dia.hoje { background: var(--text); color: var(--surface); }
.cal .dia.hoje .n { color: var(--surface); }
.cal .dia.sel { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.cal .dia .n { font-weight: 650; font-size: 14px; }
.cal .dia.feriado .n { color: var(--purple); }
.cal .dia .tag { font-size: 10.5px; font-weight: 650; padding: 2px 7px; border-radius: 999px; background: var(--acc); color: var(--acc-ink); align-self: flex-start; }
.cal .dia .tag.v { background: var(--green); color: #fff; }
.feriados { margin-top: 12px; font-size: 12px; color: var(--text-2); }
.feriados b { color: var(--purple); }

/* Agenda dia */
.agenda-lista .item { display: flex; gap: 12px; padding: 12px; margin: 0 -12px; border-radius: 12px; align-items: flex-start; cursor: pointer; }
.agenda-lista .item:hover { background: var(--surface-2); }
.agenda-lista .item + .item { border-top: 1px solid var(--line); }
.agenda-lista .hora { font-weight: 700; font-size: 15px; min-width: 52px; font-variant-numeric: tabular-nums; }
.agenda-lista .info { flex: 1; min-width: 0; }

/* Pátio (vagas) */
.patio { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.vaga { border-radius: var(--r-lg); border: 1.5px dashed var(--line-2); background: transparent; min-height: 200px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.vaga.ocupada { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.vaga.ocupada::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--acc); }
.vaga .vnum { font-size: 12px; font-weight: 700; color: var(--text-3); display: flex; align-items: center; }
.vaga .vnum .badge { margin-left: auto; }
.vaga .livre { flex: 1; display: grid; place-items: center; text-align: center; color: var(--text-3); }
.vaga .acoes { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }

/* Gráficos */
.barras { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 10px; }
.barras .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.barras .b .col { width: 100%; max-width: 34px; background: var(--acc); border-radius: 7px 7px 3px 3px; min-height: 3px; transition: filter .12s; }
.barras .b .col.d { background: var(--line-2); }
.barras .b .pair { display: flex; gap: 3px; align-items: flex-end; width: 100%; justify-content: center; height: 100%; }
.barras .b .pair .col { max-width: 16px; }
.barras .b .lbl { font-size: 10.5px; color: var(--text-3); margin-top: 6px; white-space: nowrap; }
.barras .b:hover .col { filter: brightness(.9); }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.hbar .nm { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .vl { font-size: 12.5px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.hbar .tr { grid-column: span 2; height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.hbar .tr div { height: 100%; background: var(--acc); border-radius: 99px; }
.legenda { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); font-weight: 500; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.ativo { color: var(--text); border-color: var(--acc); }

.info-lista { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13.5px; }
.info-lista dt { color: var(--text-3); }
.info-lista dd { margin: 0; font-weight: 500; }

/* ---------- Login ---------- */
.login-tela { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--surface); }
.login-lado { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 36px 44px; color: #fff; background: #0D0F14; }
.login-lado::before { content: ""; position: absolute; inset: -20%; background:
  radial-gradient(40% 40% at 25% 30%, color-mix(in srgb, var(--acc) 70%, transparent), transparent 70%),
  radial-gradient(35% 35% at 80% 75%, color-mix(in srgb, var(--acc) 45%, #2F6FEB), transparent 70%),
  radial-gradient(30% 30% at 70% 20%, rgba(255,255,255,.08), transparent 70%); filter: blur(30px); }
.login-lado::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.login-lado > * { position: relative; z-index: 1; }
.login-lado .mk-word .os { background: #fff; color: #0D0F14; }
.login-centro { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 520px; }
.login-tenant { display: inline-flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px); align-self: flex-start; margin-bottom: 28px; }
.login-tenant .tenant-logo { width: 54px; height: 54px; border-radius: 13px; background: #fff; border: 0; }
.login-tenant b { display: block; font-size: 16px; }
.login-tenant span { font-size: 12px; color: rgba(255,255,255,.65); }
.login-titulo { font-size: 44px; line-height: 1.05; font-weight: 750; letter-spacing: -.035em; margin: 0; }
.login-titulo em { font-style: normal; color: color-mix(in srgb, var(--acc) 70%, #fff); }
.login-frase { margin-top: 18px; color: rgba(255,255,255,.7); line-height: 1.6; font-size: 15px; }
.login-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.login-pills span { font-size: 12px; padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.85); }
.login-rodape { font-size: 12px; color: rgba(255,255,255,.5); }
.login-rodape a { color: rgba(255,255,255,.85); text-decoration: none; font-weight: 600; }
.login-form-wrap { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; }
.login-box { width: 100%; max-width: 380px; }
.login-box h2 { font-size: 26px; margin-bottom: 6px; letter-spacing: -.03em; }
.login-box p { margin: 0 0 24px; color: var(--text-2); }
.login-box .form { gap: 14px; }
.login-box .btn { width: 100%; padding: 12px; font-size: 15px; }
.login-credito { margin-top: 28px; font-size: 12px; color: var(--text-3); text-align: center; }
.login-credito a { color: var(--text-2); font-weight: 650; text-decoration: none; }

/* Impressão */
.print-area { display: none; }
@media print {
  :root { --text: #000; --surface: #fff; }
  body { background: #fff; }
  .layout, #toasts, .modal-fundo { display: none !important; }
  .print-area { display: block !important; padding: 10px 20px; font-size: 12.5px; color: #000; }
  .print-area table { width: 100%; border-collapse: collapse; margin-top: 12px; }
  .print-area th, .print-area td { border-bottom: 1px solid #ddd; padding: 6px 4px; text-align: left; }
  .print-head { display: flex; align-items: center; gap: 16px; border-bottom: 3px solid var(--acc); padding-bottom: 10px; }
  .print-head img { height: 60px; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atalhos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-chip .nm { display: none; }
  .user-chip { padding: 4px; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.menu-aberto .sidebar { transform: none; }
  body.menu-aberto .overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  .main { margin-left: 0; }
  .topbar { padding: 10px 16px; }
  .topbar .menu-btn { display: grid; }
  .busca-placa kbd { display: none; }
  .content { padding: 4px 16px 32px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .c2, .c3, .c4, .c5, .c6, .c8, .c9 { grid-column: span 12; }
  .login-tela { grid-template-columns: 1fr; }
  .login-lado { padding: 24px 20px 28px; }
  .login-titulo { font-size: 30px; }
  .login-frase, .login-pills, .login-rodape { display: none; }
  .login-tenant { margin: 18px 0 14px; }
  .cal .dia { min-height: 52px; padding: 5px; border-radius: 9px; }
  .cal .dia .tag { font-size: 9px; padding: 1px 4px; }
  .itens .esconde-mobile { display: none; }
  .page-head h1 { font-size: 21px; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: minmax(0, 1fr); }
  .atalhos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .atalho { padding: 11px; font-size: 13px; gap: 9px; }
  .atalho .ic { width: 32px; height: 32px; }
  .kpi .val { font-size: 19px; }
  .modal-fundo { padding: 12px 8px; }
}
