/* Portal de Pedidos LanLan
   Identidade da marca: laranja (ação e destaque) e amarelo (apoio, como na gota da logo).
   Um marrom-escuro quente faz o papel de texto e de fundos escuros, para manter o contraste. */
:root {
  --navy: #3A2418;      /* marrom-escuro: títulos, texto forte, fundos escuros */
  --navy-2: #5C3A26;
  --navy-3: #FF8A4C;    /* barras de gráfico */
  --orange: #FF530A;    /* laranja LanLan */
  --orange-d: #E04400;
  --orange-soft: #FFF0E6;
  --yellow: #FFD400;    /* amarelo LanLan */
  --yellow-d: #E6B800;
  --yellow-soft: #FFF8D6;
  --canvas: #F5F4F2;
  --paper: #FFFFFF;
  --line: #E6E1DC;
  --line-2: #F0ECE8;
  --ink: #2A1D16;
  --ink-2: #4E3F36;
  --muted: #7A6C63;
  --faint: #B0A49C;
  --ok: #157F4A;   --ok-bg: #E6F4EC;
  --warn: #A15C00; --warn-bg: #FFF4DB;
  --bad: #B42318;  --bad-bg: #FDECEA;
  --info: #1D5FB4; --info-bg: #E8F0FB;
  --violet: #6B3FA0; --violet-bg: #F1EAFA;
  --r: 6px;
  --r-lg: 10px;
  --shadow-pop: 0 12px 32px rgba(58, 36, 24, .18), 0 2px 6px rgba(58, 36, 24, .08);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar: 236px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 14px/1.45 var(--font); color: var(--ink); background: var(--canvas);
  font-variant-numeric: tabular-nums;
}
a { color: var(--orange-d); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; color: var(--navy); line-height: 1.2; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0 0 .6em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mono-num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ico.sm { width: 15px; height: 15px; }
.ico.lg { width: 22px; height: 22px; }

/* ---------- Boot / login ---------- */
.boot { display: grid; place-items: center; height: 100vh; }
.boot-logo { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--orange); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login {
  min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 520px);
  background: var(--paper);
}
.login-side {
  background: var(--orange); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-side .slogan { width: min(300px, 42%); align-self: flex-end; height: auto; position: relative; z-index: 1; }
/* Novidade com foto: frase em cima, sobre o laranja; foto ocupa a parte de baixo e se funde ao laranja */
.login-side.has-promo { justify-content: flex-start; gap: 18px; }
.login-side.has-promo .promo-photo { position: absolute; left: 0; right: 0; bottom: 0; height: 64%; background-size: cover; background-position: center 40%; }
.login-side.has-promo .promo-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--orange) 0%, rgba(255, 83, 10, .55) 14%, rgba(255, 83, 10, 0) 32%); }
.login-side.has-promo .promo-photo::after { content: ""; position: absolute; left: 0; bottom: 0; width: 60%; height: 42%; background: radial-gradient(ellipse at 0% 100%, rgba(30, 14, 6, .78) 0%, rgba(30, 14, 6, .45) 45%, rgba(30, 14, 6, 0) 75%); }
.promo-label { position: absolute; right: 22px; z-index: 1; background: rgba(42, 22, 12, .78); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em; padding: 5px 12px; border-radius: 20px; border: 1px solid rgba(255, 212, 0, .7); }
.promo-label.l0 { top: 26%; }
.promo-label.l1 { bottom: 26%; }
.login-side.has-promo .promo-text { position: relative; z-index: 1; max-width: 34em; }
.promo-tag { display: inline-block; background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 12.5px; padding: 4px 12px; border-radius: 20px; margin-bottom: 12px; }
.login-side.has-promo h2 { font-size: clamp(26px, 2.5vw, 38px); line-height: 1.1; max-width: 16em; margin-bottom: 8px; }
.login-side.has-promo .promo-text p { color: var(--yellow); font-size: clamp(17px, 1.5vw, 22px); font-weight: 750; margin: 0; }
.login-side.has-promo .slogan { position: absolute; left: 40px; bottom: 30px; width: 150px; align-self: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }
.wordmark { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.wordmark b { color: var(--yellow); font-weight: 800; }
.logo { display: block; height: auto; }
.login-main .logo { width: 190px; margin-bottom: 28px; }
.login-side .tagline { font-size: 13px; color: #FFE1CF; position: relative; z-index: 1; }
.login-side h2 { color: #fff; font-size: clamp(34px, 3.6vw, 52px); font-weight: 800; max-width: 12em; letter-spacing: -.025em; line-height: 1.05; position: relative; z-index: 1; margin-bottom: 14px; }
.login-side p { color: #FFE9DC; max-width: 28em; font-size: 15px; position: relative; z-index: 1; }
.login-main { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 64px); }
.login-main h1 { font-size: 24px; margin-bottom: 6px; }
.login-main form { margin-top: 24px; display: grid; gap: 14px; }
.login-foot { margin-top: 28px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 820px) {
  .login { grid-template-columns: 1fr; }
  .login-side { padding: 28px 24px; min-height: 0; }
  .login-side h2 { font-size: 26px; margin: 8px 0 0; }
  .login-side p { display: none; }
  .login-side { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
  .login-side .tagline { width: 100%; }
  .login-side > div:not(.tagline) { flex: 1 1 160px; }
  .login-side .slogan { width: 130px; }
  .login-side.has-promo { min-height: 0; display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding-bottom: 0; }
  .login-side.has-promo .promo-photo { order: 3; position: relative; display: block; height: 190px; margin: 16px -24px 0; flex: none; }
  .login-side.has-promo .promo-photo::before { background: linear-gradient(to bottom, var(--orange) 0%, rgba(255, 83, 10, 0) 28%); }
  .login-side.has-promo h2 { font-size: 21px; }
  .login-side.has-promo .promo-text p { display: block; font-size: 15px; }
  .login-side.has-promo .tagline { margin-bottom: 10px; }
  .login-side.has-promo .slogan { width: 96px; left: 16px; bottom: 12px; }
  .promo-label { font-size: 11px; padding: 3px 9px; right: 12px; }
  .promo-label.l0 { top: 22%; } .promo-label.l1 { bottom: 12%; }
}

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--paper); color: var(--ink-2); position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; z-index: 40; border-right: 1px solid var(--line);
}
.sb-brand { padding: 16px 20px 12px; border-bottom: 1px solid var(--line-2); }
.sb-brand .logo { width: 132px; }
.sb-brand span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.sb-unit { margin: 12px 12px 4px; padding: 10px 12px; border-radius: var(--r); background: var(--yellow-soft); border: 1px solid #F5E3A0; font-size: 12.5px; color: var(--ink-2); }
.sb-unit strong { display: block; color: var(--navy); font-size: 14px; font-weight: 650; }
.sb-unit select { width: 100%; margin-top: 6px; background: var(--paper); color: var(--ink); border: 1px solid #E9D58A; border-radius: 4px; padding: 4px 6px; font: inherit; }
.nav { padding: 8px 10px 20px; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-group > span { display: block; padding: 0 10px 6px; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); color: var(--ink-2); font-size: 13.5px;
  position: relative; text-decoration: none;
}
.nav a:hover { background: var(--canvas); color: var(--navy); }
.nav a.active { background: var(--orange-soft); color: var(--orange-d); font-weight: 650; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange); }
.nav a .count { margin-left: auto; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.sb-foot { padding: 12px 20px 16px; font-size: 11.5px; color: var(--faint); border-top: 1px solid var(--line-2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: var(--paper); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px;
  padding: 0 24px; position: sticky; top: 0; z-index: 30;
}
.topbar .menu-btn { display: none; }
.crumb { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.crumb strong { color: var(--navy); font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.clock { font-size: 13px; color: var(--ink-2); padding: 0 10px; white-space: nowrap; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--r); border: 0; background: transparent;
  color: var(--ink-2); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--canvas); color: var(--navy); }
.icon-btn .dot { position: absolute; top: 6px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--paper); }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: var(--r); border: 0; background: transparent; cursor: pointer; font: inherit; color: var(--ink); }
.user-btn:hover { background: var(--canvas); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.user-btn .who { text-align: left; line-height: 1.15; }
.user-btn .who small { display: block; color: var(--muted); font-size: 11.5px; }
#view { padding: 24px; max-width: 1480px; width: 100%; }

.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); min-width: 240px; z-index: 60; overflow: hidden; }
.dropdown a, .dropdown button.dd-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 14px; color: var(--ink); border: 0; background: none; font: inherit; text-align: left; cursor: pointer; text-decoration: none; }
.dropdown a:hover, .dropdown button.dd-item:hover { background: var(--canvas); }
.notif-panel { width: min(380px, 92vw); max-height: 70vh; display: flex; flex-direction: column; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notif-list { overflow-y: auto; }
.notif { display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.notif:hover { background: var(--canvas); }
.notif .pin { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: transparent; }
.notif.unread .pin { background: var(--orange); }
.notif strong { font-size: 13px; color: var(--navy); }
.notif p { margin: 1px 0 2px; font-size: 12.5px; color: var(--ink-2); }
.notif time { font-size: 11.5px; color: var(--faint); }

@media (max-width: 1024px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-pop); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(58,36,24,.4); z-index: 35; }
  .topbar { padding: 0 12px; }
  .topbar .menu-btn { display: inline-grid; }
  .clock, .user-btn .who { display: none; }
  #view { padding: 16px; }
}

/* ---------- Page structure ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel + .panel, .panel + .grid, .grid + .panel, .grid + .grid { margin-top: 16px; }
.grid > .panel + .panel { margin-top: 0; }
.grid > div > .panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head .hint { font-size: 12.5px; color: var(--muted); }
.panel-body { padding: 18px; }
.panel-body.tight { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.g-side-l { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-side, .g-side-l { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 0; font-size: 13.5px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.section-title { font-size: 13px; font-weight: 650; color: var(--navy); margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title:first-child { margin-top: 0; }

/* KPIs: faixa contínua dividida, não cartões soltos */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.kpi { padding: 14px 18px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 0 -1px -1px 0; min-width: 0; }
.kpi .k-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .k-val { font-size: clamp(18px, 1.5vw, 24px); font-weight: 650; color: var(--navy); margin-top: 4px; letter-spacing: -.01em; white-space: nowrap; }
.kpi .k-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.clickable { cursor: pointer; }
.kpi.clickable:hover { background: #FAFBFD; }
.kpi.k-warn .k-val { color: var(--warn); }
.kpi.k-bad .k-val { color: var(--bad); }
a.kpi, a.kpi:hover { text-decoration: none; color: inherit; }
.delta { font-size: 12px; font-weight: 600; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 5px; min-width: 0; }
.field > label, .field > .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12px; color: var(--bad); font-weight: 500; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--bad); background: #FFFBFA; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid #D9D1CA; border-radius: var(--r);
  padding: 8px 10px; min-height: 38px; transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 83, 10, .15); }
