/* ===== Deck Burger - identidade: laranja da marca sobre fundo escuro =====
   O tema escuro e o padrao; :root[data-theme="claro"] troca os tokens. */
:root {
  color-scheme: dark;
  --bg: #15120f;
  --panel: #1f1a15;
  --panel-2: #2a2219;
  --ink: #f6efe6;
  --muted: #a39585;
  --line: #352c23;
  --brand: #f28c1c;
  --brand-strong: #ff9d2e;
  --brand-ink: #1b1206;
  --brand-soft: #2e2113;
  --side: #110e0b;
  --side-ink: #c6b8a8;
  --side-group: #7d6e5f;
  --ok: #3ec98a;
  --ok-bg: #16301f;
  --warn: #f0a92b;
  --warn-bg: #33250f;
  --bad: #f2615d;
  --bad-bg: #371817;
  --info-bg: #1d2a38;
  --info-ink: #8fc2f0;
  --field: #1a1611;
  --row-hover: #251e18;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --head: "Bahnschrift", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
}
:root[data-theme="claro"] {
  color-scheme: light;
  --bg: #f5f2ed;
  --panel: #ffffff;
  --panel-2: #faf7f2;
  --ink: #241d16;
  --muted: #6d6054;
  --line: #e4ddd2;
  --brand: #d9770a;
  --brand-strong: #bf6708;
  --brand-ink: #ffffff;
  --brand-soft: #fdf0e0;
  --side: #17120d;
  --side-ink: #cbbdad;
  --side-group: #857666;
  --ok: #1a8a54;
  --ok-bg: #e4f5ec;
  --warn: #a2650c;
  --warn-bg: #fdf1dc;
  --bad: #c5332f;
  --bad-bg: #fdeae9;
  --info-bg: #e8f0f8;
  --info-ink: #1d4d7c;
  --field: #ffffff;
  --row-hover: #faf7f2;
  --shadow: 0 1px 2px rgba(36, 29, 22, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { padding: 18px 16px 14px; color: #fff; font-weight: 700; font-size: 16px; display: flex; gap: 10px; align-items: center; }
.brand small { display: block; font-weight: 400; color: var(--side-group); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.nav { padding: 6px 10px; flex: 1; }
.nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--side-group); padding: 14px 10px 6px; font-weight: 600; }
.nav a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--side-ink); font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.nav .ico { width: 20px; text-align: center; }
.userbox { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 16px; font-size: 13px; }
.userbox b { color: #fff; display: block; }
.userbox .links { display: flex; gap: 12px; margin-top: 8px; }
.userbox button { background: none; border: 0; color: var(--brand-strong); padding: 0; cursor: pointer; font: inherit; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 19px; flex: 1; }
.menu-btn { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; padding: 4px 8px; color: var(--ink); }
.view { padding: 22px 24px 60px; max-width: 1280px; }
.backdrop { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 20; }
  .menu-btn { display: block; }
  .topbar { padding: 10px 16px; }
  .view { padding: 16px 16px 60px; }
}

/* ---------- componentes ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { flex: 1; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { font-size: 24px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi.bad .value { color: var(--bad); }
.kpi.ok .value { color: var(--ok); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; padding: 8px 14px; font: 500 14px/1.2 inherit; font-family: inherit; cursor: pointer; white-space: nowrap; min-height: 38px; }
.btn:hover { background: var(--panel-2); border-color: var(--brand); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 9px; min-height: 30px; font-size: 13px; }
.btn.lg { padding: 12px 20px; font-size: 16px; min-height: 48px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info-ink); }

.alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid; }
.alert.info { background: var(--info-bg); border-color: var(--info-ink); color: var(--ink); }
.alert.warn { background: var(--warn-bg); border-color: var(--warn); color: var(--ink); }
.alert.bad { background: var(--bad-bg); border-color: var(--bad); color: var(--ink); }
.alert.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ink); }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--row-hover); }
tr.row-bad td { background: var(--bad-bg); }
tr.row-warn td { background: var(--warn-bg); }
tr.row-ok td { background: var(--ok-bg); }
tr.cat-row td { background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
td.pos { color: var(--ok); font-weight: 600; }
td.neg { color: var(--bad); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
td input.qty { width: 90px; text-align: right; }
@media (max-width: 600px) {
  th, td { padding: 8px 6px; }
  th { white-space: normal; font-size: 11px; }
  td input.qty { width: 68px; }
  .card { padding: 14px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .kpi .value { font-size: 20px; }
}

/* ---------- formulários ---------- */
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--muted); }
input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--field); width: 100%; min-height: 38px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; vertical-align: middle; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filters label.field { margin: 0; min-width: 150px; flex: 1; max-width: 240px; }
.line-items .line { display: grid; grid-template-columns: 1fr 120px 120px 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.line-items .line.no-cost { grid-template-columns: 1fr 120px 40px; }
@media (max-width: 600px) {
  .line-items .line, .line-items .line.no-cost { grid-template-columns: 1fr 90px 40px; }
  .line-items .line .cost { grid-column: 1 / 3; }
}

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font: 600 14px inherit; font-family: inherit; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }

.type-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.type-pick button { border: 2px solid var(--line); color: var(--ink); background: var(--panel); border-radius: 10px; padding: 14px 10px; font: 600 15px inherit; font-family: inherit; cursor: pointer; }
.type-pick button .e { display: block; font-size: 24px; margin-bottom: 4px; }
.type-pick button.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

