:root { --bg:#f3f5f9; --card:#fff; --ink:#172033; --muted:#667085; --line:#e3e7ee; --brand:#1d4ed8; --brand-ink:#fff; --side:#101828; --side-ink:#c8d0df; --danger:#b42318; --warn:#b54708; --ok:#067647; --radius:10px; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html, body { margin:0; height:100%; }
body { font:14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--ink); background:var(--bg); }
h1 { font-size:20px; margin:0; } h2 { font-size:15px; margin:0 0 12px; } h3 { margin:0 0 12px; font-size:17px; }
a { color:var(--brand); text-decoration:none; }
.muted { color:var(--muted); } .grow { flex:1; } .boot { padding:40px; text-align:center; color:var(--muted); }
#app { display:flex; min-height:100%; }
#side { width:250px; flex:none; background:var(--side); color:var(--side-ink); position:sticky; top:0; height:100vh; overflow-y:auto; }
.brand { padding:18px 20px; font-size:17px; font-weight:700; color:#fff; letter-spacing:.2px; border-bottom:1px solid #ffffff14; }
#nav { padding:10px 8px 30px; }
#nav a { display:block; padding:7px 12px; border-radius:7px; color:var(--side-ink); }
#nav a:hover { background:#ffffff12; color:#fff; } #nav a.on { background:var(--brand); color:#fff; }
#nav details { margin-top:4px; } #nav details a { padding-left:24px; font-size:13.5px; }
#nav summary { cursor:pointer; padding:8px 12px; font-weight:600; color:#fff; border-radius:7px; list-style:none; display:flex; justify-content:space-between; }
#nav summary::after { content:"›"; opacity:.6; transition:transform .15s; } #nav details[open] summary::after { transform:rotate(90deg); }
#nav summary::-webkit-details-marker { display:none; }
#right { flex:1; min-width:0; display:flex; flex-direction:column; }
#top { display:flex; align-items:center; gap:14px; padding:10px 22px; background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
#main { padding:22px; max-width:1500px; width:100%; }
.burger { display:none; }
.head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.head.small { margin-bottom:8px; } .head.small h2 { margin:0; }
.head-act { display:flex; gap:8px; flex-wrap:wrap; } .crumb { color:var(--muted); }
.card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px; margin-bottom:16px; }
.note { background:#fffaeb; border:1px solid #fedf89; color:#93370d; border-radius:var(--radius); padding:10px 14px; margin-bottom:16px; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:8px 14px; border-radius:8px; border:1px solid var(--line); background:#fff; color:var(--ink); font:inherit; font-weight:600; cursor:pointer; white-space:nowrap; }
.btn:hover { background:#f8fafc; } .btn:disabled { opacity:.5; cursor:not-allowed; }
.btn.primary { background:var(--brand); border-color:var(--brand); color:var(--brand-ink); } .btn.primary:hover { background:#1e40af; }
.btn.danger { color:var(--danger); border-color:#fda29b; } .btn.block { width:100%; margin-top:14px; padding:11px; }
.link { background:none; border:0; padding:0; color:var(--brand); font:inherit; cursor:pointer; } .link:disabled { opacity:.4; }
.icon { background:none; border:0; font-size:20px; line-height:1; cursor:pointer; color:var(--muted); padding:4px 8px; border-radius:6px; } .icon:hover { background:#f2f4f7; color:var(--danger); }
:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
input, select, textarea { font:inherit; color:inherit; width:100%; padding:8px 10px; border:1px solid #cfd5df; border-radius:8px; background:#fff; min-height:36px; }
input:disabled, select:disabled, textarea:disabled { background:#f2f4f7; color:#475467; }
input[type=checkbox] { width:16px; height:16px; min-height:0; padding:0; margin:0; accent-color:var(--brand); }
input.num, td.num, th.num { text-align:right; font-variant-numeric:tabular-nums; }
.fld { display:flex; flex-direction:column; gap:4px; min-width:0; } .fld > span { font-size:12.5px; font-weight:600; color:#344054; }
.fld.inline { justify-content:flex-end; padding-bottom:8px; } .req { color:var(--danger); }
.chk { display:inline-flex; align-items:center; gap:8px; cursor:pointer; }
.form-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:12px 16px; } .form-grid.one { grid-template-columns:1fr; } .fld.wide { grid-column:1 / -1; }
.filters { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; } .filters .fld { min-width:150px; } .filters .fld.grow { min-width:220px; }
.table-wrap { overflow-x:auto; padding:0; } .card.table-wrap { padding:0; }
table { width:100%; border-collapse:collapse; }
th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.3px; color:var(--muted); padding:10px 12px; border-bottom:1px solid var(--line); white-space:nowrap; background:#fafbfc; }
td { padding:9px 12px; border-bottom:1px solid #eef1f5; vertical-align:middle; }
tr.click { cursor:pointer; } tr.click:hover td, tr.click:focus td { background:#f5f8ff; } tr.strong td { font-weight:700; background:#fafbfc; } td.neg { color:var(--danger); }
.empty { text-align:center; color:var(--muted); padding:28px; }
.tag { display:inline-block; padding:2px 8px; border-radius:99px; background:#eef2ff; color:#3538cd; font-size:12px; font-weight:600; white-space:nowrap; }
table.grid td { padding:5px 6px; min-width:110px; } table.grid td:first-child { min-width:260px; } table.grid td:last-child { min-width:0; width:36px; }
.pager { display:flex; gap:8px; align-items:center; justify-content:flex-end; }
.ref { position:relative; } .ref-dd { position:absolute; z-index:20; left:0; right:0; top:100%; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:0 8px 24px #1018281f; max-height:260px; overflow:auto; min-width:240px; }
.ref-it { padding:8px 10px; cursor:pointer; } .ref-it:hover { background:#f5f8ff; } .ref-it small { color:var(--muted); } .ref-empty { padding:8px 10px; color:var(--muted); }
.mods { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:14px; } .mods-g { display:flex; flex-direction:column; gap:6px; } .mods-g strong { font-size:13px; } .mods-g .link { font-size:11.5px; font-weight:400; }
.cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:12px; margin-bottom:16px; }
.kpi { background:var(--card); border:1px solid var(--line); border-left:4px solid var(--brand); border-radius:var(--radius); padding:12px 14px; display:flex; flex-direction:column; gap:4px; }
.kpi span { font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.3px; } .kpi strong { font-size:20px; } .kpi.warn { border-left-color:var(--warn); } .kpi.warn strong { color:var(--warn); }
.two { display:grid; grid-template-columns:repeat(auto-fit, minmax(380px, 1fr)); gap:16px; align-items:start; } .two .card { margin:0; }
.barcol { width:28%; min-width:90px; } .barcol i { display:block; height:10px; border-radius:5px; background:var(--brand); opacity:.75; min-width:2px; }
.auth { margin:auto; width:100%; max-width:400px; padding:20px; } .auth h1 { margin-bottom:12px; }
.modal-bg { position:fixed; inset:0; background:#10182899; display:flex; align-items:center; justify-content:center; padding:16px; z-index:50; }
.modal { background:#fff; border-radius:12px; padding:20px; width:100%; max-width:460px; max-height:90vh; overflow:auto; } .modal-foot { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
#toasts { position:fixed; right:16px; bottom:16px; display:flex; flex-direction:column; gap:8px; z-index:60; }
.toast { background:var(--ok); color:#fff; padding:10px 14px; border-radius:8px; box-shadow:0 8px 24px #10182833; max-width:380px; } .toast.err { background:var(--danger); }
@media (max-width:900px) {
  #side { position:fixed; z-index:40; transform:translateX(-100%); transition:transform .2s; } body.nav-open #side { transform:none; box-shadow:0 0 0 100vw #10182880; }
  .burger { display:block; } #main { padding:14px; } #top { padding:8px 12px; gap:10px; } .user { display:none; } .two { grid-template-columns:1fr; }
}
@media print { #side, #top, .noprint, #toasts { display:none !important; } #main { padding:0; } .card, .kpi { border-color:#999; break-inside:avoid; } body { background:#fff; } }
/* telas especiais */
.tag.off { background:#fef0c7; color:#93370d; } .tag.on { background:#d1fadf; color:#05603a; }
.urlbox { padding:8px 0; }
.pdv { display:grid; grid-template-columns:minmax(0, 1fr) 340px; gap:16px; align-items:start; }
.pdv-cod { font-size:17px; padding:12px; margin-bottom:12px; } .pdv-q input { width:90px; }
.pdv-lado { display:flex; flex-direction:column; gap:10px; position:sticky; top:70px; }
.pdv-total { font-size:34px; line-height:1.1; } .pdv-troco { font-size:18px; font-weight:700; color:var(--ok); min-height:24px; }
.pdv-formas { display:grid; grid-template-columns:1fr 1fr; gap:6px; } .pdv-status { display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:12.5px; color:var(--muted); }
.pdv-lado details summary { cursor:pointer; color:var(--brand); margin-bottom:8px; }
.kds { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; align-items:start; } .kds-item { margin-bottom:10px; } .kds-item .note { margin:8px 0; }
@media (max-width:900px) { .pdv, .kds { grid-template-columns:minmax(0, 1fr); } .pdv-lado { position:static; } }
