/* Makker OS — sistema de gestão para estética automotiva
   Desenvolvido por Caçador Digital (cacadordigital.com.br) */
:root {
  --acc: #F59A0C;           /* cor da marca da empresa (definida em Empresa) */
  --acc-ink: #12141A;       /* texto sobre a cor da marca */
  /* Escala da cor da marca (gerada a partir de --acc, combina com qualquer logo) */
  --acc-soft: color-mix(in oklab, var(--acc) 14%, transparent);
  --acc-line: color-mix(in oklab, var(--acc) 38%, transparent);
  --acc-text: color-mix(in oklab, var(--acc) 58%, #000);
  --acc-50: color-mix(in oklab, var(--acc) 8%, var(--surface));
  --acc-100: color-mix(in oklab, var(--acc) 16%, var(--surface));
  --acc-200: color-mix(in oklab, var(--acc) 32%, var(--surface));
  --acc-300: color-mix(in oklab, var(--acc) 52%, var(--surface));
  --acc-deep: color-mix(in oklab, var(--acc) 30%, #141416);

  --bg: #F4F4F2;
  --surface: #FFFFFF;
  --surface-2: #F9F9F8;
  --surface-3: #EFEFEC;
  --line: #E6E6E2;
  --line-2: #D4D4CF;
  --text: #18181B;
  --text-2: #5E5E66;
  --text-3: #95959D;
  --ink: #18181B;

  /* Cores de situação: mesmo peso visual, tons suaves */
  --green: #18A058; --green-soft: color-mix(in oklab, #18A058 13%, transparent); --green-text: #157A45;
  --red: #E5484D; --red-soft: color-mix(in oklab, #E5484D 12%, transparent); --red-text: #C2353A;
  --blue: #3E7BEA; --blue-soft: color-mix(in oklab, #3E7BEA 12%, transparent); --blue-text: #2A5FC4;
  --amber: #E08A0B; --amber-soft: color-mix(in oklab, #E08A0B 14%, transparent); --amber-text: #A8640A;
  --purple: #8E4EC6;

  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --shadow: 0 1px 2px rgba(24, 24, 27, .04);
  --shadow-md: 0 1px 2px rgba(24,24,27,.04), 0 6px 18px -8px rgba(24, 24, 27, .12);
  --shadow-lg: 0 24px 60px -12px rgba(24, 24, 27, .26), 0 2px 8px rgba(24,24,27,.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: #0E0E10;
  --surface: #17171A;
  --surface-2: #1C1C20;
  --surface-3: #26262B;
  --line: #2A2A30;
  --line-2: #3A3A41;
  --text: #EDEDEF;
  --text-2: #A6A6AE;
  --text-3: #707079;
  --ink: #EDEDEF;
  --acc-text: color-mix(in oklab, var(--acc) 72%, #fff);
  --acc-soft: color-mix(in oklab, var(--acc) 18%, transparent);
  --acc-deep: color-mix(in oklab, var(--acc) 26%, #0E0E10);
  --green-text: #4CC688; --red-text: #F07A7E; --blue-text: #7FA8F5; --amber-text: #F2B451;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 1px 2px rgba(0,0,0,.3), 0 8px 20px -10px rgba(0,0,0,.5);
  --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-text); } .vermelho { color: var(--red-text); } .laranja { color: var(--amber-text); }
.num { font-variant-numeric: tabular-nums; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* ---------- Marca: Kawaii Gestão Automotiva ---------- */
.mk-mark { width: 34px; height: 34px; flex: none; display: block; object-fit: contain; }
.mk-word { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.mk-word b { font-weight: 800; font-size: 19px; letter-spacing: -.02em; background: linear-gradient(180deg, #FFB21E, #F08A00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mk-word small { font-size: 8.5px; font-weight: 650; letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }

/* ---------- 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.nav-bloq { opacity: .62; }
.nav a.nav-bloq:hover { opacity: 1; }
.nav a .cadeado { width: 13px; height: 13px; margin-left: auto; flex: none; }
.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: 17px; height: 17px; flex: none; }
.nav a:hover svg { color: var(--acc-text); }
.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: 34px !important; height: 34px !important; padding: 8px; border-radius: 10px; background: var(--acc-100); color: var(--acc-text); box-sizing: border-box; }
.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: 14.5px; margin-bottom: 14px; font-weight: 650; letter-spacing: -.01em; }
.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-100); color: var(--acc-text); display: grid; place-items: center; flex: none; transition: background .15s, color .15s; }
.atalho:hover .ic { background: var(--acc); color: var(--acc-ink); }
.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: 15px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); position: relative; overflow: hidden; animation: kpiEntra .45s cubic-bezier(.2,.8,.2,1) both; }
.kpi:nth-child(2) { animation-delay: .04s; } .kpi:nth-child(3) { animation-delay: .08s; } .kpi:nth-child(4) { animation-delay: .12s; } .kpi:nth-child(n+5) { animation-delay: .16s; }
@keyframes kpiEntra { from { opacity: 0; transform: translateY(6px); } }
.kpi .val.verde::before, .kpi .val.vermelho::before, .kpi .val.laranja::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 8px; vertical-align: 4px; opacity: .85; }
.kpi .rot { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kpi .val { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi.destaque { background: linear-gradient(140deg, color-mix(in oklab, var(--acc) 82%, #fff) 0%, var(--acc) 55%, color-mix(in oklab, var(--acc) 90%, #000) 100%); border-color: transparent; color: var(--acc-ink); box-shadow: 0 8px 22px -12px color-mix(in oklab, var(--acc) 70%, transparent); }
.kpi.destaque .rot, .kpi.destaque .small, .kpi.destaque .muted { color: color-mix(in oklab, var(--acc-ink) 72%, transparent) !important; }
.kpi.destaque::after { content: ""; position: absolute; right: -40px; top: -50px; width: 140px; height: 140px; border-radius: 50%; border: 22px solid color-mix(in oklab, var(--acc-ink) 7%, transparent); }
.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: 28px 16px; text-align: center; color: var(--text-2); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vazio > svg, .vazio-ic svg { width: 17px !important; height: 17px !important; }
.vazio > svg { color: var(--text-3); }
.vazio-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--acc-50); color: var(--acc-text); display: grid; place-items: center; border: 1px solid var(--acc-100); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 8px; 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-text); }
.b-vermelho { background: var(--red-soft); color: var(--red-text); }
.b-laranja { background: var(--amber-soft); color: var(--amber-text); }
.b-azul { background: var(--blue-soft); color: var(--blue-text); }
.badge.b-verde::before, .badge.b-vermelho::before, .badge.b-laranja::before, .badge.b-azul::before, .badge.b-cinza::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge svg { width: 12px; height: 12px; }
.b-cinza { background: var(--surface-3); color: var(--text-2); }
.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: var(--green); }

/* 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; }
/* Seletor de pastas (nota fiscal) */
.sp-lista { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.sp-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sp-item:last-child { border-bottom: 0; } .sp-item:hover { background: color-mix(in srgb, var(--acc) 10%, transparent); } .sp-item svg { width: 18px; height: 18px; flex: none; opacity: .75; }
/* Pátio por dia: calendário do mês */
.pt-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pt-sem { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted, #888); padding: 4px 0; }
.pt-dia { min-height: 92px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.pt-dia:hover { border-color: var(--acc); }
.pt-dia.vazio { border: 0; background: transparent; cursor: default; }
.pt-dia.hoje { box-shadow: inset 0 0 0 2px var(--acc); }
.pt-dia.feriado { background: color-mix(in srgb, #7C3AED 7%, var(--surface)); }
.pt-dia.feriado .pt-n { color: #7C3AED; }
.pt-n { font-size: 20px; font-weight: 800; line-height: 1; }
.pt-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-chip.verde { background: #22A060; color: #fff; } .pt-chip.amarelo { background: #F2B21B; color: #3a2a00; } .pt-chip.roxo { background: #7C3AED; color: #fff; }
.pt-bola { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }
.pt-bola.verde { background: #22A060; } .pt-bola.amarelo { background: #F2B21B; }
.pt-c { display: none; }
@media (max-width: 600px) { .pt-cal { gap: 4px; } .pt-dia { min-height: 64px; padding: 5px; } .pt-n { font-size: 15px; } .pt-chip { font-size: 11px; padding: 1px 7px; } .pt-sem { font-size: 11px; }
  .pt-l { display: none; } .pt-c { display: inline; } .pt-chip.roxo { width: 10px; height: 10px; padding: 0; } }
.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 verticais com eixo, linhas de referência, animação e balão de valor */
.graf { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; height: 220px; padding-top: 6px; }
.graf-eixo { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 22px; margin-top: -6px; margin-bottom: -6px; }
.graf-eixo span { font-size: 10.5px; color: var(--text-3); text-align: right; line-height: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.graf-area { position: relative; min-width: 0; }
.graf-linhas { position: absolute; inset: 0 0 22px 0; display: flex; flex-direction: column-reverse; justify-content: space-between; pointer-events: none; }
.graf-linhas i { display: block; border-top: 1px dashed var(--line); }
.graf-linhas i:first-child { border-top: 1px solid var(--line-2); }
.graf-barras { position: absolute; inset: 0; display: flex; gap: clamp(2px, calc(60% / var(--n)), 14px); align-items: stretch; }
.gb { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; cursor: default; }
.gb-cols { flex: 1; display: flex; gap: 3px; align-items: flex-end; justify-content: center; }
.gb-col { width: 100%; max-width: 38px; height: var(--h); min-height: 2px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--acc) 62%, var(--surface)), color-mix(in oklab, var(--acc) 34%, var(--surface))); transform-origin: bottom;
  animation: barraSobe .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 35ms); transition: filter .15s, background .15s; }
.gb.atual .gb-col { background: linear-gradient(180deg, var(--acc), color-mix(in oklab, var(--acc) 80%, var(--surface))); box-shadow: 0 6px 16px -6px color-mix(in oklab, var(--acc) 80%, transparent); }
.graf-duplo .gb-col { max-width: 16px; background: linear-gradient(180deg, var(--acc), color-mix(in oklab, var(--acc) 75%, var(--surface))); }
.graf-duplo .gb-col.d { background: linear-gradient(180deg, color-mix(in oklab, var(--red) 70%, var(--surface)), color-mix(in oklab, var(--red) 40%, var(--surface))); }
.gb:hover .gb-col { filter: saturate(1.2) brightness(.96); }
.gb:hover .gb-col:not(.d) { background: var(--acc); }
.gb-lbl { height: 22px; padding-top: 6px; font-size: 10.5px; color: var(--text-3); text-align: center; white-space: nowrap; overflow: visible; }
.gb.atual .gb-lbl { color: var(--text); font-weight: 650; }
.gb::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% - 18px); transform: translate(-50%, 6px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--surface); font-size: 11.5px; font-weight: 600; padding: 5px 9px; border-radius: 8px; white-space: nowrap; box-shadow: var(--shadow-lg); transition: opacity .15s, transform .15s; z-index: 5; }
.gb:hover::after { opacity: 1; transform: translate(-50%, 0); }
.gb:first-child::after { left: 0; transform: translate(0, 6px); } .gb:first-child:hover::after { transform: none; }
.gb:last-child::after { left: auto; right: 0; transform: translate(0, 6px); } .gb:last-child:hover::after { transform: none; }
@keyframes barraSobe { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Ranking (barras horizontais) */
.hbar { display: flex; flex-direction: column; gap: 12px; }
.hb-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.hb-pos { width: 20px; height: 20px; flex: none; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: var(--surface-3); color: var(--text-2); }
.hb:first-child .hb-pos { background: var(--acc); color: var(--acc-ink); }
.hb:nth-child(2) .hb-pos, .hb:nth-child(3) .hb-pos { background: var(--acc-100); color: var(--acc-text); }
.hbar .nm { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .vl { font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-pct { font-size: 11px; color: var(--text-3); min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.hbar .tr { height: 7px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-left: 28px; }
.hbar .tr div { height: 100%; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, var(--acc-300), var(--acc)); transform-origin: left;
  animation: barraLado .8s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes barraLado { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Rosca */
.rosca { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.rosca-g { position: relative; width: 148px; height: 148px; flex: none; }
.rosca-g svg { width: 148px; height: 148px; transform: rotate(0deg); }
.rosca-g svg circle[style] { animation: roscaGira 1s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 90ms); transition: stroke-width .15s; }
.rosca-g svg circle[style]:hover { stroke-width: 6.4; }
@keyframes roscaGira { from { stroke-dasharray: 0 100; } }
.rosca-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.rosca-c span { font-size: 11px; color: var(--text-3); }
.rosca-c b { font-size: 15px; letter-spacing: -.02em; }
.rosca-leg { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 7px; }
.rosca-leg > div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 13px; }
.rosca-leg i { width: 10px; height: 10px; border-radius: 3px; }
.rosca-leg .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rosca-leg b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.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; }
@media (prefers-reduced-motion: reduce) { .gb-col, .hbar .tr div, .rosca-g svg circle[style], .kpi, .card { animation: none !important; } }

.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); }
.tabs button:hover { color: var(--text); }

.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 small { color: rgba(255,255,255,.6); }
.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; }
}
/* Itens (serviços/produtos) no celular: cada linha vira um cartão — item em cima, tipo/qtd/preço/total embaixo */
@media (max-width: 600px) {
  .itens thead { display: none; }
  .itens, .itens tbody { display: block; }
  .itens tr { display: grid; grid-template-columns: 92px 58px minmax(0, 1fr) 36px; grid-template-areas: "item item item rm" "tipo qtd preco preco" "resp resp resp resp" "total total total total";
    gap: 6px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, var(--surface)); }
  .itens td { padding: 0; }
  .itens .it-item { grid-area: item; } .itens .it-tipo { grid-area: tipo; } .itens .it-qtd { grid-area: qtd; }
  .itens .it-preco { grid-area: preco; } .itens .it-rm { grid-area: rm; } .itens .it-total { grid-area: total; padding-top: 0 !important; }
  .itens .esconde-mobile.it-resp { display: block; grid-area: resp; }
  .itens .it-total::before { content: 'Total do item: '; font-size: 12px; color: var(--text-3); }
  .itens .it-qtd input, .itens .it-tipo select { padding-left: 6px; padding-right: 4px; }
}
@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; }
}

/* ---------- Imagens de veículos (tingidas na cor do veículo) ---------- */
.veic { position: relative; display: block; width: 100%; aspect-ratio: 2 / 1; isolation: isolate; --vc: transparent; }
.veic img { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; }
.veic i { position: absolute; inset: 0; background: var(--vc); -webkit-mask: var(--vimg) center / contain no-repeat; mask: var(--vimg) center / contain no-repeat; mix-blend-mode: multiply; opacity: .95; pointer-events: none; }
.veic.veic-cor img { filter: brightness(1.12) contrast(1.08) saturate(0); }
.veic.veic-neutro i, .veic.veic-claro i, .veic.veic-cinza i, .veic.veic-escuro i { display: none; }
.veic.veic-claro img { filter: brightness(1.14) contrast(.95); }
.veic.veic-cinza img { filter: brightness(.68) contrast(1.1); }
.veic.veic-escuro img { filter: brightness(.34) contrast(1.35); }
:root[data-theme="dark"] .veic img { filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }

.tipos-veic { display: flex; flex-direction: column; gap: 14px; }
.tv-titulo { font-size: 11.5px; font-weight: 650; color: var(--text-3); margin-bottom: 6px; }
.tv-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.tv-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: var(--text-2); transition: border-color .12s, transform .12s, box-shadow .12s, background .12s; }
.tv-item .veic { width: 96px; transition: transform .2s; }
.tv-item span { font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.2; }
.tv-item:hover { border-color: var(--acc-line); transform: translateY(-1px); }
.tv-item:hover .veic { transform: scale(1.06); }
.tv-item.sel { border-color: var(--acc); background: var(--acc-soft); color: var(--text); box-shadow: 0 0 0 3px var(--acc-soft); }
.tv-item.sel .veic { transform: scale(1.06); }

.cores { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cores button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; padding: 0; }
.cores button.sel { box-shadow: 0 0 0 2px var(--acc); transform: scale(1.1); }
.cores input { width: 130px; }

.veic-preview { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); margin-bottom: 16px; }
.veic-preview .veic { width: 210px; flex: none; }
.veic-preview b { font-size: 16px; }
.veic-mini { width: 64px; flex: none; }
.placa-busca { display: flex; gap: 8px; }
.placa-busca input { text-transform: uppercase; font-family: "Cascadia Mono", Consolas, monospace; letter-spacing: 1px; font-weight: 700; }
.veic-vaga { width: 170px; margin: 0 auto; }

/* ---------- Painel lateral (detalhes da vaga) ---------- */
.modal-fundo.lateral { justify-content: flex-end; align-items: stretch; padding: 0; }
.modal.lateral { max-width: 500px; height: 100vh; border-radius: 0; display: flex; flex-direction: column; animation: deslizaLado .22s cubic-bezier(.2,.8,.2,1); border-width: 0 0 0 1px; }
.modal.lateral .modal-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.modal.lateral .modal-body { flex: 1; overflow-y: auto; padding: 16px 20px 24px; }
.modal.lateral .modal-foot { border-radius: 0; }
@keyframes deslizaLado { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.pv-sec { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pv-sec:last-child { border-bottom: 0; }
.pv-sec h4 { font-size: 13px; margin: 0 0 10px; color: var(--text); }
.pv-linha { display: flex; align-items: center; gap: 9px; padding: 3px 0; font-size: 13.5px; }
.pv-linha svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.pv-linha a { color: var(--acc-text); font-weight: 600; text-decoration: none; }
.pv-toggle { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; font-weight: 650; }
.pv-toggle input { width: 42px; height: 24px; appearance: none; -webkit-appearance: none; background: var(--line-2); border-radius: 99px; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.pv-toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.pv-toggle input:checked { background: var(--green); }
.pv-toggle input:checked::after { transform: translateX(18px); }
.pv-acoes { display: grid; gap: 7px; }
.pv-acoes .btn { justify-content: flex-start; width: 100%; padding: 10px 14px; }
.pv-acoes .b-wpp { background: #25D366; border-color: #25D366; color: #fff; }
.pv-acoes .b-wpp2 { background: #E0453A; border-color: #E0453A; color: #fff; }
.pv-grade3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.pv-grade3 .btn { padding: 9px 6px; font-size: 12.5px; }
.vaga.ocupada { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.vaga.ocupada:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -16px rgba(0,0,0,.35); }

/* Notinha (impressora térmica) */
@media print {
  .print-area.fmt-80, .print-area.fmt-58 { padding: 0 !important; font-family: "Consolas", "Courier New", monospace; color: #000; }
  .print-area.fmt-80 { width: 76mm; font-size: 11px; }
  .print-area.fmt-58 { width: 54mm; font-size: 9.5px; }
  .nt-head { text-align: center; border-bottom: 1px dashed #000; padding-bottom: 6px; margin-bottom: 6px; }
  .nt-head img { max-height: 42px; max-width: 70%; display: block; margin: 0 auto 4px; filter: grayscale(1); }
  .nt-head b { display: block; font-size: 1.15em; }
  .nt-tab { width: 100%; border-collapse: collapse; }
  .nt-tab td { padding: 2px 0 !important; border: 0 !important; vertical-align: top; }
  .nt-tab td.r { text-align: right; white-space: nowrap; }
  .nt-tot { border-top: 1px dashed #000; margin-top: 6px; padding-top: 6px; }
  .nt-pe { text-align: center; margin-top: 10px; font-size: .85em; }
}

/* Ícones em títulos e linhas: tamanho fixo (evita ícone gigante) */
h1 > svg, h2 > svg, h3 > svg, h4 > svg, .row > svg, .card h3 svg { width: 18px; height: 18px; flex: none; }
h3.row > svg, .card h3 > svg { color: var(--acc-text); }

/* Seleção de vendas em lote */
.tabela tr.sel-lote td { background: var(--acc-soft) !important; }
.lote-barra { position: sticky; bottom: 16px; z-index: 25; margin-top: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; background: var(--text); color: var(--surface); box-shadow: var(--shadow-lg); animation: sobe .18s; }
.lote-barra .lb-info { display: flex; flex-direction: column; line-height: 1.3; }
.lote-barra .lb-info span { font-size: 12.5px; opacity: .75; }
.lote-barra .lb-acoes { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.lote-barra .btn:not(.btn-verde):not(.btn-perigo) { background: transparent; color: var(--surface); border-color: color-mix(in srgb, var(--surface) 30%, transparent); }
.lote-barra .btn-perigo { background: transparent; border-color: color-mix(in srgb, var(--red) 60%, transparent); color: #FF8A80; }

/* ---------- WhatsApp ---------- */
.wa-campo { position: relative; }
.wa-campo textarea { width: 100%; resize: vertical; font: inherit; line-height: 1.45; }
.wa-sug { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 280px; overflow: auto; padding: 4px; }
.wa-sug button { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 9px; cursor: pointer; color: var(--text); font: inherit; }
.wa-sug button span { color: var(--text-2); }
.wa-sug button small { grid-column: 1 / -1; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-sug button.ativo, .wa-sug button:hover { background: var(--acc-soft); }
.wa-qr { display: grid; place-items: center; margin: 14px 0; }
.wa-qr img { width: 260px; max-width: 100%; border-radius: 14px; background: #fff; padding: 10px; border: 1px solid var(--line); }
.wa-ok { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex: none; }
.wa-ok svg { width: 24px; height: 24px; }
.wa-aviso { padding: 10px 14px; border-radius: 12px; background: var(--amber-soft); line-height: 1.5; }
.wa-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-vars .btn { font-family: Consolas, monospace; font-size: 12px; }
.wa-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.wa-foto { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; }
.wa-foto img { width: 100%; height: 150px; object-fit: cover; cursor: zoom-in; display: block; background: var(--surface-3); }
.wa-foto .wa-info { padding: 10px 12px; display: grid; gap: 3px; }
.wa-imgs { position: relative; }
.wa-extras { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.wa-foto .wa-extras img { width: 40px; height: 40px; border-radius: 8px; border: 2px solid #fff; object-fit: cover; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.wa-link { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.wa-link > svg { width: 22px; height: 22px; flex: none; }
.wa-link > svg:last-child { margin-left: auto; color: var(--text-3); }
.wa-link:hover { border-color: var(--acc-line); }
.wa-fila { display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.wa-fila-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.wa-fila-item input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--acc); flex: none; }
.op-linha { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.op-linha:last-child { border-bottom: 0; }
.vit-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.vit-fotos > div { position: relative; }
.vit-fotos img { width: 100%; height: 110px; object-fit: cover; border-radius: 12px; display: block; }
.vit-fotos button { position: absolute; top: 6px; right: 6px; }
.vit-servs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 14px; max-height: 360px; overflow: auto; }
.vit-servs label { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 4px 0; cursor: pointer; }
.vit-servs label .muted { margin-left: auto; }
.vit-avs { display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.vit-av { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.vit-av.nova { border-color: var(--red); background: var(--red-soft); }

/* Relatório do dono: prévia no formato do WhatsApp */
.rel-whats { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.55; max-height: 520px; overflow: auto; overflow-wrap: anywhere; }


/* ---------- Caixa de conversas ---------- */
.nav-n { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.cx { display: grid; grid-template-columns: 320px minmax(0, 1fr) 280px; gap: 14px; height: calc(100vh - 170px); min-height: 480px; }
.cx > .card { min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.cx-lista { padding: 0; }
.cx-busca { position: relative; padding: 12px 12px 8px; }
.cx-busca svg { position: absolute; left: 24px; top: 23px; width: 16px; height: 16px; color: var(--text-3); }
.cx-busca .input { padding-left: 36px; }
.cx-filtros { margin: 0 12px 8px; flex-wrap: wrap; }
.cx-filtros button { font-size: 12px; padding: 5px 9px; }
.cx-itens { overflow-y: auto; flex: 1; border-top: 1px solid var(--line); }
.cx-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.cx-item:hover { background: var(--surface-2); }
.cx-item.ativo { background: var(--acc-soft); }
.cx-av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.cx-meio { flex: 1; min-width: 0; }
.cx-nome { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-prev { display: block; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-item.nova .cx-nome, .cx-item.nova .cx-prev { color: var(--text); font-weight: 700; }
.cx-dir { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.cx-hora { font-size: 11px; color: var(--text-3); }
.cx-item.nova .cx-hora { color: var(--green); font-weight: 700; }
.cx-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.cx-tag { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); vertical-align: 1px; }
.cx-chat { padding: 0; }
.cx-vazio { margin: auto; text-align: center; padding: 30px; color: var(--text-2); max-width: 340px; }
.cx-vazio svg { width: 42px; height: 42px; color: var(--text-3); }
.cx-topo { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cx-topo > div:nth-child(2) { flex: 1; min-width: 0; }
.cx-topo > div:nth-child(2) b, .cx-topo > div:nth-child(2) .small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-acoes { margin-left: auto; display: flex; gap: 6px; flex: none; }
.cx-voltar { display: none; }
.cx-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); }
.cx-mais { align-self: center; margin-bottom: 6px; }
.cx-dia { align-self: center; margin: 8px 0 4px; }
.cx-dia span { font-size: 11px; color: var(--text-2); background: var(--surface-3); padding: 3px 10px; border-radius: 999px; }
.cx-msg { max-width: min(72%, 520px); padding: 7px 10px 5px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; overflow-wrap: anywhere; }
.cx-msg.eu { align-self: flex-end; background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.cx-msg.eu.auto { background: var(--surface-3); border-style: dashed; }
.cx-txt { font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; }
.cx-info { font-size: 10.5px; color: var(--text-3); text-align: right; margin-top: 2px; }
.cx-img { display: block; max-width: 260px; max-height: 300px; border-radius: 8px; margin-bottom: 4px; }
.cx-msg audio { width: 240px; max-width: 100%; height: 36px; }
.cx-resp { padding: 10px 12px; border-top: 1px solid var(--line); }
.cx-campo { display: flex; gap: 8px; align-items: flex-end; position: relative; }
.cx-campo textarea { resize: none; min-height: 40px; max-height: 160px; }
.cx-campo .wa-sug { bottom: 100%; top: auto; }
.cx-campo .btn { flex: none; height: 40px; }
.cx-ficha { padding: 16px; overflow-y: auto; }
.cx-ficha h3 a { color: var(--text); text-decoration: none; }
.cx-ficha h3 a:hover { text-decoration: underline; }
.cx-veics { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.cx-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cx-nums > div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.cx-nums b { font-size: 14px; }
.cx-op { display: flex; flex-direction: column; width: 100%; text-align: left; padding: 8px 10px; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.cx-op:hover { border-color: var(--acc-line); }
.cx-btn-ficha { display: none !important; }
@media (max-width: 1400px) { .cx { grid-template-columns: 270px minmax(0, 1fr) 250px; } }
@media (max-width: 1100px) {
  .cx { grid-template-columns: 280px minmax(0, 1fr); position: relative; }
  .cx > .cx-ficha { display: none; }
  .cx-btn-ficha { display: inline-flex !important; }
  .cx.ver-ficha > .cx-ficha { display: flex; position: absolute; right: 0; top: 0; bottom: 0; width: min(320px, 100%); z-index: 6; box-shadow: var(--shadow-lg); }
}
@media (max-width: 860px) {
  .cx { grid-template-columns: 1fr; height: calc(100vh - 150px); }
  .cx > .cx-chat { display: none; }
  .cx.cx-aberta > .cx-lista { display: none; }
  .cx.cx-aberta > .cx-chat { display: flex; }
  .cx-voltar { display: inline-grid; }
  .cx-msg { max-width: 88%; }
  .cx-acoes [data-naolida] { display: none; }
  .cx-topo { padding: 8px 10px; gap: 6px; }
  .cx-topo b, .cx-topo .small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cx-acoes .btn { padding: 6px 9px; }
}
.nav-n[hidden] { display: none; }
.cx-fechar { position: absolute; top: 10px; right: 10px; }
.cx-ficha { position: relative; }

/* Aviso da licença */
.lic-aviso { display: flex; align-items: center; gap: 10px; margin: 12px 28px 0; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; }
.lic-aviso svg { width: 18px; height: 18px; display: block; }
.lic-aviso a { margin-left: auto; white-space: nowrap; font-weight: 600; color: inherit; }
.lic-aviso a + a { margin-left: 0; }
.lic-info { background: var(--amber-soft); color: var(--text); }
.lic-atraso { background: var(--amber-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); }
.lic-bloq { background: var(--red-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); }
@media (max-width: 860px) { .lic-aviso { margin: 10px 16px 0; flex-wrap: wrap; } }

/* Vitrine: destaques e produtos */
.vit-dest, .vit-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.vit-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.vit-item.off { opacity: .6; }
.vit-foto { width: 74px; height: 74px; flex: none; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--surface-2); border: 1px dashed var(--line-2); display: grid; place-items: center; }
.vit-foto img { width: 100%; height: 100%; object-fit: cover; }
.vit-foto span { display: grid; place-items: center; gap: 2px; color: var(--text-3); }
.vit-foto svg { width: 18px; height: 18px; }

/* =====================================================================
   Acabamento premium — sombras em camadas, vidro fosco, brilho de borda
   (fica no fim para valer sobre as regras acima)
   ===================================================================== */
:root {
  --shadow: 0 0 0 1px rgba(24,24,27,.02), 0 1px 2px rgba(24,24,27,.05), 0 2px 6px -2px rgba(24,24,27,.05);
  --shadow-md: 0 0 0 1px rgba(24,24,27,.02), 0 2px 4px rgba(24,24,27,.04), 0 12px 28px -12px rgba(24,24,27,.16);
  --shadow-lg: 0 0 0 1px rgba(24,24,27,.04), 0 8px 16px -6px rgba(24,24,27,.10), 0 32px 64px -16px rgba(24,24,27,.30);
  --brilho: inset 0 1px 0 rgba(255,255,255,.75);
  --vidro: color-mix(in oklab, var(--surface) 72%, transparent);
  --vidro-borda: color-mix(in oklab, var(--line) 70%, transparent);
}
:root[data-theme="dark"] {
  --shadow: 0 0 0 1px rgba(0,0,0,.2), 0 1px 2px rgba(0,0,0,.35), 0 2px 6px -2px rgba(0,0,0,.3);
  --shadow-md: 0 0 0 1px rgba(0,0,0,.2), 0 2px 4px rgba(0,0,0,.3), 0 14px 30px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 0 0 1px rgba(255,255,255,.04), 0 10px 20px -6px rgba(0,0,0,.5), 0 36px 70px -16px rgba(0,0,0,.75);
  --brilho: inset 0 1px 0 rgba(255,255,255,.045);
  --vidro: color-mix(in oklab, var(--surface) 70%, transparent);
}
body { font-feature-settings: "ss01", "cv11"; }
/* Fundo: leve brilho da cor da marca no topo */
.main { background:
  radial-gradient(900px 340px at 78% -120px, color-mix(in oklab, var(--acc) 11%, transparent), transparent 70%),
  radial-gradient(700px 300px at 0% -80px, color-mix(in oklab, var(--acc) 6%, transparent), transparent 70%); }

/* Menu lateral */
.sidebar { background: color-mix(in oklab, var(--surface) 88%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-right-color: var(--vidro-borda); }
.tenant { background: linear-gradient(180deg, var(--surface), var(--surface-2)); box-shadow: var(--shadow), var(--brilho); }
.nav a { transition: background .15s, color .15s; }
.nav a.ativo { background: linear-gradient(90deg, var(--acc-soft), color-mix(in oklab, var(--acc) 5%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--acc) 16%, transparent); }
.nav a.ativo::before { box-shadow: 0 0 10px color-mix(in oklab, var(--acc) 70%, transparent); }
.nav-title { text-transform: uppercase; font-size: 10.5px; letter-spacing: .07em; }

/* Barra do topo em vidro fosco */
.topbar { background: color-mix(in oklab, var(--bg) 66%, transparent); backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6); }
.busca-placa input, .icon-btn, .user-chip { box-shadow: var(--shadow), var(--brilho); }
.avatar { background: linear-gradient(135deg, var(--acc), color-mix(in oklab, var(--acc) 70%, var(--acc-deep))); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.busca-res, .lookup-lista, .wa-sug { background: var(--vidro); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); border-color: var(--vidro-borda); }

/* Cartões */
.card, .kpi, .atalho, .vaga.ocupada, .wa-foto, .vit-item, .cx-op { box-shadow: var(--shadow), var(--brilho); }
.card { border-color: color-mix(in oklab, var(--line) 85%, transparent); }
.kpi { background: linear-gradient(180deg, var(--surface), color-mix(in oklab, var(--surface) 60%, var(--surface-2))); }
.kpi:hover, .atalho:hover, .vaga.ocupada:hover { box-shadow: var(--shadow-md), var(--brilho); }
.kpi.destaque { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 12px 30px -14px color-mix(in oklab, var(--acc) 85%, transparent), 0 2px 6px -2px color-mix(in oklab, var(--acc) 40%, transparent); }
.atalho { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.atalho .ic { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--acc) 22%, transparent); }
.atalho:hover .ic { box-shadow: 0 6px 14px -6px color-mix(in oklab, var(--acc) 80%, transparent); }
.page-head h1 > svg { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--acc) 22%, transparent); background: linear-gradient(180deg, var(--acc-100), var(--acc-50)); }
.card h3 > svg, h3.row > svg { color: var(--acc-text); }

/* Botões */
.btn { box-shadow: var(--shadow), var(--brilho); transition: background .15s, border-color .15s, box-shadow .15s, transform .08s; }
.btn-primario { background: linear-gradient(180deg, color-mix(in oklab, var(--acc) 92%, #fff), var(--acc)); border-color: color-mix(in oklab, var(--acc) 85%, #000);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 2px color-mix(in oklab, var(--acc) 40%, transparent), 0 6px 16px -8px color-mix(in oklab, var(--acc) 90%, transparent); }
.btn-primario:hover { background: linear-gradient(180deg, var(--acc), color-mix(in oklab, var(--acc) 90%, #000)); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 10px 22px -10px color-mix(in oklab, var(--acc) 95%, transparent); }
.btn-verde { background: linear-gradient(180deg, color-mix(in oklab, var(--green) 90%, #fff), var(--green)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 12px -6px color-mix(in oklab, var(--green) 80%, transparent); }
.btn-perigo { color: var(--red-text); }
.seg { box-shadow: inset 0 1px 2px rgba(0,0,0,.05); }
.seg button.ativo { box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 0 0 1px rgba(0,0,0,.03), var(--brilho); }

/* Campos */
.input, .campo input, .campo select, .campo textarea, select.input { box-shadow: inset 0 1px 2px rgba(24,24,27,.04); }
.input:hover, .campo input:hover, .campo select:hover, .campo textarea:hover { border-color: var(--line-2); }

/* Tabelas */
.tabela th { text-transform: uppercase; font-size: 10.5px; letter-spacing: .06em; background: color-mix(in oklab, var(--surface-2) 60%, transparent); }
.tabela tbody tr.clicavel td { transition: background .12s; }
.tabela tbody tr.clicavel:hover td { background: color-mix(in oklab, var(--acc) 5%, var(--surface)); }

/* Janelas (modais) com fundo desfocado */
.modal-fundo { background: rgba(14,14,18,.42); backdrop-filter: blur(6px) saturate(1.2); -webkit-backdrop-filter: blur(6px) saturate(1.2); }
.modal { box-shadow: var(--shadow-lg), var(--brilho); border-color: var(--vidro-borda); }
.modal-foot { background: color-mix(in oklab, var(--surface-2) 70%, transparent); }
.toast { background: color-mix(in oklab, var(--text) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-lg); }

/* Pátio: vaga livre discreta */
.vaga { min-height: 168px; border: 1.5px dashed color-mix(in oklab, var(--line-2) 80%, transparent); background: color-mix(in oklab, var(--surface) 35%, transparent); transition: border-color .15s, background .15s; }
.vaga:not(.ocupada):hover { border-color: var(--acc-line); background: var(--acc-50); }
.vaga .livre { font-size: 12.5px; }
.vaga .livre svg { width: 22px !important; height: 22px !important; opacity: .55; }
.vaga.ocupada::before { height: 3px; background: linear-gradient(90deg, var(--acc), var(--acc-300)); }

/* Avisos e cartões de texto com ícone: ícone sempre pequeno */
.card > svg:first-child, .card-pad > svg:first-child { width: 18px !important; height: 18px !important; flex: none; color: var(--acc-text); }
svg.ico { flex-shrink: 0; }

/* Cores sugeridas pela logo (tela Empresa) */
.cores-logo { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; margin-bottom: 12px; background: linear-gradient(180deg, var(--acc-50), transparent); border: 1px solid var(--acc-100); }
.cor-sug { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; color: var(--text-2); box-shadow: var(--shadow), var(--brilho); }
.cor-sug i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.35); }
.cor-sug:hover { border-color: var(--line-2); color: var(--text); }
.cor-sug.sel { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); color: var(--text); }
.aviso-linha { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 16px; border-radius: 12px; font-size: 12.5px; color: var(--text-2);
  background: color-mix(in oklab, var(--surface) 70%, transparent); border: 1px solid color-mix(in oklab, var(--line) 80%, transparent); box-shadow: var(--shadow), var(--brilho); }
.aviso-ic { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--acc-100); color: var(--acc-text); }
.aviso-ic svg, .livre-ic svg { width: 16px !important; height: 16px !important; opacity: 1 !important; }
.livre-ic { width: 34px; height: 34px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); transition: background .15s, color .15s; }
.vaga:not(.ocupada):hover .livre-ic { background: var(--acc-100); color: var(--acc-text); }
@media (max-width: 520px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px 13px; }
  .kpi .rot { font-size: 11.5px; }
  .kpi .val { font-size: 17px; }
  .kpi.destaque { grid-column: 1 / -1; }
  .graf { height: 190px; }
  .page-head h1 > svg { width: 30px !important; height: 30px !important; padding: 7px; }
}

/* Vitrine: foto do app "Meu carro" */
.vit-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; margin-top: 12px; }
.vit-app-prev { position: relative; overflow: hidden; border-radius: 18px; min-height: 140px; display: flex; align-items: flex-end; color: #fff; background-size: cover; background-position: center; box-shadow: var(--shadow-md); }
.vit-app-prev.padrao { background: radial-gradient(120% 140% at 100% 100%, color-mix(in oklab, var(--acc) 70%, #0E1014) 0%, #0E1014 70%); }
.vit-app-prev > div { padding: 16px; position: relative; z-index: 1; max-width: 62%; }
.vit-app-prev small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; font-weight: 700; }
.vit-app-prev b { display: block; font-size: 16px; line-height: 1.2; margin: 3px 0 10px; }
.vit-app-prev span { display: inline-block; background: #fff; color: #14161B; font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 10px; }
.vit-app-prev img { position: absolute; right: -24px; bottom: 8px; width: 60%; filter: drop-shadow(0 12px 10px rgba(0,0,0,.5)); }
.vit-app-op { display: grid; gap: 10px; }
.vit-app-gal { display: flex; gap: 8px; flex-wrap: wrap; }
.vit-app-gal button { width: 74px; height: 52px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: var(--surface-3); }
.vit-app-gal button.sel { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.vit-app-gal img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) { .vit-app { grid-template-columns: 1fr; } }
/* Vitrine: fotos com capa e arrastar */
.vit-fotos .vf { cursor: grab; border-radius: 12px; transition: transform .15s, box-shadow .15s, opacity .15s; }
.vit-fotos .vf.arrastando { opacity: .4; }
.vit-fotos .vf.alvo { box-shadow: 0 0 0 3px var(--acc); transform: scale(1.03); }
.vit-fotos .vf.capa img { box-shadow: 0 0 0 3px var(--acc); }
.vf-capa { position: absolute; left: 6px; top: 6px; background: var(--acc); color: var(--acc-ink); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; box-shadow: var(--shadow); }
.vit-fotos .vf-tornar { position: absolute; left: 6px; bottom: 6px; top: auto; right: auto; font-size: 11px; padding: 3px 8px; opacity: 0; transition: opacity .15s; background: color-mix(in oklab, var(--surface) 88%, transparent); backdrop-filter: blur(6px); }
.vit-fotos .vf:hover .vf-tornar { opacity: 1; }
@media (hover: none) { .vit-fotos .vf-tornar { opacity: 1; } }
.vf-arrastar { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); color: #fff; font-size: 16px; line-height: 1; text-shadow: 0 1px 3px rgba(0,0,0,.6); pointer-events: none; }
/* Vitrine: parceiros do app */
.parc-lista { display: grid; gap: 10px; }
.parc { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow), var(--brilho); }
.parc.off { opacity: .6; }
.parc-foto { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--acc-50); color: var(--acc-text); border: 1px solid var(--line); }
.parc-foto img { width: 100%; height: 100%; object-fit: cover; }
.parc-foto.grande { width: 84px; height: 84px; border-radius: 18px; }
.parc-tx { display: grid; gap: 3px; min-width: 0; }
.parc-num { text-align: center; display: grid; line-height: 1.2; padding: 0 10px; border-left: 1px solid var(--line); }
.parc-num b { font-size: 20px; color: var(--acc-text); }
.parc-num span { font-size: 11px; color: var(--text-2); }
.parc-num small { font-size: 10.5px; color: var(--text-3); }
.parc-ed-foto { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 700px) { .parc { grid-template-columns: 48px minmax(0, 1fr); } .parc-num, .parc-ac { grid-column: 2; text-align: left; border: 0; padding: 0; } }
/* Anunciantes: banner e criador de arte */
.parc-ban { width: 100%; max-width: 360px; aspect-ratio: 12/5; object-fit: cover; border-radius: 10px; margin-top: 6px; box-shadow: var(--shadow); }
.parc-num { display: grid; grid-template-columns: auto auto; gap: 0 8px; align-items: baseline; text-align: left; }
.parc-num b { font-size: 18px; } .parc-num small { grid-column: 1 / -1; }
.parc-ac { display: grid; gap: 6px; }
.parc-ed-foto { flex-wrap: wrap; }
.parc-ed-ban { margin-left: auto; display: grid; gap: 8px; width: min(100%, 360px); }
.parc-ban-prev { aspect-ratio: 12/5; border-radius: 12px; overflow: hidden; background: var(--surface-3); border: 1px dashed var(--line-2); display: grid; place-items: center; }
.parc-ban-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.parc-ban-prev > div { display: grid; place-items: center; gap: 6px; text-align: center; padding: 14px; font-size: 12px; color: var(--text-3); }
.arte { display: grid; gap: 16px; }
.arte canvas { width: 100%; height: auto; aspect-ratio: 12/5; border-radius: 16px; box-shadow: var(--shadow-md); background: #0E1014; }
.parc-sw { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.parc-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.parc-sw span { width: 36px; height: 20px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.parc-sw span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.parc-sw input:checked + span { background: var(--green); }
.parc-sw input:checked + span::after { transform: translateX(16px); }

/* Vitrine: app com clientes conectados */
.app-bloco { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.app-prev { padding: 12px; border-radius: 14px; background: linear-gradient(135deg, #2B2E35, #17181C); }
.app-notif { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.92); color: #16171B; box-shadow: 0 8px 20px -10px rgba(0,0,0,.6); }
.app-notif img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.app-notif b { display: block; font-size: 13px; } .app-notif span { display: block; font-size: 12.5px; color: #45454D; line-height: 1.35; } .app-notif small { font-size: 11px; color: #8E8E96; }
.app-hist { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }

/* ---------- Central de Ajuda ---------- */
.aj-topo { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; }
.aj-busca { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); min-height: 54px; }
.aj-busca:focus-within { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
.aj-busca svg { color: var(--text-3); flex: none; }
.aj-busca input { flex: 1; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--text); min-width: 0; }
.aj-suporte { display: flex; align-items: center; gap: 14px; }
.aj-suporte > div, .aj-ainda > div { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.aj-suporte .btn, .aj-ainda .btn { flex: none; }
.aj-destaque { display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-decoration: none; color: inherit; margin-bottom: 10px; transition: border-color .15s, transform .15s; }
.aj-destaque:hover { border-color: var(--acc-line); transform: translateY(-1px); }
.aj-destaque .aj-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--acc-100); color: var(--acc-text); flex: none; display: grid; place-items: center; }
.aj-destaque .aj-ic svg { width: 22px; height: 22px; }
.aj-destaque > svg:last-child { margin-left: auto; color: var(--text-3); flex: none; }
.aj-destaque div { display: flex; flex-direction: column; gap: 2px; }
.aj-destaque span { font-size: 13px; color: var(--text-2); }
.aj-cat { margin: 26px 0 10px; font-size: 15px; }
.aj-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.aj-item { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.aj-item:hover { border-color: var(--acc-line); transform: translateY(-1px); }
.aj-item b { font-size: 14px; padding-right: 22px; }
.aj-item span { font-size: 12.5px; color: var(--text-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.aj-item em { font-style: normal; font-size: 11.5px; color: var(--amber-text); display: flex; align-items: center; gap: 4px; }
.aj-item em svg { width: 13px; height: 13px; }
.aj-item i { position: absolute; top: 12px; right: 12px; color: var(--acc-text); }
.aj-voltar { margin: 4px 0 14px; }
.aj-voltar a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.aj-voltar a:hover { color: var(--acc-text); }
.aj-artigo { max-width: 860px; }
.aj-cab { margin-bottom: 18px; }
.aj-tag { display: inline-block; font-size: 12px; font-weight: 650; color: var(--acc-text); background: var(--acc-soft); padding: 3px 10px; border-radius: 99px; }
.aj-cab h1 { font-size: 28px; letter-spacing: -.025em; margin: 10px 0 8px; line-height: 1.2; }
.aj-resumo { font-size: 16px; color: var(--text-2); line-height: 1.55; margin: 0 0 10px; }
.aj-sec { margin-bottom: 14px; }
.aj-sec h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.aj-sec h2 svg { color: var(--acc-text); }
.aj-benef { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.aj-benef li { display: flex; gap: 10px; line-height: 1.5; }
.aj-benef li > svg { flex: none; color: var(--green-text); margin-top: 2px; }
.aj-passos { list-style: none; counter-reset: p; padding: 0; margin: 0; display: grid; gap: 12px; }
.aj-passos li { counter-increment: p; display: flex; gap: 12px; line-height: 1.55; }
.aj-passos li::before { content: counter(p); flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 750; font-size: 13px; background: var(--acc); color: var(--acc-ink); margin-top: 1px; }
.aj-dicas { background: var(--acc-50); }
.aj-dicas ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; line-height: 1.5; }
.aj-video-breve { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r); border: 1px dashed var(--line-2); color: var(--text-3); font-size: 13px; margin-bottom: 14px; }
.aj-ainda { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
@media (max-width: 760px) {
  .aj-topo { grid-template-columns: 1fr; }
  .aj-suporte, .aj-ainda { flex-direction: column; align-items: stretch; }
  .aj-cab h1 { font-size: 23px; }
}
/* Primeiros passos (Painel) */
.pp-card { margin-bottom: 16px; border-color: var(--acc-line); background: linear-gradient(180deg, var(--acc-50), var(--surface) 70%); }
.pp-card h3 { display: flex; align-items: center; gap: 8px; }
.pp-card h3 svg { color: var(--acc-text); }
.pp-barra { height: 6px; border-radius: 99px; background: var(--line); margin: 12px 0 14px; overflow: hidden; }
.pp-barra i { display: block; height: 100%; background: var(--acc); border-radius: 99px; transition: width .4s; }
.pp-itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.pp-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 550; }
.pp-item:hover { border-color: var(--acc-line); }
.pp-item.ok { color: var(--text-3); text-decoration: line-through; font-weight: 450; }
.pp-ck { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; }
.pp-item.ok .pp-ck { background: var(--green); border-color: var(--green); color: #fff; }
.pp-ck svg { width: 13px; height: 13px; }

/* Controle de ponto: espelho do mês vira um cartão por dia no celular */
@media (max-width: 600px) {
  .tabela.espelho thead { display: none; }
  .tabela.espelho, .tabela.espelho tbody { display: block; }
  .tabela.espelho tr { display: grid; grid-template-columns: auto 1fr auto auto; grid-template-areas: "dia sit trab acao" "bat bat saldo acao"; gap: 4px 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .tabela.espelho td { display: block; padding: 0; border: 0; }
  .tabela.espelho .es-dia { grid-area: dia; }
  .tabela.espelho .es-sit { grid-area: sit; }
  .tabela.espelho .es-trab { grid-area: trab; font-weight: 600; }
  .tabela.espelho .es-saldo { grid-area: saldo; font-size: 13px; }
  .tabela.espelho .es-bat { grid-area: bat; display: flex; flex-wrap: wrap; gap: 4px; }
  .tabela.espelho .es-acao { grid-area: acao; }
  .tabela.espelho .es-jor { display: none; }
}
