/* Booker Checklist — tokens da marca Booker (tema claro) */
:root {
  --brand-yellow: #FFD500;
  --brand-orange: #E59230;
  --graphite-700: #3F3F41;
  --graphite-800: #3E3E40;
  --graphite-900: #373739;
  --surface: #FAFAF7;
  --surface-raised: #FFFFFF;
  --surface-sunken: #F1F0EB;
  --ink: #373739;
  --ink-muted: #6B6B6E;
  --ink-faint: #8E8E91;
  --on-yellow: #373739;
  --accent-text: #9A5A0B;
  --yellow-soft: #FFF6CC;
  --line: #E4E2DA;
  --line-strong: #D3D0C5;
  --success: #2E7D4F;
  --success-soft: #E6F3EB;
  --danger: #B3261E;
  --danger-soft: #FBE9E7;
  --warning-soft: #FFF4D6;
  --focus: #E5A800;

  --font-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-sheet: Calibri, Carlito, "Segoe UI", Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 2px rgba(55,55,57,.06), 0 4px 16px rgba(55,55,57,.06);
  --shadow-pop: 0 2px 6px rgba(55,55,57,.08), 0 12px 32px rgba(55,55,57,.16);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --header-h: 56px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 14px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.muted { color: var(--ink-muted); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ header */
.app-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 20px;
  background: var(--graphite-900);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { height: 26px; display: block; }
.brand-sep { width: 1px; height: 22px; background: rgba(255,255,255,.18); }
.brand-app { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .01em; color: #fff; }
.nav-tabs { display: flex; align-items: stretch; height: 100%; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 0 14px; text-decoration: none; white-space: nowrap;
  color: rgba(255,255,255,.72); font-weight: 500;
  transition: color 150ms ease;
}
.nav-tab .icon { opacity: .8; }
.nav-tab::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--brand-yellow);
  transform: scaleX(0); transition: transform 200ms var(--ease-out);
}
.nav-tab[aria-current="page"] { color: #fff; }
.nav-tab[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .nav-tab:hover { color: #fff; } }

.user-menu { position: relative; flex: none; }
.user-btn {
  display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px;
  background: transparent; border: 0; border-radius: 999px; cursor: pointer; color: #fff;
  transition: background-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .user-btn:hover { background: rgba(255,255,255,.08); } }
.avatar {
  width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  background: var(--brand-yellow); color: var(--on-yellow); font: 600 12.5px var(--font-display);
}
.user-meta { text-align: left; line-height: 1.2; }
.user-meta b { display: block; font-weight: 500; font-size: 13px; }
.user-meta span { font-size: 11.5px; color: rgba(255,255,255,.6); }

/* ------------------------------------------------------------------ layout */
.page { max-width: 1440px; margin: 0 auto; padding: 28px 24px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 26px; line-height: 32px; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--ink-muted); }
.eyebrow { font: 500 11.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }

.subtabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-sunken); border-radius: 12px;
  overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; width: max-content; max-width: 100%; }
.subtabs::-webkit-scrollbar { display: none; }
.subtab { padding: 7px 14px; border-radius: 9px; text-decoration: none; color: var(--ink-muted); font-weight: 500; white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease; }
.subtab[aria-current="page"] { background: var(--surface-raised); color: var(--ink); box-shadow: 0 1px 2px rgba(55,55,57,.08); }
@media (hover: hover) and (pointer: fine) { .subtab:not([aria-current]):hover { color: var(--ink); } }

.card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-head h2 { font-size: 16px; font-weight: 600; }
.card-head .muted { font-size: 12.5px; }

/* ------------------------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-md);
  border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink);
  font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) { .btn:hover:not(:disabled) { border-color: #BDB9AC; background: #FCFCFA; } }
.btn-primary { background: var(--brand-yellow); border-color: var(--brand-yellow); color: var(--on-yellow); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover:not(:disabled) { background: #FFCC00; border-color: #FFCC00; } }
.btn-dark { background: var(--graphite-900); border-color: var(--graphite-900); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn-dark:hover:not(:disabled) { background: var(--graphite-700); border-color: var(--graphite-700); } }
.btn-danger { color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover:not(:disabled) { background: var(--surface-sunken); border-color: transparent; } }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 34px; padding: 0; height: 34px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-weight: 600; font-size: 13.5px; }
.field .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--surface-raised);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
.select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236B6B6E' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input::placeholder, .textarea::placeholder { color: #9C9CA0; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(255,213,0,.35); }
.field.has-error .input, .field.has-error .select { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 12.5px; }
.field-hint { color: var(--ink-muted); font-size: 12.5px; }
.input-color { display: flex; gap: 8px; align-items: center; }
.input-color input[type=color] { width: 40px; height: 40px; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: #fff; cursor: pointer; flex: none; }
.input-color .input { font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; }

.search { position: relative; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }
.search .input { padding-left: 38px; border-radius: 999px; background: var(--surface-raised); }

/* toggle (como no cadastro de referência) */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { width: 40px; height: 24px; border-radius: 999px; background: #CFCCC2; position: relative; flex: none;
  transition: background-color 200ms ease; }
.toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform 200ms var(--ease-out); }
.toggle input:checked + .toggle-track { background: #F5A700; }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--focus); outline-offset: 2px; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-off { background: var(--surface-sunken); color: var(--ink-muted); }
.badge-warn { background: var(--warning-soft); color: var(--accent-text); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.status-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 5px;
  font: 700 12px var(--font-sheet); white-space: nowrap; }
.swatch { width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0,0,0,.12); display: inline-block; vertical-align: middle; }

