/* ==========================================================
   Forno Vizinho — identidade em preto e branco (tinta e papel)
   ========================================================== */

/* ---------- logo e marca ---------- */
.logo-img { display: block; width: 100%; height: auto; }
:root[data-theme="dark"] .logo-img { filter: invert(1); }
.wordmark { font-family: var(--font-display); font-weight: 900; letter-spacing: -0.045em; }
.boot img { width: 140px; height: auto; border-radius: 0; animation: bootPulse 1.2s ease-in-out infinite alternate; }
:root[data-theme="dark"] .boot img { filter: invert(1); }

/* ---------- monocromático ---------- */
.row-icon { background: var(--ink) !important; color: var(--paper) !important; border-radius: 9px; }
.tile { background: var(--fill-3) !important; box-shadow: inset 0 0 0 1px var(--line); }
.ptile .tile { background: var(--surface-2) !important; }
.b-accent, .b-green { background: var(--ink) !important; }
.b-red { background: var(--stripes) !important; box-shadow: inset 0 0 0 1.5px var(--ink); }
.b-muted { background: var(--fill) !important; }
.legend i[style*="--green"] { background: var(--ink) !important; }
.legend i[style*="--red"] { background: var(--stripes) !important; box-shadow: inset 0 0 0 1px var(--ink); }
.bcol:not(.hl) .b-accent { opacity: .9; }
.bcol.hl .b-accent { box-shadow: none; }
.progress > i { background: var(--ink); }
.sb-item svg, .quick-btn .qi { color: var(--label); }
.quick-btn .qi { background: var(--fill-2); }
.sb-item[aria-current="page"] svg { color: var(--on-accent); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.option[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.option[aria-pressed="true"] svg { color: var(--paper); }
.success-check { background: var(--ink); color: var(--paper); }
.change.show { background: var(--fill-2); color: var(--label); }
.change.show b { color: var(--label); }
.pt-qty { box-shadow: none; }
.hero::before { background: none; }
.hero .w-label { color: var(--label); }
.badge.green { background: rgba(31, 138, 59, .1); color: #187A33; }
.badge.red { background: rgba(215, 0, 21, .08); color: #C4001A; }
:root[data-theme="dark"] .badge.green { background: rgba(48, 209, 88, .16); color: #4ADE80; }
:root[data-theme="dark"] .badge.red { background: rgba(255, 69, 58, .18); color: #FF7B72; }
.banner { background: var(--fill-3); box-shadow: inset 0 0 0 1px var(--line); }
.banner svg { color: var(--label); }
.banner.red { background: rgba(215, 0, 21, .06); box-shadow: inset 0 0 0 1px rgba(215, 0, 21, .25); }
.banner.red svg { color: var(--red-text); }
.banner.green { background: rgba(31, 138, 59, .07); box-shadow: inset 0 0 0 1px rgba(31, 138, 59, .25); }
.banner.green svg { color: var(--green-text); }
.btn { background: var(--fill-2); color: var(--label); }
.btn.tinted { background: var(--fill-2); color: var(--label); }
.btn.dark { background: var(--ink); color: var(--paper); }
.nav-btn { color: var(--label); }
.link, .link-btn, a { color: var(--label); }
.link { text-decoration: underline; text-underline-offset: 3px; }
.gl-ic { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; margin-right: 5px; }
.group-label { font-weight: 600; color: var(--label-2); }
.seg .seg-thumb { box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgba(0,0,0,.08); }
:root[data-theme="dark"] .seg .seg-thumb { background: #2A2A2A; }
:focus-visible { outline-color: var(--ink); }
.dot.live, .session-chip.open .dot { background: var(--green); }
.alert-actions button { color: var(--label); }
.alert-actions button.destructive { color: var(--red-text); }
.avatar { background: var(--ink) !important; color: var(--paper); }
.toast .ti { background: var(--ink); color: var(--paper); }
.toast.error .ti { background: var(--red); color: #fff; }

/* ---------- alternar White / Black ---------- */
.i-moon { display: block; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
.theme-toggle {
  position: absolute; top: calc(14px + var(--safe-top)); right: calc(14px + var(--safe-right)); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); color: var(--label); box-shadow: 0 0 0 1.5px var(--ink);
}
.theme-toggle svg { width: 21px; height: 21px; }

/* ---------- login ---------- */
.login { position: relative; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; background: var(--bg); }
.login-art { position: relative; display: grid; place-items: center; padding: calc(56px + var(--safe-top)) 24px 26px; }
.login-art .logo-img { width: min(62vw, 300px); animation: viewIn .7s var(--ease-out) both; }
.stripe-band { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--stripes); opacity: .9; }
.login-card {
  width: 100%; max-width: 440px; margin: 0 auto;
  padding: 26px 24px calc(28px + var(--safe-bottom));
  animation: viewIn .6s .08s var(--ease-out) both;
}
.login-card .wordmark { font-size: clamp(38px, 11vw, 52px); line-height: .98; text-align: center; }
.login-lead { text-align: center; color: var(--label-2); font-size: 16px; margin: 10px auto 22px; max-width: 32ch; }
.login-form { display: grid; gap: 12px; }
.lf { display: grid; gap: 6px; }
.lf span { font-size: 13px; font-weight: 600; color: var(--label-2); }
.lf input {
  height: 52px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--surface); font-size: 17px; transition: border-color .2s, box-shadow .2s;
}
.lf input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--fill-2); outline: none; }
.login-links { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 10px; }
.login-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; font-size: 13px; color: var(--label-2); }
.login-foot svg { width: 15px; height: 15px; }
@media (min-width: 900px) {
  .login { grid-template-rows: none; grid-template-columns: 1.1fr 1fr; align-items: stretch; }
  .login-art { padding: 48px; border-right: 1.5px solid var(--ink); }
  .login-art .logo-img { width: min(34vw, 460px); }
  .stripe-band { top: 0; bottom: 0; left: auto; right: 0; width: 12px; height: auto; background: repeating-linear-gradient(180deg, var(--ink) 0 6px, transparent 6px 12px); }
  .login-card { align-self: center; padding: 48px; }
}

/* ---------- barra lateral ---------- */
.sb-brand { align-items: center; }
.sb-logo { width: 46px; height: 46px; flex: none; display: grid; place-items: center; }
.sb-brand b { font-size: 18px; }
.sb-foot { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--separator); padding-top: 8px; margin-top: 4px; }
.sb-foot .sb-sync { flex: 1; min-width: 0; }
.sb-foot .sb-sync span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-mini { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--label-2); flex: none; }
.sb-mini:hover { background: var(--fill-3); color: var(--label); }
.sb-mini svg { width: 19px; height: 19px; }
.sidebar { background: var(--bg); border-right: 1.5px solid var(--ink); }
.tabbar { border-top: 1.5px solid var(--ink); }
.tab { color: var(--label-3); }
.tab[aria-current="page"] { color: var(--label); }
.tab[aria-current="page"] svg { stroke-width: 2.4; }
.tab .tab-dot { background: var(--ink); color: var(--paper); }

/* ---------- pedidos ---------- */
.day-card { padding: 8px 8px 6px; text-align: center; }
.day-card .link-btn { padding: 4px 8px 2px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dn-label b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.dn-label span { display: block; font-size: 13px; color: var(--label-2); }
.seg-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 640px) { .seg-row { grid-template-columns: 1.4fr 1fr; } }
.pk-day { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--label-2); margin: 12px 4px 0; }
.pk-day svg { width: 16px; height: 16px; }
.ogroup { margin-top: 22px; }
.og-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px 2px; border-bottom: 1.5px solid var(--ink); padding-bottom: 6px; }
.og-head b { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.og-head b svg { width: 19px; height: 19px; }
.og-head span { font-size: 13px; color: var(--label-2); white-space: nowrap; }
.og-sub { font-size: 13px; color: var(--label-2); padding: 4px 4px 0; }
.ocards { display: grid; gap: 10px; margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ocard { padding: 14px 14px 12px; display: grid; gap: 10px; cursor: pointer; transition: transform .18s var(--ease), opacity .2s; }
.ocard:active { transform: scale(.985); }
.ocard.done { opacity: .62; }
.ocard.done .oc-time { text-decoration: line-through; text-decoration-thickness: 2px; }
.oc-row1 { display: flex; align-items: center; gap: 12px; }
.oc-time { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; min-width: 72px; }
.oc-who { flex: 1; min-width: 0; }
.oc-who b { display: block; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-who span { display: block; font-size: 13.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paid-pill {
  flex: none; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 16px;
  font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; transition: transform .15s var(--ease);
}
.paid-pill svg { width: 15px; height: 15px; stroke-width: 2.8; }
.paid-pill:active { transform: scale(.94); }
.paid-pill.is-paid { background: var(--ink); color: var(--paper); }
.paid-pill.is-unpaid { background: transparent; color: var(--red-text); box-shadow: inset 0 0 0 1.5px currentColor; }
.oc-items { display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px 6px; color: var(--label); }
.oc-foot > b { margin-left: 0; }
.oc-items span { font-size: 14px; padding: 3px 9px; border-radius: 8px; background: var(--fill-3); box-shadow: inset 0 0 0 1px var(--line); }
.oc-foot { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.oc-pk { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--label-2); overflow: hidden; }
.oc-pk svg { width: 14px; height: 14px; flex: none; }
.oc-foot > b { font-size: 16px; }
.deliver-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 10px;
  background: var(--fill-2); font-size: 13.5px; font-weight: 600; color: var(--label);
}
.deliver-btn svg { width: 16px; height: 16px; stroke-width: 2.4; }
.deliver-btn.is-done { background: var(--ink); color: var(--paper); }
.apt-chip {
  min-width: 46px; height: 32px; padding: 0 8px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; letter-spacing: -0.01em;
  background: var(--ink); color: var(--paper); font-variant-numeric: tabular-nums;
}
.row.has-icon:has(.apt-chip) { --sep-inset: 74px; }
.row.picked .row-title { font-weight: 700; }
.stepper .qty { background: none; border: 0; font: inherit; font-weight: 700; color: var(--label); cursor: pointer; }
.pk-card { border-radius: var(--r); padding: 14px 16px; box-shadow: inset 0 0 0 1.5px var(--ink); }
.pk-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.pk-head span { display: inline-flex; align-items: center; gap: 6px; }
.pk-head svg { width: 18px; height: 18px; }
.pk-card p { font-size: 14px; color: var(--label-2); margin-top: 4px; }
.pk-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pk-total b { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.date-in { font: inherit; font-size: 14.5px; border: 0; color: var(--label); }
.od-badges { display: flex; gap: 6px; }
.od-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big-toggle {
  display: grid; justify-items: start; gap: 2px; padding: 14px; border-radius: 16px; text-align: left;
  transition: transform .15s var(--ease);
}
.big-toggle:active { transform: scale(.97); }
.big-toggle svg { width: 24px; height: 24px; margin-bottom: 4px; stroke-width: 2.2; }
.big-toggle span { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.big-toggle em { font-style: normal; font-size: 12.5px; opacity: .7; }
.big-toggle.on { background: var(--ink); color: var(--paper); }
.big-toggle.off { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink); }
.big-toggle.off.unpaid { color: var(--red-text); box-shadow: inset 0 0 0 1.5px currentColor; }
.deliv-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; }
.dc-item { padding: 12px 12px; min-width: 0; }
.dc-item + .dc-item { border-left: 1px solid var(--separator); }
.dc-item span { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--label-2); font-weight: 600; }
.dc-item span svg { width: 13px; height: 13px; }
.dc-item b { display: block; font-size: 15.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- prédios ---------- */
.bcards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.bcard { padding: 0; overflow: hidden; }
.bcard-main { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 14px 12px; text-align: left; }
.bcard-main .grow b { display: block; font-size: 17px; letter-spacing: -0.02em; }
.bcard-main .grow span { display: block; font-size: 13.5px; color: var(--label-2); }
.bcard-main .chev { width: 16px; height: 16px; color: var(--label-3); }
.bd-icon { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--ink); color: var(--paper); }
.bd-icon svg { width: 24px; height: 24px; }
.bcard-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 9px 14px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--label-2); }
.bcard-foot b { color: var(--label); }
.bcard-order { margin-left: auto; display: flex; }
.bcard-order .btn { width: 32px; height: 30px; padding: 0; }
.bd-head { display: flex; align-items: center; gap: 14px; }
.bd-head .bd-icon { width: 56px; height: 56px; border-radius: 16px; }
.bd-head h3 { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }

/* ---------- planilhas (estilo Excel) ---------- */
.xl-period { padding: 8px 10px; }
.xl-period .period-nav { margin: 0; }
.xl-book { border-radius: 14px; box-shadow: 0 0 0 1.5px var(--ink); overflow: hidden; background: var(--surface); }
.xl-tabs { display: flex; overflow-x: auto; scrollbar-width: none; background: var(--surface-2); border-bottom: 1.5px solid var(--ink); }
.xl-tabs::-webkit-scrollbar { display: none; }
.xl-tab {
  flex: none; padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--label-2); white-space: nowrap;
  border-right: 1px solid var(--line); position: relative;
}
.xl-tab[aria-selected="true"] { background: var(--surface); color: var(--label); }
.xl-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1.5px; height: 4px; background: var(--stripes); }
.xl-formula { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.xl-ref { min-width: 44px; font-weight: 700; font-variant-numeric: tabular-nums; }
.xl-fx { font-style: italic; font-family: Georgia, "Times New Roman", serif; color: var(--label-2); padding: 0 6px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.xl-val { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.xl-wrap { overflow: auto; max-height: min(68vh, 760px); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
table.xl { border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 100%; }
.xl th, .xl td { border-right: 1px solid var(--separator); border-bottom: 1px solid var(--separator); padding: 7px 10px; white-space: nowrap; text-align: left; font-variant-numeric: tabular-nums; }
.xl .r { text-align: right; }
.xl thead th { position: sticky; z-index: 2; background: var(--surface-2); font-weight: 600; }
.xl .xl-letters th { top: 0; height: 24px; padding: 2px 10px; font-size: 11.5px; color: var(--label-3); text-align: center; font-weight: 500; }
.xl .xl-head th { top: 24px; color: var(--label); cursor: pointer; user-select: none; border-bottom: 1.5px solid var(--ink); }
.xl .xl-head th:hover { background: var(--fill-2); }
.xl-sort { font-style: normal; font-size: 10px; margin-left: 4px; }
.xl .xl-rn, .xl .xl-corner { position: sticky; left: 0; z-index: 1; background: var(--surface-2); color: var(--label-3); font-size: 11.5px; font-weight: 500; text-align: center; min-width: 38px; padding: 7px 6px; }
.xl thead .xl-rn, .xl thead .xl-corner { z-index: 3; }
.xl tbody tr:hover td { background: var(--fill-3); }
.xl tbody tr[data-link] { cursor: pointer; }
.xl td.sel, .xl th.sel { box-shadow: inset 0 0 0 2px var(--ink); background: var(--surface); }
.xl tfoot td, .xl tfoot th { position: sticky; bottom: 0; background: var(--surface-2); font-weight: 700; border-top: 2px solid var(--ink); }
.xl-warn { color: var(--red-text); font-weight: 600; }
.xl-neg { color: var(--red-text); }
.xl-empty { text-align: center !important; color: var(--label-2); padding: 28px !important; }
.xl-note { font-size: 12.5px; color: var(--label-2); padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }

/* ---------- mais ---------- */
.more-hero { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.mh-logo { width: 58px; flex: none; }
.more-hero b { display: block; font-size: 22px; }
.more-hero span { display: block; font-size: 13.5px; color: var(--label-2); }
.more-hero .btn svg { width: 16px; height: 16px; }