.freezer-cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.freezer-card { cursor: pointer; transition: border-color .15s; margin: 0; }
.freezer-card:hover { border-color: var(--brand); }
.freezer-card .title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.steps { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.steps span { padding: 6px 12px; border-radius: 99px; background: var(--panel-2); font-size: 13px; font-weight: 600; color: var(--muted); }
.steps span.done { background: var(--ok-bg); color: var(--ok); }
.steps span.now { background: var(--brand); color: var(--brand-ink); }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 50% -10%, #3a2410, #110e0b 70%); }
.auth .card { width: 100%; max-width: 400px; padding: 28px; }
.auth h1 { font-size: 22px; margin-bottom: 4px; }
.auth .sub { color: var(--muted); margin-bottom: 20px; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: var(--panel); border-radius: 12px; width: 100%; max-width: 560px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { max-width: 980px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; }
.modal-body { padding: 18px 20px; }
.modal-body .table-wrap { margin: 0 -20px; padding: 0 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); padding: 12px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 420px; animation: pop .2s; }
.toast.err { background: var(--bad); color: #fff; border-color: var(--bad); }
.toast.ok { background: var(--ok); color: #09210f; border-color: var(--ok); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
pre.msg { white-space: pre-wrap; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font: 13px/1.5 ui-monospace, Consolas, monospace; margin: 0; }
ol.howto { padding-left: 20px; margin: 0 0 14px; }
ol.howto li { margin-bottom: 6px; }
code { background: var(--brand-soft); color: var(--brand); padding: 1px 5px; border-radius: 4px; font-size: 13px; }


/* ---------- identidade e componentes novos ---------- */
h1, h2, .kpi .value, .brand .name { font-family: var(--head); letter-spacing: .01em; }
h1 { text-transform: uppercase; }
.topbar h1 { font-size: 21px; font-weight: 700; }
.brand .name { font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; line-height: 1.1; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 19px; flex: none; }
.kpi { border-left: 3px solid var(--line); }
.kpi.bad { border-left-color: var(--bad); }
.kpi.ok { border-left-color: var(--ok); }
.kpi.accent { border-left-color: var(--brand); }
.kpi .value { font-size: 27px; }

/* barra saldo x minimo */
.gauge { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin-top: 5px; min-width: 70px; }
.gauge i { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.gauge.warn i { background: var(--warn); }
.gauge.bad i { background: var(--bad); }

/* menu de acoes */
.menu-wrap { position: relative; display: inline-block; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 4px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35); padding: 6px; z-index: 20; min-width: 175px; display: grid; gap: 2px; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--ink); font: inherit; padding: 8px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap; min-height: 0; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--brand-soft); color: var(--brand); }

td .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
td.prod { min-width: 190px; max-width: 320px; }
td.prod b { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
td.acts .btn.sm { padding: 5px 8px; }
td.prod b { display: block; }

/* tabela vira cartoes no celular */
@media (max-width: 760px) {
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards thead { display: none; }
  table.cards tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 10px 12px; background: var(--panel); }
  table.cards td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; text-align: right; }
  table.cards td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
  table.cards td.prod, table.cards td.acts { display: block; text-align: left; }
  table.cards td.prod::before, table.cards td.acts::before { content: none; }
  table.cards td.acts { margin-top: 8px; }
}

.neg { color: var(--bad); font-weight: 600; }
.pos { color: var(--ok); font-weight: 600; }

