/* Salgado Certo — identidade quente e acolhedora, mobile-first. Modo claro. */
:root {
  --primary: #D97732;
  --primary-dark: #B85E22;
  --primary-soft: #FBE7D6;
  --accent: #E8AC45;
  --accent-soft: #FBEFD6;
  --cream: #FFF8ED;
  --espresso: #493327;
  --good: #3F8B66;
  --good-soft: #E3F1E9;
  --bad: #C8554D;
  --bad-soft: #F8E3E1;
  --warn: #B7791F;
  --warn-soft: #FCF1DC;
  --bg: #FFF8ED;
  --surface: #FFFFFF;
  --text: #3B2A20;
  --muted: #8C7666;
  --line: #F0E3D1;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(73, 51, 39, .05), 0 6px 20px rgba(73, 51, 39, .07);
  --shadow-lg: 0 10px 40px rgba(73, 51, 39, .18);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 66px;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary-dark); }
img { max-width: 100%; }
h1, h2, h3 { color: var(--espresso); margin: 0; line-height: 1.2; }
h1 { font-size: 1.5rem; font-weight: 750; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- estrutura ---------- */
.shell { min-height: 100vh; display: flex; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: rgba(255, 248, 237, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.topbar .brand b { font-size: 1.05rem; color: var(--espresso); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 36px; height: 36px; border-radius: 11px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; overflow: hidden; font-weight: 800; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo:has(img) { background: transparent; border-radius: 50%; width: 44px; height: 44px; }
.logo:has(img) img { object-fit: contain; }
.content { max-width: 1120px; margin: 0 auto; padding: 8px 16px 24px; }
.page-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; }
.page-head h1 { flex: 1; min-width: 0; }
.back { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; flex: none; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(73, 51, 39, .06);
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: .74rem; font-weight: 600; }
.bottomnav a.active { color: var(--primary-dark); }
.bottomnav a.active .ico-wrap { background: var(--primary-soft); }
.ico-wrap { width: 48px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .2s; }

@media (min-width: 960px) {
  .bottomnav { display: none; }
  .main { padding-bottom: 40px; }
  .sidebar {
    display: flex; flex-direction: column; gap: 4px; width: 248px; flex: none; position: sticky; top: 0; height: 100vh;
    padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto;
  }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
  .sidebar .brand b { color: var(--espresso); }
  .sidebar a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 550; }
  .sidebar a:hover { background: var(--cream); }
  .sidebar a.active { background: var(--primary-soft); color: var(--primary-dark); }
  .sidebar .sep { height: 1px; background: var(--line); margin: 10px 6px; }
  .sidebar .side-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 6px 12px 2px; }
  .topbar .brand { visibility: hidden; }
  .content { padding: 8px 28px 32px; }
}

/* ---------- cartões ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card, .stack > * + * { margin-top: 12px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-title h2, .card-title h3 { display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .md-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .lg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.section { margin-top: 22px; }
.section > h2 { margin-bottom: 10px; }

.kpi { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 14px 12px; min-width: 0; }
.kpi .label { font-size: .82rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 1.45rem; font-weight: 780; color: var(--espresso); margin-top: 4px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .sub { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.kpi.hero { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.kpi.hero .label, .kpi.hero .sub { color: rgba(255, 255, 255, .88); }
.kpi.hero .value { color: #fff; font-size: 1.9rem; }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 650; background: var(--cream); color: var(--espresso); white-space: nowrap; }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.primary { background: var(--primary-soft); color: var(--primary-dark); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px;
  border-radius: 14px; border: 0; cursor: pointer; font-weight: 700; font-size: 1rem; text-decoration: none;
  background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(217, 119, 50, .28); transition: transform .08s, filter .15s, opacity .15s;
  user-select: none;
}
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(1.04); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.lg { min-height: 58px; font-size: 1.08rem; border-radius: 16px; }
.btn.secondary { background: var(--surface); color: var(--espresso); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.soft { background: var(--primary-soft); color: var(--primary-dark); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--primary-dark); box-shadow: none; padding: 0 12px; }
.btn.danger { background: var(--bad); box-shadow: 0 4px 14px rgba(200, 85, 77, .25); }
.btn.good { background: var(--good); box-shadow: 0 4px 14px rgba(63, 139, 102, .25); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: .9rem; border-radius: 12px; }
.icon-btn { width: 44px; height: 44px; border-radius: 13px; border: 0; background: var(--cream); display: grid; place-items: center; cursor: pointer; color: var(--espresso); flex: none; }
.icon-btn:active { transform: scale(.95); }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.secondary .spinner, .btn.soft .spinner { border-color: rgba(73, 51, 39, .2); border-top-color: var(--espresso); }
@keyframes spin { to { transform: rotate(360deg); } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions > .btn { flex: 1 1 140px; }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick a, .quick button {
  display: flex; border: 0; cursor: pointer; font-family: inherit; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; border-radius: var(--radius);
  text-decoration: none; font-weight: 700; color: #fff; text-align: center; padding: 10px 6px; font-size: .95rem; box-shadow: var(--shadow);
  transition: transform .1s;
}
.quick a:active, .quick button:active { transform: scale(.97); }
.quick.two { grid-template-columns: repeat(2, 1fr); }
.quick .q-sale { background: linear-gradient(140deg, var(--primary), var(--primary-dark)); }
.quick .q-prod { background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 82%, #000)); }
.quick .q-buy { background: linear-gradient(140deg, #6B4A38, #493327); }
.quick svg { width: 30px; height: 30px; }

/* ---------- formulários ---------- */
.field { display: block; margin-bottom: 14px; }
.field > .lbl { display: block; font-weight: 650; font-size: .92rem; margin-bottom: 6px; color: var(--espresso); }
.field > .hint { display: block; font-size: .8rem; color: var(--muted); margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 13px; border: 1.5px solid var(--line); background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s; font-size: 1rem;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(217, 119, 50, .15); }
.input.big { font-size: 1.6rem; font-weight: 750; text-align: center; min-height: 64px; }
.input.money { font-variant-numeric: tabular-nums; }
.input-group { display: flex; gap: 8px; }
.input-group > .input { flex: 1; min-width: 0; }
.input-group > select.input { flex: 0 0 96px; }
.invalid { border-color: var(--bad) !important; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 650; cursor: pointer; color: var(--text);
}
.seg button.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; cursor: pointer; }
.switch input { display: none; }
.switch .track { width: 50px; height: 30px; border-radius: 15px; background: #E6D8C6; position: relative; flex: none; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + .track { background: var(--good); }
.switch input:checked + .track::after { transform: translateX(20px); }
details.more { margin: 6px 0 14px; }
details.more > summary { cursor: pointer; color: var(--primary-dark); font-weight: 650; list-style: none; padding: 8px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; }
details.more[open] > summary::before { content: "− "; }

.stepper { display: inline-flex; align-items: center; background: var(--cream); border-radius: 14px; }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 14px; cursor: pointer; display: grid; place-items: center; color: var(--espresso); }
.stepper button:active { background: var(--primary-soft); }
.stepper input { width: 52px; text-align: center; border: 0; background: transparent; font-weight: 750; font-size: 1.05rem; outline: none; }