/* ------------------------------------------------------------------ tabela padrão */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 500 11.5px var(--font-mono); text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-muted); padding: 10px 16px; border-bottom: 1px solid var(--line); background: #FCFCFA; white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; }
.table tbody tr { transition: background-color 120ms ease; }
@media (hover: hover) and (pointer: fine) { .table tbody tr.clickable:hover { background: #FCFBF6; cursor: pointer; } }
.table .actions { text-align: right; white-space: nowrap; width: 1%; }
.cell-strong { font-weight: 600; }
.cell-logo { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-sunken) center/contain no-repeat; flex: none; }
.cell-with-logo { display: flex; align-items: center; gap: 10px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.toolbar .search { flex: 1 1 260px; max-width: 420px; }
.toolbar .select { width: auto; min-width: 160px; height: 38px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 13px; flex-wrap: wrap; }
.empty { padding: 48px 20px; text-align: center; color: var(--ink-muted); }
.empty b { display: block; color: var(--ink); font-family: var(--font-display); font-size: 16px; margin-bottom: 4px; }

.skeleton { background: linear-gradient(90deg, #F1F0EB 25%, #F7F6F2 50%, #F1F0EB 75%); background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite; border-radius: 6px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80; background: rgba(35,35,37,.42);
  display: grid; place-items: center; padding: 16px;
  opacity: 0; transition: opacity 200ms ease;
}
.modal-backdrop.open { opacity: 1; }
.modal {
  width: min(500px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--surface-raised); border-radius: 14px; box-shadow: var(--shadow-pop);
  transform: scale(0.96) translateY(6px); opacity: 0;
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
}
.modal-backdrop.open .modal { transform: none; opacity: 1; }
.modal-backdrop.closing { transition-duration: 140ms; }
.modal-backdrop.closing .modal { transition-duration: 140ms; transform: scale(0.98); opacity: 0; }
.modal-lg { width: min(720px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 24px 4px; }
.modal-head h2 { font-size: 19px; font-weight: 600; }
.modal-head p { margin: 4px 0 0; color: var(--ink-muted); font-size: 13.5px; }
.modal-close { margin: -6px -8px 0 0; color: var(--ink-muted); }
.modal-body { padding: 16px 24px 8px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.modal-body > *, .modal-body > [style*="contents"] > * { grid-column: span 6; }
.modal-body > .meia, .modal-body > [style*="contents"] > .meia { grid-column: span 3; }
.modal-body > .terco, .modal-body > [style*="contents"] > .terco { grid-column: span 2; }
.modal-body hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; }
@media (max-width: 560px) {
  .modal-body > .meia, .modal-body > .terco, .modal-body > [style*="contents"] > .meia, .modal-body > [style*="contents"] > .terco { grid-column: span 6; }
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal { border-radius: 16px 16px 0 0; width: 100%; max-height: 92dvh; transform: translateY(24px); }
}

.logo-field { display: flex; gap: 14px; align-items: center; }
.logo-box { width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-sunken) center/contain no-repeat;
  display: grid; place-items: center; color: var(--ink-faint); flex: none; }
.logo-box.has { background-color: #fff; }
.logo-box.has .icon { display: none; }

/* confirmação de status */
.confirm-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--warning-soft); color: var(--accent-text); flex: none; }
.confirm-head { display: flex; gap: 14px; align-items: flex-start; }
/* lote com Ctrl+clique */
.sel-chip { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; background: #373739; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.sel-chip span { opacity: .7; }
.lote-lista { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; max-height: 220px; overflow: auto; }
.lote-lista .mono { display: inline-block; min-width: 150px; }
.obrig { color: #C00000; font-weight: 600; }
.change-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #FCFCFA; display: grid; gap: 10px; }
.change-row { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; }
.change-row .k { color: var(--ink-muted); width: 74px; flex: none; font-size: 12.5px; }
.change-flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.change-flow .icon { color: var(--ink-faint); }
.kbd { font: 500 11px var(--font-mono); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--ink-muted); background: #fff; }

/* ------------------------------------------------------------------ toast */
.toasts { position: fixed; z-index: 120; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px;
  background: var(--graphite-900); color: #fff; border-radius: 12px; box-shadow: var(--shadow-pop);
  transition: transform 300ms var(--ease-out), opacity 300ms var(--ease-out);
}
@starting-style { .toast { transform: translateY(100%); opacity: 0; } }
.toast.leaving { transform: translateY(40%); opacity: 0; transition-duration: 180ms; }
.toast .icon { color: var(--brand-yellow); }
.toast.erro .icon { color: #FF8A80; }
.toast-msg { flex: 1; font-size: 13.5px; }
.toast-action { background: transparent; border: 0; color: var(--brand-yellow); font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 6px; }

/* ------------------------------------------------------------------ popover / menu */
.popover {
  position: fixed; z-index: 90; background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; min-width: 180px;
  transform-origin: var(--origin, top left);
  transition: transform 150ms var(--ease-out), opacity 150ms var(--ease-out);
}
.popover[data-entering] { transform: scale(0.97); opacity: 0; }
.popover[data-instant] { transition: none; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none;
  border-radius: 8px; text-align: left; cursor: pointer; font-size: 13.5px; text-decoration: none; }
.menu-item[aria-selected="true"], .menu-item.active { background: var(--surface-sunken); }
@media (hover: hover) and (pointer: fine) { .menu-item:hover { background: var(--surface-sunken); } }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-label { padding: 6px 10px 4px; font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); }

/* ------------------------------------------------------------------ dashboard */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.filters .select { width: auto; min-width: 170px; height: 38px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi-label { font: 500 11.5px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); }
.kpi-value { font: 700 32px/1.1 var(--font-display); margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi-sub { color: var(--ink-muted); font-size: 12.5px; margin-top: 4px; }
.kpi-hero { background: var(--graphite-900); color: #fff; border-color: var(--graphite-900); }
.kpi-hero .kpi-label, .kpi-hero .kpi-sub { color: rgba(255,255,255,.66); }
.kpi-hero > * { position: relative; z-index: 1; }
.kpi-hero::after { content: ""; position: absolute; right: -34px; bottom: -46px; width: 96px; height: 96px;
  background: linear-gradient(145deg, var(--brand-orange) 0 42%, transparent 42% 46%, var(--brand-yellow) 46%); border-radius: 18px; transform: rotate(-12deg); opacity: .9; z-index: 0; }
.meter { height: 8px; border-radius: 999px; background: rgba(255,255,255,.14); margin-top: 12px; overflow: hidden; position: relative; z-index: 1; width: 70%; }
.meter > span { display: block; height: 100%; background: var(--brand-yellow); border-radius: 999px; transform-origin: left; transition: transform 600ms var(--ease-out); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.dash-grid > .span-2 { grid-column: span 2; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bars { padding: 14px 20px 20px; display: grid; gap: 16px; }
.bar-row { display: grid; grid-template-columns: 180px 1fr 60px; gap: 14px; align-items: center; }
.bar-name { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.bar-name small { display: block; font-weight: 400; color: var(--ink-muted); font-size: 12px; }
.stack { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; background: var(--surface-sunken); }
.stack > span { height: 100%; min-width: 2px; position: relative; transition: filter 120ms ease; }
.stack > span:first-child { border-radius: 4px 0 0 4px; }
.stack > span:last-child { border-radius: 0 4px 4px 0; }
@media (hover: hover) and (pointer: fine) { .stack > span:hover { filter: brightness(1.15); } }
.bar-pct { text-align: right; font: 600 15px var(--font-display); font-variant-numeric: tabular-nums; }
.rank-bar { height: 6px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; width: 90px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.rank-bar span { display: block; height: 100%; background: var(--success); border-radius: 999px; }
.activity { list-style: none; margin: 0; padding: 6px 20px 16px; }
.activity li { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.activity li:last-child { border-bottom: 0; }
.activity .dot { width: 10px; height: 10px; border-radius: 3px; margin-top: 5px; }
.activity time { color: var(--ink-muted); font-size: 12px; }
/* dashboard do operador */
.minhas-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px;
  background: var(--graphite-900); color: #fff; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.minhas-chip i { width: 8px; height: 8px; border-radius: 9px; background: var(--brand-yellow); }
.minhas-chip span { font: 500 11px var(--font-mono); color: var(--brand-yellow); text-transform: uppercase; }
a.kpi { color: inherit; text-decoration: none; box-shadow: 0 0 0 2px var(--brand-yellow); transition: transform 160ms var(--ease-out); }
a.kpi:active { transform: scale(0.98); }
.kpi-link { margin-top: 8px; font-weight: 600; font-size: 13px; }
.atencao { list-style: none; margin: 0; padding: 0; }
.atencao li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.atencao li > div { flex: 1; min-width: 0; }
.atencao b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atencao small { color: var(--ink-muted); font-size: 12.5px; }
.atencao .btn { height: 32px; }
.tooltip { position: fixed; z-index: 100; pointer-events: none; background: var(--graphite-900); color: #fff; padding: 8px 10px; border-radius: 8px;
  font-size: 12.5px; box-shadow: var(--shadow-pop); transition: opacity 120ms ease; white-space: nowrap; }

@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; } .dash-grid > .span-2 { grid-column: auto; }
  .user-meta { display: none; }
  .brand-app, .brand-sep { display: none; }
}
@media (max-width: 640px) {
  .page { padding: 20px 16px 40px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis .kpi-hero { grid-column: span 2; }
  .bar-row { grid-template-columns: 1fr 52px; }
  .bar-row .stack { grid-column: span 2; order: 3; }
  .app-header { gap: 12px; padding: 0 12px; }
  .nav-tab { padding: 0 10px; }
  .nav-tab span { display: none; }
  .nav-tab .icon { width: 20px; height: 20px; }
  .page-head h1 { font-size: 22px; }
  .filters .select { flex: 1 1 140px; min-width: 0; }
}

/* ------------------------------------------------------------------ login */
.login { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); }
.login-art { position: relative; overflow: hidden; background: var(--graphite-900); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art img { height: 36px; align-self: flex-start; }
.login-art h1 { font-size: 44px; line-height: 1.08; font-weight: 700; max-width: 520px; letter-spacing: -.02em; position: relative; z-index: 1; }
.login-art h1 em { font-style: normal; color: var(--brand-yellow); }
.login-art p { color: rgba(255,255,255,.7); max-width: 440px; font-size: 15.5px; position: relative; z-index: 1; }
.login-fold { position: absolute; right: -120px; bottom: -120px; width: 460px; height: 460px; border-radius: 64px; transform: rotate(-14deg);
  background: linear-gradient(146deg, var(--brand-orange) 0 40%, var(--graphite-900) 40% 42.5%, var(--brand-yellow) 42.5%); opacity: .95; }
/* espaçador no lugar da antiga legenda de status: mantém o título no meio do painel */
.login-art::after { content: ""; height: 22px; }
.login-panel { display: grid; place-items: center; padding: 32px 24px; }
.login-box { width: min(380px, 100%); }
.login-box h2 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.login-box > p { color: var(--ink-muted); margin: 0 0 28px; }
.btn-ms { width: 100%; height: 48px; font-size: 15px; gap: 12px; border-color: #8C8C8C; border-radius: 10px; }
.ms-logo { width: 20px; height: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.ms-logo i:nth-child(1) { background: #F25022; } .ms-logo i:nth-child(2) { background: #7FBA00; }
.ms-logo i:nth-child(3) { background: #00A4EF; } .ms-logo i:nth-child(4) { background: #FFB900; }
.login-foot { margin-top: 28px; font-size: 12.5px; color: var(--ink-muted); }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.alert-erro { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--yellow-soft); color: var(--ink); }
.dev-login { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line-strong); display: grid; gap: 10px; }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 28px 24px 32px; min-height: 260px; gap: 28px; }
  .login-art h1 { font-size: 30px; }
  .login-fold { width: 280px; height: 280px; right: -100px; bottom: -110px; }
  .login-art::after { display: none; }
}

/* ------------------------------------------------------------------ erro */
.error-page { min-height: calc(100dvh - var(--header-h)); display: grid; place-items: center; text-align: center; padding: 24px; }
.error-page .code { font: 700 64px var(--font-display); color: var(--line-strong); }

@media (prefers-reduced-motion: reduce) {
  .modal, .toast, .popover, .nav-tab::after, .meter > span { transition-property: opacity !important; transform: none !important; }
  .skeleton { animation: none; }
}
.evo { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; padding: 18px 20px 20px; align-items: end; }
.evo-col { display: grid; justify-items: center; gap: 6px; }
.evo-val { font: 600 12.5px var(--font-display); font-variant-numeric: tabular-nums; min-height: 16px; }
.evo-track { width: 100%; max-width: 44px; height: 120px; background: var(--surface-sunken); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.evo-track span { display: block; width: 100%; background: #00B050; border-radius: 4px 4px 0 0; }
.evo-m { font: 500 11.5px var(--font-mono); text-transform: uppercase; color: var(--ink-muted); }
.evo-col.vazio .evo-track { background: repeating-linear-gradient(135deg, var(--surface-sunken) 0 6px, var(--surface) 6px 12px); }
.evo-col.atual .evo-m { color: var(--ink); font-weight: 600; }
.evo-col.atual .evo-track { box-shadow: 0 0 0 2px var(--brand-yellow); }
@media (max-width: 640px) { .evo { gap: 4px; padding: 14px 12px 16px; } .evo-val { font-size: 10px; } }

.sheet-page .toasts { bottom: 64px; }
@media (max-width: 640px) { .input, .select, .textarea { font-size: 16px; } }

/* situação com data + cadastro em lote */
.sit-aviso { margin: -8px 0 0; }
.sit-aviso:empty { display: none; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.timeline li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-muted); }
.lote-passos { margin: 0; padding: 0 0 0 20px; display: grid; gap: 12px; }
.lote-passos li { padding-left: 4px; }
.lote-passos li > span:first-child { margin-right: 10px; }
.lote-passos li .btn { vertical-align: middle; }
.lote-resumo { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.lote-tabela { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.lote-tabela .table td, .lote-tabela .table th { padding: 8px 12px; font-size: 13px; }
.lote-tabela td.mono, .lote-tabela .badge { white-space: nowrap; }
/* "Uberlândia, dd de mês de aaaa" só cabe ao lado dos menus a partir de ~1260px */
@media (max-width: 1259px) { .brand-app, .brand-sep { display: none; } }
.select-usuario { font-weight: 600; }
.select-usuario.on { background-color: var(--graphite-900); border-color: var(--graphite-900); color: #fff; }

/* Acessos: dados vindos da conta Microsoft e departamentos do usuário */
.ms-linha { font-size: 12px; color: var(--ink-muted); }
.ms-box { grid-column: 1 / -1; background: #F3F6FB; border: 1px solid #D6E0EE; border-radius: 10px; padding: 12px 14px; font-size: 13px; }
.ms-box > b { display: block; margin-bottom: 6px; }
.ms-box p { margin: 6px 0 0; color: var(--ink-muted); }
.dep-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.dep-chip { display: flex; gap: 6px; align-items: center; border: 1px solid var(--line-strong); background: var(--surface-raised); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.dep-chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; }
.dep-chip small { font-size: 11px; opacity: .8; }
.dep-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; cursor: default; }
.cart-x { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 0 0 4px; font-size: 12px; }
.cart-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cart-bar .select { width: auto; flex: 1 1 200px; }
.cart-lista { border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; max-height: 300px; overflow: auto; }
.cart-g { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; font-size: 12px; background: #FAFAF8; position: sticky; top: 0; border-bottom: 1px solid var(--line); }
.cart-g a { color: var(--ink); }
.cart-e { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; padding: 6px 10px; border-top: 1px solid #F0F0EC; font-size: 12.5px; cursor: pointer; }
.cart-e > span:last-child { font-size: 11.5px; text-align: right; }
.cart-modo { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }

/* Checklist: lista de responsável (gestor/admin) */
.rp-menu { width: 340px; max-width: calc(100vw - 32px); padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.rp-head { font-weight: 700; font-size: 13.5px; padding: 2px 4px 6px; }
.rp-head span { font-weight: 400; color: var(--ink-muted); }
.rp-busca { height: 34px; }
.rp-lista { max-height: 300px; overflow: auto; }
.rp-sec { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--ink-faint); padding: 8px 10px 2px; }
.rp-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.rp-item.on { background: #FFF6CC; }
@media (hover: hover) and (pointer: fine) { .rp-item:not(.on):hover { background: var(--surface-sunken); } }
.rp-item .avatar { width: 26px; height: 26px; font-size: 11px; flex: none; }
.rp-item .avatar.rp-terc { background: #E8E8E4; color: var(--ink); }
.rp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rp-txt b { font-size: 13px; }
.rp-txt small { font-size: 11.5px; color: var(--ink-muted); }
.rp-vazio { padding: 12px 10px; font-size: 12.5px; color: var(--ink-muted); }
.rp-prev { background: var(--surface-sunken); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; margin-top: 4px; }
.rp-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