/* Design system — Deck / gestão da operação */
:root {
  --bg: #111315; --panel: #1a1d20; --panel-2: #22262a;
  --ink: #f2f3f4; --muted: #a3a9b0; --line: #30353b;
  --brand: #f29a48; --brand-strong: #ffb168; --brand-ink: #201307;
  --brand-soft: #35291e; --side: #151719; --side-ink: #b9bec5; --side-group: #9299a2;
  --ok: #71d6a7; --ok-bg: #18372a; --warn: #efbd6a; --warn-bg: #382e1c;
  --bad: #ff938d; --bad-bg: #3a2426; --info-bg: #203345; --info-ink: #a0c8ed;
  --field: #171a1d; --row-hover: #23272c; --radius: 16px;
  --shadow: 0 3px 12px rgb(0 0 0 / 8%); --head: 'Segoe UI', system-ui, sans-serif;
}
:root[data-theme="claro"] {
  --bg: #f5f6f8; --panel: #fff; --panel-2: #f4f6f8;
  --ink: #202832; --muted: #626d7b; --line: #e3e7ed;
  --brand: #ad4b12; --brand-strong: #903b0a; --brand-ink: #fff; --brand-soft: #fff1e6;
  --side: #fff; --side-ink: #576170; --side-group: #6d7785;
  --ok: #16794d; --ok-bg: #e8f5ee; --warn: #8e5c0d; --warn-bg: #fff5df;
  --bad: #bb3b3c; --bad-bg: #fff0ef; --info-bg: #edf4fc; --info-ink: #376693;
  --field: #fff; --row-hover: #f8f9fb; --shadow: 0 3px 12px rgb(25 40 60 / 3%);
}
body { font-size: 14px; line-height: 1.55; letter-spacing: -.01em; }
button, input, select, textarea { font-family: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
[hidden] { display: none !important; }
.icon { width: 21px; height: 21px; flex: none; vertical-align: middle; }
h1, h2, h3 { text-transform: none; letter-spacing: -.025em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-weight: 650; }
.small { font-size: 12px; }
.app { grid-template-columns: 256px minmax(0, 1fr); }
.sidebar { border-right: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.brand { padding: 30px 22px 26px; gap: 12px; color: var(--ink); }
.brand > div { min-width: 0; }
.brand .mark { width: 40px; height: 40px; border-radius: 12px; background: #f29a48; color: #271b10; }
.brand .mark .icon { width: 24px; height: 24px; }
.brand .name { display: block; font-size: 17px; font-weight: 750; text-transform: none; letter-spacing: -.03em; overflow-wrap: anywhere; }
.brand small { margin-top: 5px; font-size: 10px; letter-spacing: .11em; color: var(--muted); }
.nav { padding: 0 14px 22px; }
.nav .group { padding: 23px 13px 9px; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.nav .group:first-child { padding-top: 5px; }
.nav a { padding: 10px 12px; margin: 3px 0; border-radius: 9px; gap: 12px; font-size: 13px; min-height: 42px; position: relative; }
.nav a:hover { background: var(--panel-2); color: var(--ink); }
.nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.nav a.active::after { content: ''; position: absolute; right: 10px; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.nav .ico { display: flex; width: 20px; }
.nav .icon { width: 19px; height: 19px; }
.userbox { padding: 18px; border-color: var(--line); font-size: 11px; }
.user-profile { display: flex; gap: 11px; align-items: center; }
.user-profile > div { min-width: 0; }
.userbox b { color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.user-profile span { color: var(--muted); }
.user-profile .avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 50%; background: var(--panel-2); color: var(--ink); font-size: 14px; font-weight: 700; }
.userbox .links { margin-top: 15px; gap: 7px; }
.userbox button { color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; font-size: 11px; }
.userbox button:hover { background: var(--panel-2); color: var(--ink); }
.topbar { height: 70px; padding: 0 36px; border-bottom: 1px solid var(--line); gap: 15px; background: var(--panel); }
.breadcrumb { display: flex; gap: 14px; align-items: center; min-width: 0; font-size: 12px; color: var(--muted); }
.breadcrumb strong { color: var(--ink); font-weight: 500; }
.breadcrumb-divider { opacity: .45; }
.topbar-date { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
#main-content { max-width: 1660px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 35px 36px 28px; }
.eyebrow { display: block; color: var(--brand); font-weight: 700; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 8px; }
.page-heading h1 { font-size: clamp(25px, 2.5vw, 34px); line-height: 1.25; font-weight: 700; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.heading-action { flex: none; }
.view { max-width: none; padding: 0 36px 54px; }
.card { padding: 22px; border-radius: var(--radius); margin-bottom: 22px; box-shadow: var(--shadow); }
.card-head { gap: 12px; margin-bottom: 20px; }
.grid { gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid > * { min-width: 0; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.kpi { border: 1px solid var(--line); padding: 22px 20px; position: relative; overflow: hidden; border-radius: 14px; }
.kpi::before { content: ''; display: block; width: 24px; height: 3px; background: var(--muted); border-radius: 4px; margin-bottom: 17px; opacity: .5; }
.kpi.accent { background: var(--brand-soft); border-color: var(--brand-soft); }
.kpi.accent::before { background: var(--brand); opacity: 1; }
.kpi.bad, .kpi.ok { border-color: var(--line); }
.kpi.bad::before { background: var(--bad); opacity: 1; }
.kpi.ok::before { background: var(--ok); opacity: 1; }
.kpi .label { font-size: 12px; font-weight: 500; }
.kpi .value { font-size: clamp(23px, 2vw, 30px); line-height: 1.3; letter-spacing: -.045em; margin: 8px 0; overflow-wrap: anywhere; }
.kpi .small { font-size: 11px; }
.btn { min-height: 40px; gap: 8px; padding: 9px 14px; font-size: 12px; font-weight: 600; line-height: 1.3; border-radius: 9px; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { box-shadow: 0 2px 5px rgb(0 0 0 / 6%); }
.btn.primary { box-shadow: 0 3px 8px rgb(174 84 19 / 12%); }
.btn .icon { width: 17px; height: 17px; }
.btn.sm { min-height: 32px; font-size: 11px; padding: 6px 10px; border-radius: 7px; }
.btn.lg { min-height: 46px; font-size: 13px; }
.btn:disabled { cursor: not-allowed; }
.btn.danger { color: var(--bg); }
:root[data-theme="claro"] .btn.danger { color: white; }
.badge { font-size: 10px; font-weight: 600; padding: 4px 9px; line-height: 1.5; letter-spacing: .01em; }
.alert { border-width: 0; border-left: 3px solid; border-radius: 10px; padding: 13px 16px; font-size: 12px; }
.alert a { font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.table-wrap { margin: 0 -22px; padding: 0 22px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
table { font-size: 12px; }
th { font-size: 10px; letter-spacing: .06em; font-weight: 650; padding: 12px; background: var(--panel-2); }
th:first-child { border-radius: 6px 0 0 6px; }
th:last-child { border-radius: 0 6px 6px 0; }
td { padding: 15px 12px; }
td.prod { min-width: 175px; }
td .sub { font-size: 11px; margin-top: 4px; }
td.prod b { font-weight: 600; }
tfoot td { background: var(--panel-2); border-top: 1px solid var(--line); }
.empty { padding: 38px 18px; color: var(--muted); font-size: 12px; }
.field > span, label.field > span { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
label.field { margin-bottom: 17px; }
input, select, textarea { min-height: 42px; border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.4; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
input[readonly], input:disabled { background: var(--panel-2); }
.check { font-size: 12px; }
.form-grid { gap: 0 18px; }
.filters { gap: 12px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.filters label.field { max-width: 290px; }
.tabs { border: 0; padding: 5px; background: var(--panel-2); border-radius: 10px; gap: 4px; margin-bottom: 24px; }
.tabs button { font-family: inherit; font-size: 12px; line-height: 1.4; font-weight: 600; white-space: nowrap; border: 0; border-radius: 7px; padding: 9px 15px; }
.tabs button.active { color: var(--brand); background: var(--panel); box-shadow: var(--shadow); }
.type-pick { gap: 12px; }
.type-pick button { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); padding: 15px 12px; border-radius: 11px; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.4; transition: border-color .15s, background .15s; }
.type-pick button:hover { border-color: var(--brand); background: var(--brand-soft); }
.type-pick button .e { font-size: 19px; margin: 0; }
.freezer-cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 15px; }
.freezer-card { color: var(--ink); padding: 21px; }
.freezer-card .title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.freezer-card:hover { background: var(--row-hover); }
.freezer-card .small { display: block; margin-top: 10px; }
.steps { gap: 9px; margin-bottom: 22px; }
.steps span { font-size: 11px; padding: 7px 13px; }
.gauge { height: 5px; margin-top: 8px; }
.menu-pop { padding: 7px; box-shadow: 0 12px 36px rgb(0 0 0 / 18%); }
.menu-pop a, .menu-pop button { font-size: 12px; padding: 10px; }
.modal-bg { background: rgb(6 12 20 / 65%); backdrop-filter: blur(5px); padding: 5vh 20px; }
.modal { border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 80px rgb(0 0 0 / 24%); }
.modal-head { padding: 18px 24px; }
.modal-body { padding: 24px; }
.modal-body .table-wrap { margin: 0 -24px; padding: 0 24px; }
.modal-foot { padding: 17px 24px; background: var(--panel-2); border-radius: 0 0 18px 18px; }
.toast { padding: 14px 18px; font-size: 13px; border-radius: 12px; box-shadow: 0 12px 30px rgb(0 0 0 / 18%); }
.toast.err { color: var(--bg); }
:root[data-theme="claro"] .toast.err { color: white; }
.loading-state { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 13px; color: var(--muted); }
.empty-state { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 25px 15px; color: var(--muted); }
.empty-state > .icon { width: 30px; height: 30px; margin-bottom: 6px; opacity: .7; }
.empty-state b { color: var(--ink); font-size: 12px; font-weight: 550; }
.empty-state span { font-size: 11px; }
.type-pick .icon, .freezer-card .title .icon { color: var(--brand); }
.loading-spinner { width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: loading-turn .8s linear infinite; }
@keyframes loading-turn { to { transform: rotate(360deg); } }
.auth { background: var(--bg); grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 60px; padding: 28px; }
.auth-intro { align-self: stretch; width: 100%; padding: clamp(30px, 5vw, 80px); border: 1px solid #34302a; border-radius: 24px; background: radial-gradient(ellipse at 95% 100%, #47301c 0, transparent 60%), #191c1f; color: #f7f4ef; display: flex; flex-direction: column; justify-content: space-between; min-height: calc(100vh - 56px); }
.auth-brand { display: flex; gap: 12px; align-items: center; font-size: 20px; font-weight: 700; color: #f7f4ef; letter-spacing: -.03em; }
.auth-brand .icon { color: #f29a48; width: 30px; height: 30px; }
.auth-pitch { padding: 65px 0; }
.auth-pitch .eyebrow { color: #f29a48; }
.auth-pitch h2 { font-size: clamp(32px, 4vw, 58px); font-weight: 650; line-height: 1.13; letter-spacing: -.05em; margin: 20px 0; }
.auth-pitch p { color: #b6b7b8; max-width: 340px; font-size: 15px; line-height: 1.8; }
.auth-footnote { font-size: 11px; color: #a6a4a1; }
.auth-illustration { display: flex; gap: 12px; margin-top: 40px; }
.auth-illustration > div { display: flex; flex-direction: column; gap: 14px; width: 100px; padding: 18px; background: rgb(255 255 255 / 3%); border: 1px solid rgb(255 255 255 / 12%); border-radius: 12px; }
.auth-illustration .icon { color: #f29a48; }
.auth-illustration span { color: #c3c1be; font-size: 11px; }
.auth > .card { background: transparent; box-shadow: none; border: 0; border-radius: 0; padding: 30px 24px 30px 0; width: 100%; max-width: 410px; margin: 0 auto; }
.auth h1 { font-size: 29px; font-weight: 700; margin: 12px 0; line-height: 1.2; }
.auth .sub { font-size: 13px; margin-bottom: 32px; }
.auth input { min-height: 48px; }
.auth .btn.lg { margin-top: 8px; min-height: 48px; }
.auth form + p { line-height: 1.7; padding-top: 12px; }
@media (min-width: 1500px) { .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
  .app { grid-template-columns: 230px minmax(0, 1fr); }
  .brand { padding-left: 18px; padding-right: 18px; }
  .topbar { padding: 0 25px; }
  .page-heading { padding: 28px 25px 24px; }
  .view { padding: 0 25px 40px; }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .auth { gap: 30px; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { width: 272px; z-index: 30; }
  .topbar { height: 60px; padding: 0 20px; }
  .menu-btn { display: grid; place-items: center; min-width: 38px; min-height: 38px; border-radius: 8px; }
  .menu-btn:hover { background: var(--panel-2); }
  .page-heading { padding: 26px 22px; }
  .view { padding: 0 22px 36px; }
  .auth { gap: 25px; padding: 20px; }
  .auth-intro { padding: 30px; min-height: calc(100vh - 40px); }
  .auth-illustration { gap: 7px; }
  .auth-illustration > div { width: 80px; padding: 12px; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 12px; gap: 9px; }
  .breadcrumb { gap: 8px; font-size: 11px; }
  .breadcrumb > span:first-child { display: none; }
  .breadcrumb-divider { display: none; }
  .topbar-date { font-size: 10px; }
  .page-heading { padding: 23px 16px; display: block; }
  .page-heading h1 { font-size: 27px; }
  .page-heading p { font-size: 12px; max-width: 320px; }
  .heading-action { margin-top: 17px; }
  .view { padding: 0 16px 30px; }
  .card { padding: 17px; border-radius: 12px; margin-bottom: 17px; }
  .card-head { margin-bottom: 16px; }
  .table-wrap { margin: 0 -17px; padding: 0 17px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 16px 13px; border-radius: 12px; }
  .kpi .value { font-size: 23px; }
  .kpi .label { font-size: 11px; }
  .kpi .small { font-size: 10px; }
  .kpi::before { margin-bottom: 12px; }
  .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .type-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .type-pick button { padding: 13px 8px; font-size: 11px; }
  .filters label.field { min-width: 125px; max-width: none; }
  .filters .btns { width: 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .freezer-cards { grid-template-columns: minmax(0, 1fr); }
  .freezer-card { padding: 18px; }
  td.prod { min-width: 0; }
  td.prod b { white-space: normal; overflow-wrap: anywhere; }
  td.acts { white-space: normal; }
  td.acts .btn { margin-bottom: 4px; }
  table.cards tr { border-radius: 10px; padding: 13px; }
  table.cards td { padding: 5px 0; }
  table.cards td::before { font-size: 10px; }
  table.cards td.prod { margin-bottom: 7px; }
  table.cards td.prod b { font-size: 13px; }
  table.cards tfoot { display: block; width: 100%; }
  table.cards tfoot tr { width: 100%; background: var(--panel-2); }
  table.cards tfoot td { background: transparent; }
  .btn, .btn.sm { min-height: 40px; }
  input, select, textarea { font-size: 16px; }
  .modal-bg { padding: 16px 10px; }
  .modal { border-radius: 14px; }
  .modal-head, .modal-body, .modal-foot { padding: 16px; }
  .modal-body .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .modal-foot { flex-wrap: wrap; }
  .line-items .line, .line-items .line.no-cost { grid-template-columns: minmax(0, 1fr) 75px 36px; gap: 6px; }
  .auth { display: flex; flex-direction: column; padding: 0; gap: 0; align-items: stretch; justify-content: flex-start; }
  .auth-intro { min-height: auto; border-radius: 0; padding: 24px; border: 0; }
  .auth-brand { font-size: 18px; }
  .auth-pitch { padding: 25px 0 0; }
  .auth-pitch h2 { font-size: 30px; margin: 12px 0 0; }
  .auth-pitch p, .auth-illustration, .auth-footnote, .auth-pitch .eyebrow { display: none; }
  .auth > .card { padding: 32px 24px; max-width: 460px; }
  .auth h1 { font-size: 25px; }
  .auth .sub { margin-bottom: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Business overview — local BeeFood data, with explicit coverage context. */
.business-dashboard { --chart-grid: var(--line); }
.business-dashboard .card { margin: 0; padding: 24px; }
.dashboard-toolbar { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.period-presets { display: flex; padding: 4px; gap: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.period-chip { border: 0; border-radius: 6px; background: transparent; color: var(--muted); padding: 8px 13px; font-size: 12px; font-weight: 600; cursor: pointer; }
.period-chip.selected { color: var(--brand); background: var(--brand-soft); }
.period-chip:hover { color: var(--ink); }
.dashboard-date-fields { display: flex; gap: 9px; align-items: end; flex-wrap: wrap; }
.dashboard-date-fields label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 600; }
.dashboard-date-fields input, .dashboard-date-fields select { min-height: 37px; padding: 7px 9px; font-size: 12px; width: 140px; }
.dashboard-date-fields select { width: 160px; }
.dashboard-date-fields .btn { min-height: 37px; }
.data-context { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 16px; font-size: 10px; color: var(--muted); margin-bottom: 22px; }
.source-tag { display: inline-flex; gap: 7px; align-items: center; color: var(--ink); font-weight: 600; }
.source-tag i { width: 6px; height: 6px; background: var(--brand); border-radius: 50%; }
.business-kpis { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.1fr; gap: 15px; margin-bottom: 22px; }
.business-kpi { padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; min-width: 0; box-shadow: var(--shadow); }
.business-kpi-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; font-weight: 500; }
.business-kpi-head .icon { width: 19px; height: 19px; opacity: .7; }
.business-kpi-value { display: block; font-size: clamp(25px, 2.3vw, 34px); font-weight: 650; letter-spacing: -.05em; line-height: 1.2; margin: 17px 0 13px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.business-kpi-foot { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 28px; }
.business-kpi.featured { background: #f29a48; border-color: #f29a48; color: #241507; box-shadow: 0 6px 18px rgb(193 103 27 / 12%); }
.featured .business-kpi-head { color: #513315; }
.metric-note { font-size: 10px; color: var(--muted); line-height: 1.5; }
.featured .metric-note { color: #553719; }
.metric-change { font-size: 11px; font-weight: 700; padding: 3px 6px; border-radius: 5px; background: rgb(255 255 255 / 40%); }
.metric-change.up { color: #1d5038; }
.metric-change.down { color: #7d291f; }
.business-chart-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); gap: 22px; margin-bottom: 22px; align-items: stretch; }
.chart-heading { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 20px; }
.chart-heading .eyebrow { color: var(--muted); font-size: 9px; margin-bottom: 6px; letter-spacing: .13em; }
.chart-heading h2 { font-size: 17px; font-weight: 650; }
.chart-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.chart-heading > .icon { color: var(--muted); width: 19px; }
.chart-switch { display: inline-flex; border: 1px solid var(--line); padding: 3px; border-radius: 7px; flex: none; }
.chart-switch button { background: transparent; color: var(--muted); border: 0; padding: 5px 10px; font-size: 10px; font-weight: 600; border-radius: 4px; cursor: pointer; }
.chart-switch button.active { background: var(--panel-2); color: var(--ink); }
.chart-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.chart-total strong { font-size: 29px; letter-spacing: -.04em; font-weight: 650; }
.chart-total span { color: var(--muted); font-size: 10px; }
.plot-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin: 13px 0 14px; }
.plot-legend > span { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.plot-legend i { display: inline-block; width: 16px; height: 2px; }
.legend-current { background: #f29a48; }
.legend-previous { border-top: 2px dashed #8f98a7; }
.trend-svg { width: 100%; height: auto; display: block; overflow: visible; }
.plot-grid { stroke: var(--chart-grid); stroke-width: 1; stroke-dasharray: 3 5; }
.plot-label { font-family: inherit; font-size: 11px; fill: var(--muted); }
.plot-missing { fill: var(--muted); font-size: 20px; }
.plot-current { stroke: #f29a48; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; fill: none; }
.plot-previous { stroke: #8f98a7; stroke-width: 2; stroke-dasharray: 6 6; stroke-linejoin: round; fill: none; }
.plot-point { fill: var(--panel); stroke: #f29a48; stroke-width: 2.5; }
.plot-point:hover { fill: #f29a48; r: 6; }
.chart-footnote { color: var(--muted); font-size: 10px; line-height: 1.65; margin: 10px 0 0; }
.chart-data { border-top: 1px solid var(--line); margin-top: 17px; padding-top: 11px; }
.chart-data summary { color: var(--muted); font-size: 11px; cursor: pointer; padding: 4px 0; width: fit-content; }
.chart-data[open] summary { margin-bottom: 14px; }
.channel-chart { display: grid; gap: 24px; }
.channel-donut { width: 154px; height: 154px; border-radius: 50%; padding: 18px; margin: 2px auto 0; }
.channel-donut > div { width: 100%; height: 100%; border-radius: 50%; background: var(--panel); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.channel-donut b { font-size: 28px; font-weight: 600; line-height: 1.2; }
.channel-donut span { color: var(--muted); font-size: 11px; }
.channel-list { display: grid; gap: 13px; }
.channel-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; }
.channel-name { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.channel-name i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.channel-row > b { font-size: 12px; font-weight: 600; }
.channel-row small { grid-column: 1 / -1; padding-left: 15px; font-size: 10px; color: var(--muted); }
.business-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-bottom: 22px; }
.text-link { font-size: 11px; font-weight: 600; white-space: nowrap; }
.product-ranking { display: grid; gap: 17px; }
.ranking-row { display: flex; align-items: start; gap: 13px; }
.ranking-number { display: grid; place-items: center; width: 29px; height: 29px; flex: none; background: var(--panel-2); border-radius: 8px; color: var(--muted); font-size: 10px; }
.ranking-info { flex: 1; min-width: 0; }
.ranking-info > div:first-child { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.ranking-info b { font-weight: 550; }
.ranking-info strong { white-space: nowrap; font-weight: 650; }
.ranking-info > span { font-size: 10px; color: var(--muted); }
.ranking-track { height: 4px; background: var(--panel-2); margin: 7px 0 3px; border-radius: 5px; overflow: hidden; }
.ranking-track i { display: block; height: 100%; background: #f29a48; border-radius: inherit; }
.hour-chart { display: flex; gap: 4px; align-items: end; height: 175px; padding: 10px 0 0; }
.hour-column { flex: 1; min-width: 0; }
.hour-track { height: 135px; display: flex; align-items: end; border-bottom: 1px solid var(--line); }
.hour-track i { width: 100%; background: #789ae8; border-radius: 4px 4px 0 0; transition: opacity .15s; }
.hour-track i:hover { opacity: .7; }
.hour-column > span { display: block; font-size: 9px; color: var(--muted); padding-top: 8px; height: 25px; }
.hour-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 11px; color: var(--muted); }
.hour-values b { color: var(--ink); margin-right: 5px; }
.sales-mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.sales-mini-stats > div { padding: 15px; border-radius: 10px; background: var(--panel-2); }
.sales-mini-stats span { display: block; font-size: 10px; color: var(--muted); }
.sales-mini-stats b { display: block; font-size: 20px; margin-top: 6px; font-weight: 600; }
.dashboard-notes { border: 1px solid var(--line); border-radius: 12px; padding: 17px 20px; display: flex; justify-content: space-between; align-items: center; gap: 25px; margin-bottom: 36px; }
.dashboard-notes > div { display: flex; align-items: start; gap: 12px; }
.dashboard-notes .icon { color: var(--muted); width: 19px; margin-top: 4px; }
.dashboard-notes p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.dashboard-notes b { display: block; color: var(--ink); margin-bottom: 3px; font-size: 11px; }
.coverage-link { flex: 0 0 220px; font-size: 11px; font-weight: 600; }
.coverage-link span { display: block; margin-top: 5px; font-size: 10px; font-weight: 400; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2 { font-size: 20px; }
.section-heading p { color: var(--muted); font-size: 11px; margin: 7px 0 0; }
.section-heading .btn { flex: none; }
.operations-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.operation-tile { display: flex; align-items: start; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); }
.operation-tile:hover { border-color: var(--brand); }
.operation-tile > .icon { color: var(--brand); margin-top: 3px; }
.operation-tile > span { color: var(--muted); font-size: 11px; }
.operation-tile b { display: block; color: var(--ink); font-size: 23px; margin: 8px 0 5px; font-weight: 600; letter-spacing: -.03em; }
.operation-tile small { display: block; font-size: 10px; }
.operations-links { display: flex; gap: 10px 24px; flex-wrap: wrap; margin: 18px 0 28px; }
.operations-links a { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); padding: 5px 0; }
.operations-links a:hover { color: var(--brand); }
.operations-links .icon { width: 16px; height: 16px; }
.operations-bottom { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 2fr); gap: 22px; align-items: start; }
.section-heading.compact h2 { font-size: 16px; }
.operations-bottom .freezer-cards { grid-template-columns: 1fr; }
.insight-empty { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 200px; gap: 9px; padding: 25px; }
.empty-orbit { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; background: var(--panel-2); color: var(--brand); font-size: 23px; margin-bottom: 5px; }
.insight-empty b { font-size: 13px; font-weight: 600; }
.insight-empty p { color: var(--muted); font-size: 11px; margin: 0; max-width: 300px; }
@media (max-width: 1200px) {
  .business-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-chart-grid { grid-template-columns: minmax(0, 1fr); }
  .channel-chart { grid-template-columns: 180px minmax(0, 1fr); align-items: center; }
  .channel-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .operations-grid { gap: 10px; }
  .operation-tile { padding: 16px; gap: 9px; }
  .operation-tile b { font-size: 20px; }
  .operations-bottom { grid-template-columns: minmax(0, 1fr); }
  .operations-bottom .freezer-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .business-dashboard .card { padding: 18px; }
  .dashboard-toolbar { display: block; }
  .period-presets { width: fit-content; margin-bottom: 15px; }
  .dashboard-date-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dashboard-date-fields input, .dashboard-date-fields select { width: 100%; min-width: 0; font-size: 16px; min-height: 42px; }
  .dashboard-date-fields .btn { min-height: 42px; }
  .data-context { font-size: 10px; line-height: 1.6; }
  .business-kpis { gap: 10px; }
  .business-kpi { padding: 16px 13px; border-radius: 12px; }
  .business-kpi-value { font-size: 24px; margin: 13px 0 10px; }
  .business-kpi-head { font-size: 10px; align-items: start; min-height: 30px; }
  .business-kpi-head .icon { width: 15px; height: 15px; }
  .metric-note { font-size: 9px; }
  .business-chart-grid, .business-detail-grid { gap: 16px; margin-bottom: 16px; }
  .chart-heading { flex-wrap: wrap; margin-bottom: 17px; }
  .chart-heading h2 { font-size: 16px; }
  .chart-total strong { font-size: 26px; }
  .trend-svg { min-width: 500px; }
  #sales-plot { overflow-x: auto; margin: 0 -3px; padding: 0 3px; }
  .channel-chart { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .channel-donut { width: 140px; height: 140px; padding: 16px; }
  .channel-list { grid-template-columns: minmax(0, 1fr); }
  .channel-row { grid-template-columns: 1fr auto; }
  .channel-row small { grid-column: 1; }
  .hour-chart { gap: 3px; }
  .hour-values { grid-template-columns: repeat(2, 1fr); }
  .sales-mini-stats { gap: 8px; }
  .sales-mini-stats > div { padding: 12px; }
  .sales-mini-stats b { font-size: 19px; }
  .dashboard-notes { display: block; padding: 15px; margin-bottom: 28px; }
  .coverage-link { display: block; padding: 12px 0 0 31px; }
  .section-heading { flex-wrap: wrap; gap: 12px; }
  .section-heading h2 { font-size: 19px; }
  .operations-grid { grid-template-columns: minmax(0, 1fr); }
  .operation-tile { padding: 17px; gap: 15px; }
  .operations-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .operations-links a { font-size: 10px; }
  .operations-bottom .freezer-cards { grid-template-columns: minmax(0, 1fr); }
  .chart-data .table-wrap { margin: 0 -18px; padding: 0 18px; }
}


/* ====================================================== login futurista */
.auth { position: relative; }
.auth-intro { position: relative; overflow: hidden; isolation: isolate; justify-content: flex-start; }

/* fundo: aurora que respira */
.auth-aurora { position: absolute; inset: -30%; z-index: -2; filter: blur(70px); opacity: .85;
  background:
    radial-gradient(38% 42% at 22% 28%, #f29a48 0, transparent 62%),
    radial-gradient(34% 38% at 78% 18%, #c2612a 0, transparent 60%),
    radial-gradient(45% 45% at 62% 86%, #2f6f8f 0, transparent 58%),
    radial-gradient(40% 40% at 12% 82%, #7a3fa8 0, transparent 60%);
  animation: auroraFlow 26s ease-in-out infinite alternate; }
@keyframes auroraFlow {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1);    opacity: .72; }
  50%  { transform: translate3d(4%, 3%, 0)  scale(1.12);  opacity: .95; }
  100% { transform: translate3d(-2%, 4%, 0) scale(1.05);  opacity: .78; }
}
/* malha técnica por cima */
.auth-grid { position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgb(255 255 255 / 6%) 1px, transparent 1px),
                    linear-gradient(90deg, rgb(255 255 255 / 6%) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(130% 95% at 50% 0, #000 32%, transparent 78%);
  -webkit-mask-image: radial-gradient(130% 95% at 50% 0, #000 32%, transparent 78%); }

.auth-intro { background: #0f1216; border-color: rgb(255 255 255 / 10%); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.auth-brand { gap: 14px; align-items: center; }
.auth-orb { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(145deg, #f29a48, #c2612a); color: #1a1205;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 18%), 0 10px 30px -8px rgb(242 154 72 / 65%);
  animation: orbPulse 4.5s ease-in-out infinite; }
.auth-orb .icon { width: 24px; height: 24px; }
@keyframes orbPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgb(255 255 255 / 18%), 0 10px 30px -8px rgb(242 154 72 / 55%); }
  50%      { box-shadow: 0 0 0 1px rgb(255 255 255 / 28%), 0 14px 44px -6px rgb(242 154 72 / 85%); }
}
.auth-brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.auth-brand-txt b { font-size: 17px; letter-spacing: -.02em; }
.auth-brand-txt small { font-size: 11px; color: #9aa3ad; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }

.auth-live { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #9fe8c0;
  background: rgb(80 220 150 / 10%); border: 1px solid rgb(80 220 150 / 28%); }
.auth-live i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 0 rgb(74 222 128 / 60%); animation: livePing 2.2s ease-out infinite; }
@keyframes livePing {
  0%   { box-shadow: 0 0 0 0 rgb(74 222 128 / 60%); }
  70%  { box-shadow: 0 0 0 8px rgb(74 222 128 / 0%); }
  100% { box-shadow: 0 0 0 0 rgb(74 222 128 / 0%); }
}

.auth-pitch { padding: 54px 0 40px; }
.auth-pitch h2 { background: linear-gradient(100deg, #fff 18%, #f8c89a 62%, #f29a48 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-pitch p { max-width: 400px; }

.auth-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 34px; max-width: 520px; }
.auth-chip { display: flex; flex-direction: column; gap: 7px; padding: 16px 14px; border-radius: 14px;
  background: rgb(255 255 255 / 5%); border: 1px solid rgb(255 255 255 / 11%);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .35s ease, border-color .35s ease, background .35s ease; }
.auth-chip:hover { transform: translateY(-4px); border-color: rgb(242 154 72 / 45%); background: rgb(255 255 255 / 8%); }
.auth-chip .ic { color: #f29a48; }
.auth-chip .ic .icon { width: 20px; height: 20px; }
.auth-chip b { font-size: 13px; color: #f4f2ef; letter-spacing: -.01em; }
.auth-chip small { font-size: 11px; color: #9aa3ad; line-height: 1.45; }

.auth-foot { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-tag { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #8e969f;
  padding: 5px 11px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 10%); background: rgb(255 255 255 / 3%); }

/* cartão do formulário */
.auth-form { position: relative; }
.auth-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .14em; color: var(--accent);
  background: rgb(242 154 72 / 10%); border: 1px solid rgb(242 154 72 / 30%); }
.auth-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.auth-form h1 { margin-top: 18px; }
.auth-form .field input { transition: border-color .25s ease, box-shadow .25s ease, background .25s ease; }
.auth-form .field input:focus { box-shadow: 0 0 0 4px rgb(242 154 72 / 14%); }
.auth-go { position: relative; overflow: hidden; margin-top: 6px; letter-spacing: .02em;
  background: linear-gradient(135deg, #f29a48, #d9752c); border: 0; color: #1a1205;
  box-shadow: 0 12px 30px -12px rgb(242 154 72 / 80%); }
.auth-go:hover { filter: brightness(1.06); }
.auth-go .shine { position: absolute; top: 0; left: -120%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 45%), transparent);
  animation: shineRun 3.6s ease-in-out infinite; }
@keyframes shineRun { 0%, 62% { left: -120%; } 100% { left: 130%; } }
.auth-note { margin-top: 18px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }

@media (max-width: 900px) {
  .auth-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .auth-chip { padding: 12px 10px; }
  .auth-chip small { display: none; }
  .auth-pitch { padding: 32px 0 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-aurora, .auth-orb, .auth-live i, .auth-go .shine { animation: none; }
}
:root[data-theme="claro"] .auth-intro { background: #11151a; }

/* Minimal login. Scoped independently from setup and the application theme. */
.login-page { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 32px 24px; background: #101214; color: #eef0f2; color-scheme: dark; }
.login-panel { width: 100%; max-width: 360px; padding: 0; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 44px; }
.login-mark { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #40342a; border-radius: 14px; color: #f0a25b; background: #201c18; }
.login-mark .icon { width: 25px; height: 25px; stroke-width: 1.5; }
.login-brand h1 { color: #eef0f2; margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -.035em; text-align: center; overflow-wrap: anywhere; text-transform: none; }
.login-panel label.field { margin-bottom: 22px; }
.login-panel label.field > span { color: #b7bcc4; font-size: 13px; font-weight: 500; margin-bottom: 9px; }
.login-panel input { width: 100%; min-height: 50px; padding: 12px 14px; background: #191c20; border: 1px solid #343940; border-radius: 9px; color: #eef0f2; font-size: 16px; box-shadow: none; }
.login-panel input:hover { border-color: #515861; }
.login-panel input:focus { outline: none; border-color: #d99b61; box-shadow: 0 0 0 3px rgb(217 155 97 / 10%); }
.login-panel .login-submit { width: 100%; min-height: 50px; display: flex; justify-content: center; gap: 12px; margin-top: 10px; border: 1px solid #ed9b50; border-radius: 9px; background: #ed9b50; color: #211509; font-size: 14px; font-weight: 650; box-shadow: none; }
.login-panel .login-submit:hover { background: #f4ad6b; border-color: #f4ad6b; box-shadow: none; }
.login-panel .login-submit:focus-visible { outline: 3px solid #f7bf8d; outline-offset: 4px; }
.login-submit > span { font-size: 19px; line-height: 1; }
.login-panel .alert { background: #30261c; color: #f1cfa9; border-color: #d99b61; font-size: 13px; margin-bottom: 24px; }
@media (max-width: 480px) { .login-page { padding: 32px 28px; } .login-brand { margin-bottom: 36px; } }
@media (max-height: 560px) { .login-page { place-items: start center; } .login-brand { margin-bottom: 24px; gap: 10px; } }