/* ---------- listas ---------- */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; background: none; width: 100%; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item:active { background: var(--cream); }
.list-item .main-txt { flex: 1; min-width: 0; }
.list-item .main-txt b { display: block; color: var(--espresso); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .main-txt span { display: block; font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .end { text-align: right; flex: none; }
.list-item .end b { display: block; font-variant-numeric: tabular-nums; }
.avatar { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--primary-dark); font-weight: 800; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty .emoji { font-size: 2.6rem; margin-bottom: 6px; }
.empty b { display: block; color: var(--espresso); font-size: 1.05rem; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

.lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lines td { padding: 8px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.lines tr:last-child td { border-bottom: 0; }
.lines td:last-child { text-align: right; white-space: nowrap; padding-left: 10px; }
.lines tr.total td { font-weight: 800; color: var(--espresso); border-top: 2px solid var(--line); border-bottom: 0; padding-top: 10px; font-size: 1.05rem; }
.lines tr.sub td { color: var(--muted); font-size: .88rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.table th { text-align: left; color: var(--muted); font-weight: 650; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table td.r, .table th.r { text-align: right; }

/* ---------- avisos ---------- */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--espresso); font-size: .92rem; }
.banner.bad { background: var(--bad-soft); }
.banner.good { background: var(--good-soft); }
.banner.info { background: #EEF3F8; }
.banner svg { flex: none; margin-top: 1px; }
.banner .grow b { display: block; }
.insight { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); border-left: 4px solid var(--accent); }
.insight.good { border-left-color: var(--good); }
.insight.warn { border-left-color: var(--warn); }
.insight.bad { border-left-color: var(--bad); }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: var(--espresso); color: #fff; text-align: center; font-size: .85rem; padding: 7px 12px; }

/* ---------- caixa rápido ---------- */
.pos-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .pos-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pos-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pcard {
  position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 2px solid transparent; padding: 0; overflow: hidden;
  text-align: left; cursor: pointer; display: flex; flex-direction: column; transition: transform .08s, border-color .15s; min-width: 0;
}
.pcard:active { transform: scale(.97); }
.pcard.in-cart { border-color: var(--primary); }
.pcard .ph { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--accent-soft), var(--primary-soft)); display: grid; place-items: center; font-size: 2.1rem; font-weight: 800; color: var(--primary-dark); }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .info { padding: 10px 12px 12px; }
.pcard .name { font-weight: 700; color: var(--espresso); font-size: .95rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.pcard .price { font-weight: 800; color: var(--primary-dark); font-size: 1.1rem; margin-top: 4px; }
.pcard .stock { font-size: .78rem; color: var(--muted); }
.pcard .stock.low { color: var(--bad); font-weight: 650; }
.pcard .qty-badge { position: absolute; top: 8px; right: 8px; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 16px; background: var(--primary); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); animation: pop .2s; }
.pcard.out { opacity: .55; }
@keyframes pop { from { transform: scale(.4); } to { transform: scale(1); } }
.cartbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 25;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 18px; background: var(--espresso); color: #fff; box-shadow: var(--shadow-lg);
  animation: up .2s ease-out;
}
.cartbar .grow b { font-size: 1.25rem; display: block; }
.cartbar .grow span { font-size: .82rem; opacity: .8; }
.cartbar .btn { min-height: 50px; }
@media (min-width: 960px) { .cartbar { left: calc(248px + 28px); right: 28px; bottom: 20px; max-width: 1064px; margin: 0 auto; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 650; cursor: pointer; white-space: nowrap; color: var(--text); }
.chip.on { background: var(--espresso); color: #fff; border-color: var(--espresso); }
.paygrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.paybtn { min-height: 74px; border-radius: 16px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 750; font-size: 1.02rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--espresso); }
.paybtn:active { transform: scale(.97); }
.paybtn.on { border-color: var(--primary); background: var(--primary-soft); }
.paybtn svg { width: 24px; height: 24px; color: var(--primary); }
.bigtotal { text-align: center; padding: 6px 0 14px; }
.bigtotal .v { font-size: 2.4rem; font-weight: 800; color: var(--espresso); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bills { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.bills button { flex: 1 1 70px; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }

/* ---------- folha (modal) ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 80; background: rgba(40, 26, 18, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s; }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; background: var(--bg); border-radius: 24px 24px 0 0; display: flex; flex-direction: column;
  animation: up .22s ease-out; padding-bottom: env(safe-area-inset-bottom);
}
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 8px; }
.sheet-head h2 { flex: 1; }
.sheet-body { padding: 8px 16px 18px; overflow-y: auto; }
.sheet-foot { padding: 10px 16px 16px; border-top: 1px solid var(--line); background: var(--bg); }
.grab { width: 44px; height: 5px; border-radius: 3px; background: #E2D2BE; margin: 8px auto 0; }
@media (min-width: 720px) { .sheet-back { align-items: center; } .sheet { border-radius: 24px; } .grab { display: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toasts { position: fixed; left: 0; right: 0; top: 14px; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; max-width: 520px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--espresso); color: #fff; font-weight: 600; box-shadow: var(--shadow-lg); animation: drop .22s ease-out; }
.toast.good { background: var(--good); }
.toast.bad { background: var(--bad); }
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- gráfico ---------- */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .fill { width: 100%; max-width: 42px; border-radius: 9px 9px 4px 4px; background: linear-gradient(180deg, var(--accent), var(--primary)); min-height: 3px; transition: height .5s ease; position: relative; }
.bars .bar.today .fill { background: linear-gradient(180deg, var(--primary), var(--primary-dark)); }
.bars .bar .lbl { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.bars .bar .val { font-size: .68rem; color: var(--espresso); font-weight: 700; white-space: nowrap; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: .9rem; }
.hbar .track { height: 12px; border-radius: 6px; background: var(--cream); overflow: hidden; }
.hbar .track div { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--primary)); }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.steps { display: flex; flex-direction: column; gap: 8px; }
.step { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface); text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.step .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); color: var(--muted); font-weight: 800; flex: none; }
.step.done .dot { background: var(--good); color: #fff; }
.step.done b { text-decoration: line-through; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: var(--espresso); font-weight: 700; min-height: 104px; }
.tile .ti { width: 42px; height: 42px; border-radius: 13px; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; }
.tile span { font-weight: 500; font-size: .8rem; color: var(--muted); }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 10% -10%, #FBE1C8, transparent), radial-gradient(900px 500px at 110% 10%, #FBEFD6, transparent), var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo { width: 72px; height: 72px; border-radius: 22px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; margin: 0 auto 14px; color: #fff; box-shadow: 0 10px 30px rgba(217, 119, 50, .35); }
.tagline { text-align: center; color: var(--muted); margin: 6px 0 22px; }

.skeleton { background: linear-gradient(90deg, #F6EBDD 25%, #FBF3E8 37%, #F6EBDD 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.fade-in { animation: fadeup .25s ease-out; }
@keyframes fadeup { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.success-mark { width: 74px; height: 74px; border-radius: 50%; background: var(--good); color: #fff; display: grid; place-items: center; margin: 4px auto 12px; animation: pop .3s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- impressão (relatório em PDF) ---------- */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .sidebar, .bottomnav, .topbar, .no-print, .cartbar, .toasts, .offline-bar { display: none !important; }
  .main { padding: 0; }
  .content { max-width: none; padding: 0; }
  .card, .kpi, .list, .insight { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .kpi.hero { background: #fff; color: var(--text); } .kpi.hero .value, .kpi.hero .label, .kpi.hero .sub { color: var(--text); }
  .print-only { display: block; }
  .print-head { display: flex !important; align-items: center; gap: 14px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
  .print-head img { width: 64px; height: 64px; object-fit: contain; }
  .print-head h1 { margin: 0; } .print-head p { margin: 2px 0 0; color: var(--muted); }
  [data-demo-banner] { display: none !important; }
  .avoid-break { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.kpi.bad .value { color: var(--bad); }
input[type=color].input { cursor: pointer; }
.kpi.hero .value { font-size: clamp(1.3rem, 5.2vw, 1.9rem); }
.kpi .value { font-size: clamp(1.15rem, 4.6vw, 1.45rem); }
