:root {
  --bg: #080D0C; --surface: #111A17; --surface-2: #17221E; --surface-3: #1D2A25; --line: #22312B;
  --green: #7CC421; --green-dim: rgba(124,196,33,.12); --green-ink: #0B1503; --fg: #F5F7F6; --muted: #93A39B;
  --warn: #F2C14E; --warn-dim: rgba(242,193,78,.1); --danger: #FF6B6B; --danger-dim: rgba(255,107,107,.1);
  --info: #6CB8FF; --green-deep: #2F5A0C; --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--green); text-decoration: none; }
h1 { font-size: 1.6rem; margin: 0 0 4px; line-height: 1.2; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
h3 { font-size: .95rem; margin: 16px 0 8px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; }
.hidden, [hidden] { display: none !important; }

/* ---- shell (mockup aprovado: menu com ícones de linha, barra com padaria, conexão e hora) */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, #0B1311, var(--bg)); border-right: 1px solid var(--line); padding: 18px 12px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.5rem; margin: 0 6px 18px; color: var(--fg); }
.brand img { display: block; width: 170px; max-width: 100%; height: auto; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--green); color: var(--green-ink); display: grid; place-items: center; font-size: 1rem; }
.brand small { display: block; font-size: .7rem; font-weight: 400; color: var(--muted); margin-top: -4px; }
.nav { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #C9D3CE; margin-bottom: 1px; font-size: .92rem; line-height: 1.25; }
.nav a .i { color: var(--muted); }
.nav a:hover { background: var(--surface); color: var(--fg); }
.nav a.active { background: linear-gradient(90deg, rgba(124,196,33,.16), rgba(124,196,33,.04)); color: var(--green); font-weight: 600; box-shadow: inset 3px 0 0 var(--green); }
.nav a.active .i { color: var(--green); }
.nav .ico { width: 20px; text-align: center; opacity: .9; }
.nav-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: #6F7F77; margin: 16px 12px 6px; }
.nav hr { border: 0; border-top: 1px solid var(--line); margin: 14px 4px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 6px 4px; margin-top: 10px; border-top: 1px solid var(--line); }
.side-user .avatar { width: 38px; height: 38px; flex: none; background: linear-gradient(135deg, #E8835A, #C2563A); color: #fff; }
.side-user .who-text { flex: 1; min-width: 0; line-height: 1.25; }
.side-user .name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user form { margin: 0; }
.sidebar .by { font-size: .68rem; padding: 2px 8px 0; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--fg); border-color: var(--line); background: var(--surface); }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 24px; min-height: 64px; border-bottom: 1px solid var(--line); background: rgba(8,13,12,.92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.store-box { display: flex; align-items: center; gap: 12px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); line-height: 1.2; min-width: 0; }
.store-box .i { color: var(--green); width: 22px; height: 22px; }
.store-box .name { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn.btn-outline { background: transparent; border-color: rgba(124,196,33,.55); color: var(--green); }
.btn.btn-outline:hover { background: var(--green-dim); border-color: var(--green); }
.btn .i { width: 18px; height: 18px; }
kbd { font: 600 .68rem/1 ui-monospace, monospace; padding: 3px 5px; border-radius: 5px; border: 1px solid currentColor; opacity: .75; }
.net { position: relative; display: grid; place-items: center; width: 40px; height: 40px; color: var(--green); }
.net .i { width: 22px; height: 22px; }
.net .dot { position: absolute; right: 6px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.net.off { color: var(--danger); }
.net.off .dot { background: var(--danger); box-shadow: none; }
.top-clock { text-align: right; line-height: 1.15; white-space: nowrap; }
.top-clock .t { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; color: var(--fg); }
.topbar .menu-btn { display: none; }
.content { padding: 24px; max-width: 1400px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }

/* ---- surfaces */
.card { background: linear-gradient(180deg, var(--surface), #0E1614); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
a.card { transition: border-color .15s, transform .15s; }
a.card:hover { border-color: rgba(124,196,33,.45); }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .row > .card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---- forms */
label { display: block; font-size: .82rem; color: var(--muted); margin: 0 0 6px; }
.field { margin-bottom: 14px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font: inherit; min-height: 42px;
}
textarea { min-height: 70px; resize: vertical; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--green); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: transparent; }
input:disabled { opacity: .5; }
.check { display: inline-flex; gap: 8px; align-items: center; color: var(--fg); font-size: .9rem; margin: 0; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* ---- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; min-height: 42px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--green); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 6px 10px; min-height: 34px; font-size: .85rem; }
.btn-lg { padding: 14px 22px; min-height: 52px; font-size: 1.05rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- badges & alerts */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .75rem; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag-green { color: var(--green); border-color: rgba(124,196,33,.4); background: var(--green-dim); }
.tag-warn { color: var(--warn); border-color: rgba(242,193,78,.4); background: var(--warn-dim); }
.tag-danger { color: var(--danger); border-color: rgba(255,107,107,.4); background: var(--danger-dim); }
.tag-info { color: var(--info); border-color: rgba(108,184,255,.4); }
.alert { padding: 12px 14px; border-radius: 10px; margin: 12px 0; border: 1px solid; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert-warn { border-color: rgba(242,193,78,.5); color: var(--warn); background: var(--warn-dim); }
.alert-danger { border-color: rgba(255,107,107,.5); color: var(--danger); background: var(--danger-dim); }
.alert-ok { border-color: rgba(124,196,33,.5); color: var(--green); background: var(--green-dim); }
.alert-info { border-color: var(--line); color: var(--fg); background: var(--surface-2); }

/* ---- tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .78rem; font-weight: 600; color: var(--muted); padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.edit td { padding: 4px; }
table.edit input, table.edit select { min-height: 36px; padding: 6px 8px; }
tfoot td { font-weight: 700; border-bottom: 0; }

/* ---- recipe cards */
.recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.rcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; color: var(--fg); position: relative; }
.rcard:hover { border-color: var(--muted); }
.rcard.selected { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.rcard .photo { height: 110px; display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: rgba(255,255,255,.85);
  background: radial-gradient(circle at 30% 30%, #C98A3D, #6B3E17 70%); background-size: cover; background-position: center; }
.rcard .body { padding: 12px 14px; flex: 1; }
.rcard .name { font-weight: 700; line-height: 1.25; }
.rcard .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.rcard .check-badge { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: var(--green-ink); display: none; place-items: center; font-weight: 800; }
.rcard.selected .check-badge { display: grid; }

/* ---- method cards */
.methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--surface-2); text-align: left; color: var(--fg); font: inherit; }
.mcard:hover:not([disabled]) { border-color: var(--muted); }
.mcard.selected { border-color: var(--green); background: var(--green-dim); }
.mcard[disabled] { opacity: .45; cursor: not-allowed; }
.mcard .t { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.mcard .d { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* ---- timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
.tl::before { content: ""; position: absolute; left: -24px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--green); }
.tl.parallel { border-style: dashed; }
.tl.parallel::before { border-color: var(--muted); }
.tl.bake::before { background: var(--green); }
.tl .when { font-weight: 700; font-variant-numeric: tabular-nums; }
.tl .what { font-weight: 600; }
.tl .why { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.tl .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ---- stats */
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat .k { font-size: .78rem; color: var(--muted); }
.stat .v { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.big-num { font-size: 2rem; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }

/* ---- login */
.login { max-width: 400px; margin: 10vh auto 0; padding: 16px; }

/* ---- responsive */
@media (max-width: 1100px) { .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 20; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.6); }
  .topbar .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .topbar .top-new, .top-clock .d { display: none; }
  .store-box { padding: 6px 10px; }
  .content { padding: 16px; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .methods { grid-template-columns: 1fr; }
  h1 { font-size: 1.35rem; }
  .btn-lg { width: 100%; }
}
@media (max-width: 480px) { .recipes { grid-template-columns: 1fr 1fr; gap: 10px; } .rcard .photo { height: 80px; } }

/* ---- print: ficha limpa em papel */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --surface-3: #fff; --fg: #000; --muted: #444; --line: #bbb; --green: #000; }
  .sidebar, .topbar, .no-print { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
  .card { border: 0; padding: 0; break-inside: avoid; }
  .tag { border-color: #999; color: #000; background: none; }
}
#resultado { scroll-margin-top: 72px; }
.modal-lite { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.65); overflow-y: auto; padding: 16px; }
.thumb { width: 42px; height: 42px; border-radius: 8px; background: var(--surface-3) center / cover; }
.ph-prev { width: 150px; height: 150px; border-radius: 12px; border: 1px dashed var(--line); display: grid; place-items: center; color: var(--muted); background: var(--bg) center / cover; }
@media (max-width: 1100px) { .grid[style*="300px"] { grid-template-columns: 1fr !important; } }
.segs { display: flex; gap: 3px; margin-top: 6px; }
.seg { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 2px; border-radius: 6px; font-size: .72rem; min-width: 0; text-align: center; color: var(--bg); font-weight: 700; }
.seg small { font-weight: 400; opacity: .8; }
.s-p { background: var(--muted); } .s-c { background: var(--info); } .s-f { background: var(--surface-3); color: var(--muted); } .s-v { background: var(--green); } .s-d { background: var(--warn); }
.test-out { margin-top: 10px; min-height: 80px; }
.test-out td { padding: 6px 4px; }

/* ---- PDV: comandas, mesas, cozinha (telas dentro do layout padrão) */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mode { padding: 9px; min-height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.mode.active { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.mbtn { min-height: 50px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; padding: 6px 12px; }
.mbtn.active { border-color: var(--green); color: var(--green); background: var(--green-dim); }
.methods-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; }
.chip { flex: none; padding: 8px 14px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; }
.chip.active { border-color: var(--green); color: var(--green); background: var(--green-dim); }
.small-chips .chip { padding: 6px 10px; min-height: 34px; font-size: .85rem; }
.tabs-layout { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tabs-left { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow-y: auto; }
.tab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tcard { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px; color: var(--fg); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.tcard:hover { border-color: var(--muted); }
.tcard.sel { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.tcard.alert { border-color: rgba(255,107,107,.6); }
.tprice { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.empty-detail { padding: 40px 10px; text-align: center; }
table.items td { padding: 8px 6px; }
table.items tr.cancelled td { opacity: .45; text-decoration: line-through; }
table.items tr.cancelled td .small { text-decoration: none; }
.totals .row { display: flex; padding: 3px 0; flex-wrap: nowrap; }
.totals .total { font-size: 1.3rem; font-weight: 800; color: var(--green); }
.totals .link, button.link { background: none; border: 0; color: var(--green); font: inherit; cursor: pointer; padding: 0; }
details.more { position: relative; }
details.more summary { list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
.more-menu { position: absolute; right: 0; top: 100%; z-index: 10; display: flex; flex-direction: column; gap: 4px; padding: 8px; min-width: 220px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 12px; }
.more-menu .btn { justify-content: flex-start; }
.picker { max-width: 1100px; margin: 3vh auto; }
.pick-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; margin-top: 8px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 60vh; overflow-y: auto; align-content: start; }
.pk { display: flex; flex-direction: column; gap: 4px; text-align: left; min-height: 70px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; cursor: pointer; }
.pk:active { border-color: var(--green); }
.pkn { font-weight: 700; line-height: 1.2; }
.pick-cart { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; align-self: start; }
.opt-list, .pay-items { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.opt { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font-size: .95rem; margin: 0; cursor: pointer; }
.opt input { width: 20px; height: 20px; min-height: 0; accent-color: var(--green); }
/* mesas */
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--c); }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.mesa { --c: var(--green); border: 2px solid var(--c); border-radius: 14px; background: var(--surface); color: var(--fg); padding: 12px; text-align: center; cursor: pointer; font: inherit; min-height: 120px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.mesa .n { font-size: 1.8rem; font-weight: 800; color: var(--c); }
.mesa.livre { --c: var(--green); }
.mesa.ocupada { --c: var(--warn); }
.mesa.atendimento { --c: var(--info); }
.mesa.atencao { --c: var(--danger); animation: pulse 1.6s infinite; }
.mesa.indisponivel { --c: #5b6762; opacity: .7; }
.mesa.sel { box-shadow: 0 0 0 3px var(--c); }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(255,107,107,.25); } }
/* cozinha */
.kds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.kcol h2 { display: flex; gap: 8px; align-items: center; }
.ticket { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--info); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.ticket.warn { border-left-color: var(--warn); }
.ticket.late { border-left-color: var(--danger); }
.ticket.new { animation: flashT 1.2s 2; }
@keyframes flashT { 50% { background: var(--green-dim); } }
.ticket .head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.ticket .head strong { font-size: 1.15rem; }
.kitem { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.kitem .q { font-size: 1.2rem; font-weight: 800; min-width: 36px; }
.kitem .opts { color: var(--muted); font-size: .85rem; }
.kitem .obs { color: var(--warn); font-weight: 600; font-size: .9rem; }
@media (max-width: 1100px) { .tabs-layout { grid-template-columns: 1fr; } .tabs-left { position: static; max-height: none; } .pick-body { grid-template-columns: 1fr; } .kds { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .tab-grid { grid-template-columns: 1fr 1fr; } }
.litem-row { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; color: var(--fg); background: var(--bg); }
.litem-row:hover { border-color: var(--green); }
/* equipamentos */
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.dev { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.dev.new { border-color: rgba(108,184,255,.6); box-shadow: 0 0 0 1px rgba(108,184,255,.25); }
.dev.ignored { opacity: .5; }
.agent-row { padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.pair-code { font: 800 2.6rem/1.2 ui-monospace, monospace; letter-spacing: .12em; text-align: center; color: var(--green); padding: 16px; margin: 10px 0; border: 1px dashed var(--green); border-radius: 12px; }
.log { padding: 4px 0; border-bottom: 1px solid var(--line); }
.log.erro { color: var(--danger); } .log.aviso { color: var(--warn); }
.dash-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--green); background: var(--green-dim); border: 1px solid rgba(124,196,33,.25); }
.dash-ico .i { width: 24px; height: 24px; }

/* ---- shell v2 (mockup da Visão geral): busca geral, sino, padaria e usuário no rodapé do menu */
.nav a .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.side-store { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); line-height: 1.2; }
.side-store .store-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--green); background: var(--green-dim); flex: none; }
.side-store .name { font-weight: 600; font-size: .85rem; }
.side-user { position: relative; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.side-user summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; }
.side-user summary::-webkit-details-marker { display: none; }
.side-user .who-text { display: flex; flex-direction: column; }
.side-user .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.side-user[open] .chev { transform: rotate(180deg); }
.user-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); padding: 6px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.user-menu a, .user-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--fg); font: inherit; cursor: pointer; text-align: left; }
.user-menu a:hover, .user-menu button:hover { background: var(--surface); }
.user-menu form { margin: 0; }
.gsearch { position: relative; flex: 0 1 620px; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.gsearch:focus-within { border-color: var(--green); }
.gsearch > .i { color: var(--muted); }
.gsearch input { border: 0; background: transparent; padding: 0; min-height: 44px; outline: none !important; }
.gsearch kbd { white-space: nowrap; opacity: .6; }
.gresults { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; max-height: 60vh; overflow-y: auto; padding: 6px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.gresults .g-grp { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 8px 10px 4px; }
.gresults a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; color: var(--fg); }
.gresults a:hover, .gresults a.sel { background: var(--green-dim); }
.bell { position: relative; }
.bell summary { list-style: none; position: relative; }
.bell summary::-webkit-details-marker { display: none; }
.bell summary .i { width: 22px; height: 22px; }
.bell-n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.bell-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(380px, 90vw); max-height: 70vh; overflow-y: auto; padding: 6px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.bell-head { font-weight: 700; padding: 8px 10px; }
.alert-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border-radius: 10px; color: var(--fg); }
.alert-row:hover { background: var(--surface); }
.alert-row .a-ico { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: var(--bg); background: var(--info); }
.alert-row.danger .a-ico { background: var(--danger); }
.alert-row.warn .a-ico { background: var(--warn); }
.alert-row.danger strong { color: var(--danger); }
.alert-row.warn strong { color: var(--warn); }
.alert-row.info strong { color: var(--info); }
.alert-row .a-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.alert-row .a-when { white-space: nowrap; }
@media (max-width: 1100px) { .topbar .store-box, .gsearch kbd { display: none; } }
@media (max-width: 860px) { .gsearch { flex: 1; } .top-clock { display: none; } }

/* ---- Visão geral (mockup 29/10) */
.b { font-weight: 700; }
.green { color: var(--green); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dash { display: flex; flex-direction: column; gap: 16px; }
.dash h2 { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; }
.dash h2 .i { color: var(--fg); }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.dash-head h1 { font-size: 1.85rem; }
.head-card { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); line-height: 1.25; }
.head-card .i { width: 24px; height: 24px; }
.head-card .dot { width: 12px; height: 12px; }
.kpis > .card + .card { margin-top: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.kpi { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; color: var(--fg); padding: 18px 20px; }
.kpi .k { color: #C9D3CE; }
.kpi .v { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: 2px 0 4px; }
.kpi .up { color: var(--green); font-weight: 600; } .kpi .down { color: var(--danger); font-weight: 600; }
.kpi .up .i, .kpi .down .i { width: 15px; height: 15px; vertical-align: -2px; }
.kpi-ico { width: 52px; height: 52px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--green); background: var(--green-dim); border: 1px solid rgba(124,196,33,.2); }
.kpi-ico .i { width: 26px; height: 26px; }
.dash-row { display: flex; gap: 16px; flex-wrap: wrap; }
.dash-row > .card { flex: 1 1 330px; min-width: 0; margin: 0; }
.dash-row > .grow-2 { flex-grow: 1.7; }
.dash .card-head a { text-decoration: underline; text-underline-offset: 3px; color: #C9D3CE; }
.sel-sm { width: auto; min-height: 34px; padding: 4px 10px; font-size: .85rem; border-radius: 8px; }
.empty { padding: 24px 6px; text-align: center; }
.empty .i { vertical-align: -5px; }
/* gráficos: uma série (verde da marca), grade discreta, dica ao passar o mouse */
.bars svg { display: block; max-width: 100%; }
.grid-l { stroke: var(--line); stroke-width: 1; }
.ax { fill: var(--muted); font-size: 11px; }
.bar { fill: var(--green); }
.hit { fill: transparent; cursor: crosshair; }
.hit:hover { fill: rgba(255,255,255,.04); }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.donut { width: 190px; height: 190px; flex: none; }
.donut .seg { cursor: pointer; }
.donut .seg:hover { opacity: .85; }
.d-v { fill: var(--fg); font-size: 15px; font-weight: 800; }
.legend-l { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; }
.legend-l li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: .9rem; cursor: default; }
.legend-l .sw { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.legend-l .nm { flex: 1; }
.chart-tip { position: fixed; z-index: 60; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line); box-shadow: 0 10px 24px rgba(0,0,0,.45); line-height: 1.3; }
/* agenda */
.ag { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 4px 10px 26px; color: var(--fg); border-bottom: 1px solid var(--line); }
.ag:last-child { border-bottom: 0; }
.ag::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: rgba(124,196,33,.35); }
.ag:first-of-type::before { top: 50%; } .ag:last-child::before { bottom: 50%; }
.ag-dot { position: absolute; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--surface); }
.ag.agora .ag-dot { background: var(--bg); border: 3px solid var(--green); box-shadow: 0 0 10px var(--green); }
.ag.atrasada .ag-dot { background: var(--danger); }
.ag-h { width: 52px; font-weight: 700; color: var(--green); }
.ag.atrasada .ag-h { color: var(--danger); }
.ag-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ag-s .i { width: 22px; height: 22px; color: var(--warn); }
.ag.feita .ag-s .i { color: var(--green); } .ag.atrasada .ag-s .i { color: var(--danger); } .ag.agora .ag-s .i { color: var(--info); }
/* mais vendidos */
.top-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.top-row:last-child { border-bottom: 0; }
.rank { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 700; background: var(--surface-3); color: #C9D3CE; }
.top-ph { width: 56px; height: 40px; flex: none; border-radius: 10px; background: radial-gradient(circle at 30% 30%, #C98A3D, #6B3E17 70%) center / cover; display: grid; place-items: center; font-weight: 800; color: rgba(255,255,255,.85); }
.top-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.top-t strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* produção do dia */
.prod-row { display: flex; flex-direction: column; gap: 8px; padding: 11px 0; color: var(--fg); border-bottom: 1px solid var(--line); }
.prod-row:last-child { border-bottom: 0; }
.prod-top, .prod-bot { display: flex; align-items: center; gap: 12px; min-width: 0; }
.prod-top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-top .tag { max-width: 55%; overflow: hidden; text-overflow: ellipsis; display: block; }
.prod-bot .meter { flex: 1; }
.prod-bot .small { white-space: nowrap; }
.meter { display: block; height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.meter.warn span { background: var(--warn); } .meter.info span { background: var(--info); } .meter.danger span { background: var(--danger); }
/* acesso rápido e banner */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.quick a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 96px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--fg); text-align: center; font-size: .88rem; }
.quick a .i { width: 28px; height: 28px; color: var(--fg); }
.quick a small { color: var(--muted); margin-top: -4px; }
.quick a:hover { border-color: rgba(124,196,33,.45); }
.quick a.first { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.quick a.first .i, .quick a.first small { color: var(--green); }
.banner { display: flex; align-items: center; gap: 20px; background: radial-gradient(120% 140% at 100% 0%, rgba(201,138,61,.45), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(124,196,33,.12), transparent 60%), var(--surface) !important; }
.banner img { border-radius: 18px; flex: none; }
@media (max-width: 860px) { .dash-head h1 { font-size: 1.4rem; } .head-card { flex: 1; } .kpi .v { font-size: 1.35rem; } .donut { width: 160px; height: 160px; } }
@media (max-width: 860px) {
  .topbar .spacer { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; } .kpi-ico { display: none; } .kpi .v { font-size: 1.2rem; }
  .head-card { padding: 8px 12px; }
}

/* ---- Lojas (dono do sistema): modelos de negócio e módulos */
.store-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.store-row:last-child { border-bottom: 0; }
.store-main { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 6px; }
.store-main .tag { margin-left: 6px; }
.mod-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-mod { font-size: .72rem; padding: 2px 8px; border-radius: 999px; border: 1px dashed var(--line); color: #6F7F77; }
.chip-mod.on { border-style: solid; border-color: rgba(124,196,33,.45); color: var(--green); background: var(--green-dim); }
.mod-form { width: min(420px, 90vw); gap: 8px !important; padding: 12px !important; }
.mod-form .opt { align-items: flex-start; }
.seg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.seg { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; margin: 0; color: var(--fg); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg:has(input:checked) { border-color: var(--green); background: var(--green-dim); box-shadow: 0 0 0 1px var(--green); }
.seg:has(input:focus-visible) { outline: 2px solid var(--green); }
.seg-ico { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; color: var(--green); background: var(--green-dim); }
.seg-t { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.seg-mods { font-size: .7rem; color: #6F7F77; margin-top: 4px; }
.seg { font-size: .9rem; font-weight: 400; text-align: left; }
.seg-t strong { font-size: .95rem; }
.seg-t .small { font-size: .78rem; font-weight: 400; }