input:disabled, select:disabled, textarea:disabled { background: var(--canvas); color: var(--muted); }
input[type=file] { font: inherit; font-size: 13px; max-width: 100%; }
.form-grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.g3c { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.g4c { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) { .form-grid, .form-grid.g3c, .form-grid.g4c { grid-template-columns: 1fr; } }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--orange); margin: 0; }
.pwd { position: relative; }
.pwd button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.input-group { display: flex; }
.input-group > span { display: grid; place-items: center; padding: 0 10px; background: var(--canvas); border: 1px solid #C9D1DC; border-right: 0; border-radius: var(--r) 0 0 var(--r); color: var(--muted); font-size: 13px; }
.input-group input { border-radius: 0 var(--r) var(--r) 0; }

/* Dias da semana como interruptores */
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days label { cursor: pointer; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days span { display: inline-block; min-width: 54px; text-align: center; padding: 7px 10px; border: 1px solid #C9D1DC; border-radius: var(--r); font-size: 13px; color: var(--ink-2); background: var(--paper); }
.days input:checked + span { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600; }
.days input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

.chips-select { max-height: 220px; overflow: auto; border: 1px solid #C9D1DC; border-radius: var(--r); padding: 6px; display: grid; gap: 2px; }
.chips-select label { padding: 5px 6px; border-radius: 4px; }
.chips-select label:hover { background: var(--canvas); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: 13.5px;
  padding: 0 14px; min-height: 38px; border-radius: var(--r); border: 1px solid #D6CCC4; background: var(--paper); color: var(--navy);
  cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s;
}
.btn:hover { background: #FAF8F6; border-color: #BFB2A8; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-d); border-color: var(--orange-d); }
.btn.navy { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.btn.navy:hover { background: var(--yellow-d); border-color: var(--yellow-d); }
.btn.light { background: #fff; border-color: #fff; color: var(--orange-d); }
.btn.light:hover { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.btn.danger { color: var(--bad); border-color: #E7B5AF; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ok { color: var(--ok); border-color: #A9D6BC; }
.btn.ok.solid { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--canvas); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { min-height: 46px; padding: 0 22px; font-size: 15px; }
.btn.block { width: 100%; }
.btn .spin { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--orange-d); cursor: pointer; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Status ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #EEF1F5; color: var(--ink-2); line-height: 1.6; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.b-gray { background: #EEF1F5; color: #4B5565; }
.b-amber { background: var(--warn-bg); color: var(--warn); }
.b-green { background: var(--ok-bg); color: var(--ok); }
.b-red { background: var(--bad-bg); color: var(--bad); }
.b-blue { background: var(--info-bg); color: var(--info); }
.b-sky { background: #E5F4FA; color: #0E6F94; }
.b-indigo { background: #ECEBFB; color: #4338A8; }
.b-purple { background: var(--violet-bg); color: var(--violet); }
.b-orange { background: var(--orange-soft); color: var(--orange-d); }
.b-teal { background: #E2F5F3; color: #0F766E; }
.tag-rnc { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--bad); background: var(--bad-bg); padding: 1px 7px; border-radius: 4px; }

.alert { display: flex; gap: 12px; padding: 13px 16px; border-radius: var(--r-lg); border: 1px solid; font-size: 13.5px; align-items: flex-start; }
.alert + .alert, .alert + .panel, .alert + .grid, .alert + .kpis { margin-top: 12px; }
.alert .ico { margin-top: 1px; }
.alert strong { display: block; margin-bottom: 2px; }
.alert.info { background: var(--info-bg); border-color: #BCD3F1; color: #173F73; }
.alert.warn { background: var(--warn-bg); border-color: #F2D49B; color: #6B3D00; }
.alert.bad { background: var(--bad-bg); border-color: #F1C0BA; color: #7A1A12; }
.alert.ok { background: var(--ok-bg); border-color: #B4DDC6; color: #0D5131; }
.blocked-banner { border-left: 5px solid var(--bad); }

/* ---------- Tables ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FCFBFA; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.toolbar .field { min-width: 140px; flex: 0 1 180px; }
.toolbar .field.grow { flex: 1 1 220px; }
.toolbar .field > label { font-weight: 500; color: var(--muted); font-size: 12px; }
.toolbar input, .toolbar select { min-height: 34px; padding: 6px 9px; font-size: 13.5px; }
.toolbar .btn { min-height: 34px; }
.table-wrap { overflow-x: auto; }
table.dt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dt th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; position: sticky; top: 0; }
.dt th.sortable { cursor: pointer; user-select: none; }
.dt th.sortable:hover { color: var(--navy); }
.dt th .arr { opacity: .35; margin-left: 3px; font-size: 10px; }
.dt th.sorted { color: var(--navy); }
.dt th.sorted .arr { opacity: 1; color: var(--orange); }
.dt td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt tbody tr.clickable { cursor: pointer; }
.dt tbody tr.clickable:hover td { background: #FFF8F3; }
.dt tbody tr.fresh td { animation: fresh 2.4s ease-out; }
@keyframes fresh { from { background: var(--orange-soft); } to { background: transparent; } }
.dt td.num, .dt th.num { text-align: right; white-space: nowrap; }
.dt td.act { text-align: right; white-space: nowrap; width: 1%; }
.dt .strong { font-weight: 600; color: var(--navy); }
.dt tfoot td { font-weight: 650; color: var(--navy); border-top: 1px solid var(--line); background: #FBFCFD; }
.dt .thumb { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; background: var(--canvas); }
.dt .sel { width: 1%; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty .ico { width: 34px; height: 34px; color: var(--faint); margin: 0 auto 10px; display: block; }
.empty strong { display: block; color: var(--ink-2); margin-bottom: 4px; font-size: 14.5px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .pages { display: flex; gap: 4px; align-items: center; }
.loading-row td { color: var(--muted); text-align: center; padding: 30px; }
.skeleton { background: linear-gradient(90deg, #EEF1F5 25%, #F6F8FA 50%, #EEF1F5 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 4px; height: 14px; }
@keyframes sk { to { background-position: -200% 0; } }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; }
.tabs button { background: none; border: 0; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--muted); padding: 12px 12px 10px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button:hover { color: var(--navy); }
.tabs button.on { color: var(--orange-d); border-bottom-color: var(--orange); }
.tabs .count { background: var(--canvas); color: var(--ink-2); font-size: 11px; padding: 0 6px; border-radius: 8px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(58, 36, 24, .45); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fadeIn .12s ease-out; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { background: var(--paper); border-radius: 12px; box-shadow: var(--shadow-pop); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: popIn .16s ease-out; }
.modal.lg { width: min(860px, 100%); }
.modal.xl { width: min(1100px, 100%); }
.modal.sm { width: min(420px, 100%); }
@keyframes popIn { from { transform: translateY(8px) scale(.985); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 12px; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: #FBFCFD; border-radius: 0 0 12px 12px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .modal-back { padding: 0; place-items: end stretch; }
  .modal, .modal.lg, .modal.xl, .modal.sm { width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
}

/* Toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: var(--r-lg); box-shadow: var(--shadow-pop); display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; animation: popIn .18s ease-out; border-left: 4px solid var(--yellow); cursor: pointer; }
.toast.ok { border-left-color: #3CCB7F; }
.toast.bad { border-left-color: #F97066; }
.toast.warn { border-left-color: #FDB022; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.timeline li::after { content: ""; position: absolute; left: 8.5px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .t-head { font-size: 13.5px; }
.timeline .t-meta { font-size: 12px; color: var(--muted); }
.timeline .t-note { margin-top: 4px; font-size: 13px; color: var(--ink-2); background: var(--canvas); padding: 6px 10px; border-radius: var(--r); }
.timeline li.rev::before { background: var(--yellow-d); box-shadow: 0 0 0 3px var(--yellow-soft); }
.timeline li.log::before { background: var(--info); }

.comment { padding: 10px 12px; border-radius: var(--r); background: var(--canvas); margin-bottom: 8px; }
.comment.internal { background: #FFF8E6; border: 1px dashed #F2D49B; }
.comment .c-meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }

.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.file-row:last-child { border-bottom: 0; }
.file-ico { width: 34px; height: 34px; border-radius: 6px; background: var(--info-bg); color: var(--info); display: grid; place-items: center; flex: none; font-size: 10px; font-weight: 800; }
.file-ico.pdf { background: var(--bad-bg); color: var(--bad); }
.file-row .f-name { min-width: 0; flex: 1; }
.file-row .f-name strong { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .f-name small { color: var(--muted); font-size: 12px; }

/* ---------- Catálogo e comanda (portal da unidade) ---------- */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.cat-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.cat-bar .search { flex: 1 1 260px; position: relative; }
.cat-bar .search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.cat-bar .search input { padding-left: 36px; min-height: 42px; }
.cat-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 16px; scrollbar-width: thin; }
.cat-chips button { flex: none; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 20px; cursor: pointer; }
.cat-chips button.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.cat-section h2 { font-size: 15px; margin: 22px 0 10px; display: flex; align-items: baseline; gap: 8px; }
.cat-section h2 small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.cat-section:first-child h2 { margin-top: 0; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
@media (max-width: 600px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .prod .info { padding: 8px 10px 2px; } .prod .foot { padding: 8px 10px 10px; } }
.prod { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; overflow: hidden; transition: border-color .12s; }
.prod.in-cart { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.prod.off { opacity: .6; }
.prod .ph { aspect-ratio: 4 / 3; background: #FFF6EE; display: grid; place-items: center; color: #F2B48E; overflow: hidden; }
.prod .ph img { width: 100%; height: 100%; object-fit: cover; }
.prod .info { padding: 10px 12px 4px; flex: 1; }
.prod .code { font-size: 11.5px; color: var(--muted); }
.prod .name { font-weight: 600; color: var(--navy); font-size: 14px; line-height: 1.25; margin: 2px 0 4px; }
.prod .desc { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod .price { font-weight: 700; color: var(--ink); font-size: 15px; margin-top: 6px; }
.prod .price small { font-weight: 500; color: var(--muted); font-size: 12px; }
.prod .foot { padding: 10px 12px 12px; }
.stepper { display: grid; grid-template-columns: 38px 1fr 38px; border: 1px solid #D9D1CA; border-radius: var(--r); overflow: hidden; height: 38px; background: var(--paper); }
.stepper button { border: 0; background: var(--orange-soft); color: var(--orange-d); font-size: 18px; font-weight: 600; cursor: pointer; line-height: 1; }
.stepper button:hover { background: #FFDCC6; }
.stepper input { border: 0; border-radius: 0; text-align: center; min-height: 0; height: 100%; padding: 0 4px; font-weight: 650; font-size: 15px; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { box-shadow: none; }
.prod .add { width: 100%; }
.unavail { font-size: 12.5px; color: var(--bad); font-weight: 600; text-align: center; padding: 8px 0; }

/* A comanda: o elemento de identidade do portal */
.comanda-wrap { position: sticky; top: 76px; }
.comanda {
  background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--yellow); border-radius: var(--r-lg) var(--r-lg) 0 0; position: relative;
  filter: drop-shadow(0 6px 14px rgba(58, 36, 24, .08));
}
.comanda::after {
  content: ""; position: absolute; left: -1px; right: -1px; bottom: -9px; height: 10px;
  background: radial-gradient(circle at 7px 0, transparent 6px, var(--paper) 6.5px) -7px 0 / 14px 10px repeat-x;
}
.comanda-head { padding: 16px 18px 12px; border-bottom: 1px dashed #C9D1DC; }
.comanda-head h2 { display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
.comanda-head .meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.comanda-items { max-height: calc(100vh - 470px); min-height: 80px; overflow-y: auto; padding: 4px 18px; }
.c-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px dotted var(--line); }
.c-item:last-child { border-bottom: 0; }
.c-item .n { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.c-item .u { font-size: 12px; color: var(--muted); }
.c-item .t { font-weight: 650; text-align: right; font-size: 13.5px; }
.c-item .ctrl { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.c-item .ctrl .stepper { height: 32px; grid-template-columns: 32px 64px 32px; }
.c-item .ctrl .stepper input { font-size: 13.5px; }
.c-empty { text-align: center; padding: 26px 8px; color: var(--muted); font-size: 13px; }
.comanda-sum { padding: 12px 18px 18px; border-top: 1px dashed #C9D1DC; }
.sum-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 3px 0; color: var(--ink-2); }
.sum-row.total { font-size: 19px; font-weight: 750; color: var(--navy); padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line-2); }
.meter { margin: 12px 0 14px; }
.meter .bar { height: 8px; border-radius: 6px; background: #F1EBE5; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--orange); border-radius: 6px; transition: width .35s ease; }
.meter.done .bar i { background: var(--ok); }
.meter .m-label { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 6px; color: var(--muted); }
.meter .m-label strong { color: var(--orange-d); }
.meter.done .m-label strong { color: var(--ok); }
.cart-bar { display: none; }
@media (max-width: 1100px) {
  .order-layout { grid-template-columns: minmax(0, 1fr); }
  .comanda-wrap { position: fixed; inset: auto 0 0 0; top: auto; z-index: 50; transform: translateY(100%); transition: transform .22s ease; padding: 0; }
  .comanda-wrap.open { transform: none; }
  .comanda { border-radius: 14px 14px 0 0; max-height: 86vh; display: flex; flex-direction: column; }
  .comanda::after { display: none; }
  .comanda-items { max-height: none; flex: 1; }
  .cart-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--navy); color: #fff; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); align-items: center; gap: 12px; border: 0; width: 100%; font: inherit; cursor: pointer; text-align: left; }
  .cart-bar .cb-total { font-size: 17px; font-weight: 750; }
  .cart-bar .cb-sub { font-size: 12px; color: #E8D9CF; }
  .cart-bar .btn { margin-left: auto; }
  .order-page { padding-bottom: 80px; }
}

/* Checkout */
.steps { display: flex; gap: 0; margin-bottom: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.steps div { flex: 1; padding: 11px 16px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; border-right: 1px solid var(--line-2); }
.steps div:last-child { border-right: 0; }
.steps div b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--canvas); color: var(--muted); font-size: 12px; }
.steps div.on { color: var(--navy); font-weight: 600; }
.steps div.on b { background: var(--orange); color: #fff; }
.steps div.done b { background: var(--yellow); color: var(--navy); }
.pay-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.pay-opt { position: relative; }
.pay-opt input { position: absolute; opacity: 0; }
.pay-opt span { display: block; border: 1px solid #D9D1CA; border-radius: var(--r-lg); padding: 12px 14px; cursor: pointer; background: var(--paper); }
.pay-opt span strong { display: block; color: var(--navy); }
.pay-opt span small { color: var(--muted); }
.pay-opt input:checked + span { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); background: #FFFBF8; }
.pay-opt input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.rnc-card { border: 1px solid #F1C0BA; background: #FFFAF9; border-radius: var(--r-lg); padding: 14px; margin-bottom: 10px; }
.rnc-card .rnc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.drop { display: block; border: 1.5px dashed #D6C6BA; border-radius: var(--r-lg); padding: 18px; text-align: center; color: var(--muted); background: #FCFBFA; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-d); }
.pending-files { margin-top: 8px; }
.pending-files .file-row select { width: auto; min-height: 32px; padding: 4px 8px; font-size: 12.5px; }
.success-screen { max-width: 560px; margin: 40px auto; text-align: center; }
.success-screen .seal { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin: 0 auto 18px; }
.success-screen .seal .ico { width: 36px; height: 36px; stroke-width: 2.4; }
.success-screen h1 { font-size: 26px; }
.success-screen .num { font-size: 40px; font-weight: 750; color: var(--navy); letter-spacing: -.02em; margin: 10px 0 4px; }

/* Portal home */
.unit-hero { background: var(--orange); color: #fff; border-radius: var(--r-lg); padding: 22px 24px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; position: relative; overflow: hidden; }
.unit-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; border: 28px solid var(--yellow); }
.unit-hero > div { position: relative; z-index: 1; }
.unit-hero h1 { color: #fff; font-size: 26px; }
.unit-hero .when { color: #FFE6D6; font-size: 13.5px; margin-top: 4px; }
.unit-hero .facts { display: flex; gap: 28px; margin-top: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.unit-hero .facts div { font-size: 12.5px; color: #FFDCC7; }
.unit-hero .facts strong { display: block; color: #fff; font-size: 15px; font-weight: 600; margin-top: 2px; }
.unit-hero .cta { position: relative; z-index: 1; }
@media (max-width: 720px) { .unit-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; } .unit-hero::after { width: 120px; height: 120px; border-width: 18px; right: -50px; top: -50px; } .unit-hero .cta .btn { width: 100%; } }
.ann { border-left: 4px solid var(--info); }
.ann.warning { border-left-color: #F2A20C; }
.ann.critical { border-left-color: var(--bad); }
.mini-bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding-top: 10px; }
.mini-bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: 11.5px; color: var(--muted); }
.mini-bars i { width: 100%; max-width: 46px; background: var(--navy-3); border-radius: 4px 4px 0 0; min-height: 2px; }
.mini-bars div:last-child i { background: var(--orange); }
.mini-bars div:last-child span:first-child { color: var(--orange-d); font-weight: 650; }

/* Gráficos SVG */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font: 11px var(--font); fill: var(--muted); }
.chart .grid-l { stroke: var(--line-2); }
.chart .bar { fill: var(--navy-3); }
.chart .bar:hover { fill: var(--orange); }
.chart .line { fill: none; stroke: var(--orange); stroke-width: 2.4; }
.chart .line2 { fill: none; stroke: var(--yellow-d); stroke-width: 1.6; stroke-dasharray: 4 3; }
.chart .pt { fill: var(--paper); stroke: var(--orange); stroke-width: 2; }
.hbars { display: grid; gap: 9px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; font-size: 13px; }
.hbar .track { height: 10px; background: #F3EEEA; border-radius: 6px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 6px; }
.hbar span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Logística */
.group-head td { background: var(--yellow-soft) !important; font-weight: 650; color: var(--navy); font-size: 13px; }
.bulk-bar { position: sticky; bottom: 12px; margin-top: 12px; background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 10px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow-pop); z-index: 20; }
.bulk-bar select { width: auto; min-height: 34px; }
.op-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
.op-card + .op-card { margin-top: 12px; }
.op-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.op-steps { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line-2); background: #FBFCFD; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.sched { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sched-day { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); display: flex; flex-direction: column; }
.sched-day header { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-weight: 650; color: var(--navy); }
.sched-day .list { padding: 10px; display: flex; flex-wrap: wrap; gap: 6px; flex: 1; align-content: flex-start; min-height: 80px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--canvas); border: 1px solid var(--line); border-radius: 14px; padding: 3px 4px 3px 10px; font-size: 12.5px; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.chip button:hover { background: #E1E6EE; color: var(--bad); }
.sched-day footer { padding: 8px 10px; border-top: 1px solid var(--line-2); display: flex; gap: 6px; }
.sched-day footer select { min-height: 32px; padding: 4px 8px; font-size: 12.5px; }

/* Permissões */
.perm-mod { border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 10px; }
.perm-mod header { padding: 9px 14px; background: #FBFCFD; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; border-radius: var(--r-lg) var(--r-lg) 0 0; font-weight: 650; color: var(--navy); font-size: 13.5px; }
.perm-mod .perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; padding: 10px 14px; }
.perm-tri { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.perm-tri select { width: auto; min-height: 30px; padding: 2px 6px; font-size: 12.5px; }

/* Calendário */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; font-size: 12.5px; }
.cal .wd { text-align: center; color: var(--muted); font-weight: 600; padding: 4px 0; }
.cal .d { min-width: 0; overflow: hidden; border: 1px solid var(--line-2); border-radius: 6px; min-height: 62px; padding: 5px 6px; background: var(--paper); }
.cal .d .n { font-weight: 650; color: var(--ink-2); }
.cal .d.today { border-color: var(--orange); }
.cal .d.closed { background: #F7F8FA; color: var(--faint); }
.cal .d .tg { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; margin-top: 3px; border-radius: 3px; padding: 0 4px; }
.cal .tg.ord { background: var(--ok-bg); color: var(--ok); }
.cal .tg.del { background: var(--info-bg); color: var(--info); }
.cal .tg.hol { background: var(--bad-bg); color: var(--bad); }

/* Mapa de separação por loja (tela) */
table.mapa { border-collapse: collapse; font-size: 13px; width: max-content; min-width: 100%; }
.mapa th, .mapa td { border: 1px solid #B9AAA0; padding: 4px 6px; text-align: center; }
.mapa { border: 2px solid var(--navy); }
.mapa thead th { border-bottom: 2px solid var(--navy); }
.mapa .mc-tot, .mapa td.mc-tot { border-left: 2px solid var(--navy); }
.mapa thead th.mc-store:first-of-type, .mapa td.mc-name + td { border-left: 2px solid var(--navy); }
.mapa thead th { background: #F6EEE8; color: var(--navy); vertical-align: bottom; position: sticky; top: 0; z-index: 2; }
.mapa .mc-code { text-align: left; color: var(--muted); width: 48px; position: sticky; left: 0; background: var(--paper); z-index: 1; }
.mapa .mc-name { text-align: left; font-weight: 650; color: var(--ink); min-width: 190px; position: sticky; left: 48px; background: var(--paper); z-index: 1; }
.mapa thead .mc-code, .mapa thead .mc-name { background: #F6EEE8; z-index: 3; }
.mapa .mc-name span { float: right; font-weight: 400; font-size: 11px; color: var(--faint); margin-left: 8px; }
.mapa .mc-store { width: 52px; min-width: 52px; height: 150px; padding: 6px 2px; }
.mapa .mc-store div { writing-mode: vertical-rl; transform: rotate(180deg); display: flex; flex-direction: column; gap: 1px; align-items: flex-start; margin: 0 auto; height: 140px; }
.mapa .mc-store strong { font-size: 12px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapa .mc-store span { font-size: 10.5px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.mapa .mc-store em { font-style: normal; font-size: 9.5px; font-weight: 700; color: #fff; background: var(--bad); border-radius: 3px; padding: 2px 1px; }
.mapa tbody td b, .mapa tfoot td b { display: block; font-size: 14px; line-height: 1.1; }
.mapa td small { display: block; font-size: 10px; color: var(--faint); line-height: 1.1; }
.mapa tbody tr:nth-child(even) td:not(.mc-tot):not(.mc-uni) { background: #FCFAF8; }
.mapa tbody tr:hover td { background: var(--yellow-soft) !important; }
.mapa tr.mc-cat td { border-top: 2px solid var(--navy); }
.mapa .mc-tot, .mapa .mc-uni { background: #FFF6CC; font-weight: 700; color: var(--navy); min-width: 64px; }
.mapa td.mc-rnc { background: #FDE2DF !important; position: relative; }
.mapa td .mc-r { position: absolute; top: 1px; right: 3px; font-style: normal; font-size: 9px; font-weight: 800; color: #B42318; line-height: 1; }
.mapa tfoot td { background: var(--navy); color: #fff; font-weight: 700; }
.mapa tfoot td b { color: var(--yellow); }
.mapa tfoot td small { color: #E8D9CF; }
.mapa tfoot td:first-child { text-align: left; position: sticky; left: 0; background: var(--navy); }
.mapa tfoot .mc-tot, .mapa tfoot .mc-uni { background: var(--navy); color: var(--yellow); }

/* ---------- Impressão (A4) ---------- */
.print-only { display: none; }
.doc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 32px; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--orange); padding-bottom: 12px; margin-bottom: 16px; gap: 16px; }
.doc-head .co { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.doc-head .tt { text-align: right; }
.doc-head .tt h1 { font-size: 18px; }
.doc-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.doc-facts div { background: #FFF6EE; border-radius: 6px; padding: 8px 12px; font-size: 12px; color: var(--muted); }
.doc-facts strong { display: block; font-size: 18px; color: var(--navy); }
.doc h2.band { background: var(--orange); color: #fff; padding: 7px 12px; border-radius: 4px; font-size: 13.5px; margin: 18px 0 8px; display: flex; justify-content: space-between; }
.doc h2.band.or { background: var(--yellow); color: var(--navy); }
.doc table.dt th { background: #F6EEE8; color: var(--navy); }
.doc table.dt td, .doc table.dt th { padding: 6px 10px; font-size: 12.5px; }
.doc .rnc-row td { background: var(--bad-bg); }
.doc .unit-block { break-inside: avoid; }
.doc .signs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 44px; font-size: 12px; color: var(--muted); }
.doc .signs div { border-top: 1px solid #9C8E84; padding-top: 4px; }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11pt; }
  .sidebar, .topbar, .no-print, .toasts, .page-actions, .tabs, .bulk-bar, .cart-bar, .toolbar { display: none !important; }
  .shell { display: block; }
  #view { padding: 0; max-width: none; }
  .panel, .doc { border: 0; padding: 0; border-radius: 0; }
  .print-only { display: block; }
  .doc h2.band, .doc-facts div, .dt th, .badge, .doc .rnc-row td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dt th { position: static; }
  a { color: inherit; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Ambiente de teste */
.demo-bar { background: var(--yellow); color: var(--navy); font-size: 12.5px; font-weight: 600; padding: 6px 16px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center; }
.demo-bar .ico { width: 16px; height: 16px; }
.demo-logins { margin-top: 22px; border: 1px dashed #E9D58A; background: var(--yellow-soft); border-radius: var(--r-lg); padding: 12px 14px; font-size: 13px; }
.demo-logins strong { display: block; color: var(--navy); margin-bottom: 6px; }
.demo-logins button { display: flex; width: 100%; justify-content: space-between; gap: 10px; border: 0; background: none; font: inherit; color: var(--ink); padding: 5px 6px; border-radius: 4px; cursor: pointer; text-align: left; }
.demo-logins button:hover { background: #FFEFB0; }
.demo-logins button span:last-child { color: var(--muted); font-size: 12px; }
@media print { .demo-bar { display: none !important; } }

/* ---------- RNC ---------- */
.kpis-3 { margin-bottom: 14px; }
button.kpi { font: inherit; text-align: left; background: var(--paper); border-top: 0; border-left: 0; cursor: pointer; }
.kpi.k-warn .k-val { color: var(--warn); }
.kpi.k-bad .k-val { color: var(--bad); }
.dt tr.row-bad td { background: #FFF6F5; }
.dt tr.row-warn td { background: #FFFBEF; }
.bad-t { color: var(--bad); font-weight: 600; }
.timeline li:not(.done)::before { background: #D6CEC8; box-shadow: 0 0 0 3px var(--line-2); }
.timeline li small { display: block; font-size: 12px; color: var(--muted); }
.rnc-form { max-width: 720px; }
.form-stack { display: grid; gap: 20px; }
.form-stack > .field > label { font-size: 14px; font-weight: 650; color: var(--navy); }
.stepper.big { grid-template-columns: 56px 110px 56px; height: 52px; width: max-content; }
.stepper.big input { font-size: 20px; }
.chip-radio { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio label { cursor: pointer; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid #D9D1CA; border-radius: 999px; background: var(--paper); font-weight: 550; color: var(--ink-2); }
.chip-radio input:checked + span { background: var(--orange); border-color: var(--orange); color: #fff; }
.chip-radio input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo-grid:empty { display: none; }
.photo-grid.view { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ph-item { position: relative; display: block; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--canvas); border: 1px solid var(--line); padding: 0; cursor: pointer; }
.ph-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-pdf { display: grid; place-items: center; height: 100%; font-weight: 700; color: var(--bad); }
.ph-rm { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(42, 29, 22, .75); color: #fff; display: grid; place-items: center; cursor: pointer; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sticky-submit { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--canvas) 70%, transparent); z-index: 5; }
.rnc-line { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.rnc-line:last-child { border-bottom: 0; }
.rnc-line small { display: block; color: var(--muted); font-size: 12.5px; }
.rnc-ride { border-color: #BFE3CD; }
.rnc-ride .panel-head h2 { color: var(--ok); display: flex; gap: 6px; align-items: center; }
.ride-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 6px 0; }
.ride-row .num { font-weight: 700; color: var(--ok); }
.sep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 14px; margin-bottom: 14px; }
.sep-grid .panel { margin: 0; }
.band-y { background: var(--yellow); }
.band-y h2 { color: var(--navy); }
@media print { .sep-grid { display: block; } .sep-store { break-inside: avoid; margin-bottom: 12px !important; } }

/* ---------- Tabelas no celular: filtros recolhíveis e linhas em cartões ---------- */
.m-filters > summary { display: none; }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .m-filters > summary { display: flex; align-items: center; gap: 6px; padding: 12px 16px; font-weight: 600; color: var(--ink-2); cursor: pointer; border-bottom: 1px solid var(--line); list-style: none; }
  .m-filters > summary::-webkit-details-marker { display: none; }
  .m-filters .toolbar { display: grid; grid-template-columns: 1fr 1fr; border-radius: 0; }
  .m-filters .toolbar .field { min-width: 0; }
  .m-filters .toolbar .field:first-child { grid-column: 1 / -1; }
  .kpis-3 .kpi { padding: 10px 12px; }
  .kpis-3 .kpi .k-label { font-size: 11.5px; line-height: 1.25; }
  .m-cards .table-wrap { overflow: visible; }
  .m-cards table.dt, .m-cards .dt tbody { display: block; }
  .m-cards .dt thead { display: none; }
  .m-cards .dt tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .m-cards .dt tbody tr td { display: block; padding: 0; border: 0; text-align: left !important; min-width: 0; background: none !important; }
  .m-cards .dt tbody tr td:first-child { grid-column: 1 / -1; font-size: 15px; }
  .m-cards .dt tbody tr td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
  .m-cards .dt tbody tr td:first-child::before, .m-cards .dt tbody tr td[data-label=""]::before { display: none; }
  .m-cards .dt tbody tr.row-bad { background: #FFF6F5; } .m-cards .dt tbody tr.row-warn { background: #FFFBEF; }
  .m-cards .dt tbody tr.loading-row, .m-cards .dt tbody tr:has(.empty) { display: block; }
  .m-cards .dt tbody tr input[type=checkbox] { width: 22px; height: 22px; }
}

/* ---------- App no celular: instalar, atalhos e barra inferior ---------- */
.install-card { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 10px; align-items: center; margin-top: 12px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: var(--r-lg); }
.install-card img { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); }
.install-card strong { display: block; color: var(--navy); font-size: 14px; }
.install-card span { display: block; font-size: 12.5px; color: var(--muted); }
.install-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.install-head img { width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--line); }
.install-head span { display: block; }
.install-steps { margin: 6px 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--canvas); font-weight: 700; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.qa { display: flex; align-items: center; gap: 10px; padding: 14px; min-height: 64px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--navy); font: inherit; font-weight: 650; text-align: left; text-decoration: none; cursor: pointer; }
.qa .ico { width: 24px; height: 24px; color: var(--orange); flex: none; }
.qa small { display: block; font-weight: 450; font-size: 12px; color: var(--muted); }
.qa:hover { border-color: var(--orange); }
.qa-main { background: var(--orange); border-color: var(--orange); color: #fff; }
.qa-main .ico { color: #fff; }
.bottom-nav { display: none; }
@media (max-width: 820px) {
  .has-bnav .main { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .bottom-nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(58, 36, 24, .06); }
  .bottom-nav a, .bottom-nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 60px; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; cursor: pointer; }
  .bottom-nav .ico { width: 23px; height: 23px; }
  .bottom-nav .on { color: var(--orange); }
  .bottom-nav .bn-main .ico { color: #fff; background: var(--orange); border-radius: 50%; padding: 7px; width: 38px; height: 38px; margin-top: -14px; box-shadow: 0 4px 10px rgba(255, 83, 10, .35); }
  .bottom-nav .bn-count { position: absolute; top: 4px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--navy); color: #fff; font-size: 10.5px; display: grid; place-items: center; }
  .bottom-nav .bn-count:empty { display: none; }
  .has-bnav .sticky-submit { bottom: calc(60px + env(safe-area-inset-bottom)); }
  .has-bnav .toast-host, .has-bnav .toasts { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 820px) {
  .has-bnav .cart-bar { bottom: calc(60px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  .has-bnav .order-page { padding-bottom: 140px; }
  .has-bnav .sidebar { z-index: 60; }
  .shell.has-bnav.nav-open::after { z-index: 55; }
}

/* Catálogo no celular: lista compacta (foto pequena, nome, preço e quantidade na mesma linha) */
@media (max-width: 720px) {
  .products { grid-template-columns: minmax(0, 1fr); gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
  .prod { display: grid; grid-template-columns: 58px minmax(0, 1fr) 128px; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; }
  .prod:last-child { border-bottom: 0; }
  .prod.in-cart { box-shadow: inset 4px 0 0 var(--orange); border-color: var(--line-2); background: #FFFAF6; }
  .prod .ph { width: 58px; height: 58px; aspect-ratio: auto; border-radius: 8px; }
  .prod .ph .ico { width: 22px; height: 22px; }
  .prod .info { padding: 0; }
  .prod .code { font-size: 11px; }
  .prod .name { font-size: 14px; margin: 0 0 2px; }
  .prod .desc { display: none; }
  .prod .price { font-size: 14px; margin-top: 0; }
  .prod .info .small { font-size: 11px; }
  .prod .foot { padding: 0; }
  .prod .stepper { height: 40px; grid-template-columns: 38px 1fr 38px; }
  .prod .add { min-height: 40px; padding: 6px 8px; }
  .prod .unavail { font-size: 11.5px; padding: 0; }
  .cat-section h2 { position: sticky; top: 58px; z-index: 3; background: var(--canvas); padding: 8px 0; margin: 0; }
  .unit-hero .cta { display: none; }
}
body:has(.has-bnav) .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (max-width: 820px) { body:has(.has-bnav .cart-bar) .toasts, body:has(.order-page) .toasts { bottom: calc(140px + env(safe-area-inset-bottom)); } }
@media (min-width: 821px) { body:has(.has-bnav) .toasts { bottom: 18px; } }
@media (max-width: 1100px) {
  .comanda-wrap.checkout-side { position: static !important; transform: none !important; inset: auto !important; z-index: auto; }
  .checkout-side .comanda { border-radius: var(--r-lg); max-height: none; }
}
@media (max-width: 720px) {
  .dt-checkout th:nth-child(1), .dt-checkout td:nth-child(1), .dt-checkout th:nth-child(4), .dt-checkout td:nth-child(4) { display: none; }
  .dt-checkout tfoot td[colspan] { display: table-cell !important; }
}
.t-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.t-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }

/* ---------- App do motorista ---------- */
.btn.xl { min-height: 60px; font-size: 18px; border-radius: 12px; }
.drv-hello { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; font-size: 18px; }
.drv-h { font-size: 16px; margin: 18px 0 10px; color: var(--navy); }
.drv-op { display: block; padding: 14px 16px; margin-bottom: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; }
.drv-op.live { border-color: var(--orange); box-shadow: inset 4px 0 0 var(--orange); }
.drv-op-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px; }
.drv-op-meta { font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.drv-prog { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.drv-prog.lg { height: 10px; border-radius: 5px; }
.drv-prog i { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.drv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 6px 0 12px; }
.drv-head h1 { margin: 0; font-size: 22px; }
.drv-stops { display: grid; gap: 12px; margin-top: 12px; }
.stop { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; }
.stop.done { background: #F6FBF8; border-color: #BFE3CD; }
.stop header { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; }
.stop header strong { font-size: 16px; color: var(--navy); display: block; }
.stop header small { display: block; color: var(--muted); font-size: 12.5px; }
.stop-n { width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 750; }
.stop.done .stop-n { background: var(--ok); }
.stop-addr { margin: 10px 0 8px; font-size: 14px; }
.stop-addr small { display: block; color: var(--muted); font-size: 12.5px; }
.stop-links { display: flex; flex-wrap: wrap; gap: 6px; }
.stop-items { margin-top: 10px; border-top: 1px solid var(--line-2); padding-top: 8px; }
.stop-items > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line-2); font-size: 14px; }
.stop-items > div.rnc { color: var(--bad); font-weight: 600; }
.stop-done { margin-top: 10px; font-size: 13.5px; color: var(--ok); display: flex; gap: 6px; align-items: center; }
.stop-occ { margin-top: 8px; display: flex; gap: 6px; font-size: 13.5px; color: var(--bad); background: var(--bad-bg); border-radius: var(--r); padding: 8px 10px; }
.stop-occ small { display: block; color: var(--muted); }
.stop-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 12px; }

/* ---------- Entrega: termo de recebimento e assinatura ---------- */
.dlv-foot { display: flex; justify-content: space-between; gap: 8px; width: 100%; }
.dlv-steps { display: flex; gap: 6px; margin-bottom: 14px; }
.dlv-steps span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dlv-steps b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--muted); font-size: 12px; }
.dlv-steps .on b { background: var(--orange); color: #fff; } .dlv-steps .on { color: var(--navy); }
.dlv-steps .done b { background: var(--ok); color: #fff; }
.dlv-hint { display: flex; gap: 6px; align-items: center; background: var(--yellow-soft); border-radius: var(--r); padding: 8px 10px; font-size: 13px; margin: 0 0 10px; }
.dlv-title { font-size: 15px; margin: 4px 0 10px; color: var(--navy); }
.dlv-qs { display: grid; gap: 10px; margin-bottom: 14px; }
.dlv-q { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; background: var(--paper); }
.dlv-q.yes { border-color: #BFE3CD; background: #F6FBF8; } .dlv-q.no { border-color: #F1C0BA; background: #FFF6F5; }
.dlv-q p { margin: 0 0 8px; font-size: 14px; line-height: 1.35; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.yn button { min-height: 46px; border-radius: 10px; border: 1px solid #D9D1CA; background: var(--paper); font: inherit; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--ink-2); }
.yn button.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.yn button.no.on { background: var(--bad); border-color: var(--bad); }
.dlv-decl { font-size: 13.5px; background: var(--canvas); border-radius: var(--r); padding: 10px 12px; line-height: 1.45; }
.sig-wrap { position: relative; border: 2px dashed #CDBFB5; border-radius: 12px; background: #fff; height: 210px; touch-action: none; }
.sig-wrap.signed { border-style: solid; border-color: var(--orange); }
.sig-wrap canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.sig-ph { position: absolute; left: 0; right: 0; bottom: 46px; text-align: center; color: #C9BDB4; pointer-events: none; font-size: 15px; border-top: 1px solid #E6DED8; margin: 0 24px; padding-top: 6px; }
.sig-wrap.signed .sig-ph { color: transparent; }
.sig-wrap #sclr { position: absolute; top: 6px; right: 6px; }
.dlv-sum { display: flex; gap: 6px; align-items: center; font-size: 13.5px; background: var(--ok-bg); color: var(--ok); border-radius: var(--r); padding: 8px 10px; }
.stop-done { flex-wrap: wrap; } .stop-done span { flex: 1; } .stop-done.issue { color: var(--bad); }
@media (max-width: 600px) { .dlv-modal .modal { max-height: 100dvh; } }
.doc-logo { height: 44px; width: auto; display: block; }
.side-logo { height: 26px; width: auto; vertical-align: middle; margin-right: 6px; }
.install-logo { height: 30px; width: auto; display: block; margin-bottom: 2px; }
.login-side .tagline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
