:root {
  --navy: #1b2119;
  --navy-2: #283023;
  --red: #b85f3f;
  --red-dark: #91472f;
  --ink: #292b25;
  --muted: #77796f;
  --line: #e4dfd3;
  --canvas: #f3efe6;
  --card: #fffdf8;
  --green: #4d7148;
  --green-bg: #edf3e9;
  --amber: #aa6f28;
  --amber-bg: #fbf0dc;
  --blue: #516d65;
  --blue-bg: #eaf0ec;
  --cream: #f8f4eb;
  --cream-2: #eee7da;
  --olive: #56654a;
  --olive-dark: #303a2b;
  --copper: #b85f3f;
  --gold: #c9964c;
  --shadow: 0 18px 50px rgba(48, 43, 33, .08);
  --shadow-soft: 0 8px 24px rgba(48, 43, 33, .055);
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: 246px;
  flex-direction: column;
  background: var(--navy);
  color: #fff;
  box-shadow: 8px 0 26px rgba(5, 23, 31, .09);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 27px 24px 22px; }
.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 13px;
  background: var(--red);
  font-family: "Manrope", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -2px;
}
.brand-mark span { color: #ffc4c4; }
.brand strong { display: block; font-family: "Manrope"; font-size: 15px; letter-spacing: -.3px; }
.brand > div:last-child span { display: block; margin-top: 2px; color: #91a9b4; font-size: 10px; font-weight: 700; letter-spacing: 1.6px; }
.demo-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 18px 17px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  color: #9db3bd;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .65px;
}
.demo-label span { width: 6px; height: 6px; border-radius: 50%; background: #ffba49; box-shadow: 0 0 0 4px rgba(255,186,73,.1); }
.nav { flex: 1; padding: 2px 12px; }
.nav-section { margin: 18px 13px 8px; color: #64808c; font-size: 9px; font-weight: 800; letter-spacing: 1.5px; }
.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  margin: 3px 0;
  padding: 11px 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #acc0c8;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: .18s ease;
}
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active { background: rgba(237,59,59,.14); color: #fff; }
.nav-item.active::before { position: absolute; left: -12px; width: 3px; height: 24px; border-radius: 0 4px 4px 0; background: var(--red); content: ""; }
.nav-item svg { width: 18px; height: 18px; stroke-width: 1.8; }
.nav-item b { margin-left: auto; padding: 2px 7px; border-radius: 12px; background: rgba(237,59,59,.22); color: #ff9d9d; font-size: 10px; }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin: 12px; padding: 14px 10px; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { display: grid; width: 35px; height: 35px; place-items: center; flex: 0 0 auto; border-radius: 10px; background: #2d4a57; font-size: 11px; font-weight: 700; }
.sidebar-footer strong { display: block; max-width: 110px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer span { color: #8199a3; font-size: 10px; }
.sidebar-footer .icon-button { margin-left: auto; color: #8ba1ab; }

.main-wrap { width: calc(100% - 246px); margin-left: 246px; }
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
}
.location-pill { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #20a873; box-shadow: 0 0 0 4px #dff5ed; }
.location-pill small { display: block; color: #879398; font-size: 8px; font-weight: 800; letter-spacing: 1.2px; }
.location-pill strong { display: block; margin-top: 1px; font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { position: relative; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink); }
.icon-button:hover { background: #edf1f0; }
.icon-button svg { width: 19px; height: 19px; }
.notification i { position: absolute; top: 5px; right: 5px; display: grid; width: 15px; height: 15px; place-items: center; border: 2px solid #fff; border-radius: 50%; background: var(--red); color: #fff; font-size: 7px; font-style: normal; font-weight: 700; }
.primary-button, .secondary-button, .danger-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
  transition: .18s ease;
}
.primary-button { background: var(--red); color: #fff; box-shadow: 0 5px 14px rgba(237,59,59,.18); }
.primary-button:hover { background: var(--red-dark); transform: translateY(-1px); }
.secondary-button { border-color: var(--line); background: #fff; color: var(--ink); }
.secondary-button:hover { background: #f5f7f6; }
.danger-button { border-color: #f3cccc; background: #fff3f3; color: #c62f34; }
.compact { min-height: 38px; padding: 9px 13px; font-size: 12px; }
.primary-button svg, .secondary-button svg { width: 16px; height: 16px; }
.menu-button { display: none; width: 38px; height: 38px; padding: 10px; border: 0; border-radius: 9px; background: transparent; }
.menu-button span { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--navy); }

main { max-width: 1540px; min-height: calc(100vh - 72px); margin: 0 auto; padding: 30px 34px 60px; outline: none; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.eyebrow { margin: 0 0 7px; color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: 1.5px; }
h1, h2, h3 { margin: 0; font-family: "Manrope", sans-serif; letter-spacing: -.55px; }
h1 { font-size: clamp(25px, 3vw, 33px); line-height: 1.1; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
.page-header p:not(.eyebrow), .subtle { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.period-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.period-controls > span { color: var(--muted); font-size: 12px; }
.period-controls input { min-width: 145px; }
.demo-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 6px; background: #fff2dd; color: #ad6515; font-size: 8px; font-weight: 800; letter-spacing: .65px; vertical-align: middle; }
.demo-chip::before { width: 5px; height: 5px; border-radius: 50%; background: #e29736; content: ""; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.finance-kpis { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:18px; }
.mini-kpis { display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:13px;margin-bottom:18px; }
.mini-kpis .kpi-card { min-height:112px; }
.large-total { display:block;margin:15px 0 8px;font-family:"Manrope",sans-serif;font-size:34px;letter-spacing:-1.5px; }
.sales-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }
.sales-overview { grid-template-columns:1.35fr .95fr; }
.family-mix>div { grid-template-columns:130px 1fr 48px; }
.sales-ranking { margin-bottom:20px;overflow:hidden; }
.sales-table-head { align-items:flex-end; }
.sales-controls { display:flex;align-items:center;gap:10px; }
.sales-tabs { margin:0; }
.compact-search { width:230px; }
.compact-search input { height:36px; }
.quality-note { display:block;margin-top:3px;color:#b5781c;font-size:8px;font-weight:700; }
.finance-layout { display:grid;grid-template-columns:1.55fr .85fr;gap:18px;margin-bottom:18px; }
.month-chart { display:flex;height:225px;align-items:flex-end;gap:10px;padding:20px 8px 0;border-bottom:1px solid var(--line); }
.month-col { position:relative;display:flex;height:100%;flex:1;align-items:center;justify-content:flex-end;flex-direction:column;gap:8px; }
.month-col strong { color:var(--muted);font-size:9px; }
.month-bar { z-index:1;width:min(34px,70%);min-height:3px;border-radius:7px 7px 2px 2px;background:#9fb8c2;transition:.25s ease; }
.month-bar.active { background:var(--red); }
.goal-mark { position:absolute;right:4px;left:4px;border-top:2px dashed #dda335; }
.chart-key { display:flex;gap:18px;margin-top:14px;color:var(--muted);font-size:9px; }
.chart-key span { display:flex;align-items:center;gap:6px; }
.chart-key i { display:block;width:12px;height:7px;border-radius:2px;background:#9fb8c2; }
.chart-key .key-goal { height:0;border-top:2px dashed #dda335;border-radius:0;background:transparent; }
.payment-list { display:grid;gap:14px;margin-top:8px; }
.payment-list>div { display:grid;grid-template-columns:75px 1fr 86px;align-items:center;gap:9px;font-size:9px; }
.payment-list strong { text-align:right; }
.payment-list .bar-fill { background:#2d7c91; }
.finance-daily { margin-bottom:20px; }
.negative { color:#d23a40; }
.kpi-card { position: relative; overflow: hidden; min-height: 126px; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.kpi-card::after { position: absolute; top: -18px; right: -16px; width: 74px; height: 74px; border-radius: 50%; background: var(--tint, #f1f4f3); content: ""; opacity: .8; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; font-weight: 700; }
.kpi-icon { position: relative; z-index: 1; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: var(--tint, #f1f4f3); color: var(--accent, var(--navy)); }
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-value { display: block; margin: 13px 0 3px; font-family: "Manrope"; font-size: 25px; font-weight: 800; letter-spacing: -1px; }
.kpi-note { color: var(--muted); font-size: 10px; }
.kpi-note strong { color: var(--accent, var(--green)); }

.dashboard-grid { display: grid; grid-template-columns: 1.5fr .9fr; gap: 18px; }
.card { border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: 0 1px 0 rgba(15,35,44,.02); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 13px; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.card-body { padding: 5px 20px 20px; }
.stack { display: grid; gap: 18px; }
.area-bars { display: grid; gap: 16px; margin-top: 7px; }
.area-row { display: grid; grid-template-columns: 91px 1fr 80px; align-items: center; gap: 12px; }
.area-name { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; }
.area-dot { width: 7px; height: 7px; border-radius: 50%; }
.bar-track { height: 8px; overflow: hidden; border-radius: 10px; background: #eef1f0; }
.bar-fill { height: 100%; border-radius: inherit; transition: width .5s ease; }
.area-value { font-size: 11px; font-weight: 700; text-align: right; }
.legend-row { display: flex; gap: 18px; margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.legend-row span { display: flex; align-items: center; gap: 6px; }
.legend-row i { width: 7px; height: 7px; border-radius: 50%; }
.alert-list { display: grid; gap: 9px; }
.alert-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: #f8faf9; }
.alert-symbol { display: grid; width: 31px; height: 31px; place-items: center; flex: 0 0 auto; border-radius: 8px; background: var(--tint); color: var(--accent); font-size: 13px; font-weight: 800; }
.alert-item strong { display: block; font-size: 10px; }
.alert-item span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.alert-item time { margin-left: auto; color: #9ba5a9; font-size: 8px; }
.mini-metric { display: flex; align-items: end; justify-content: space-between; padding: 4px 2px 12px; }
.mini-metric strong { font-family: "Manrope"; font-size: 24px; }
.mini-metric span { color: var(--muted); font-size: 9px; }
.spark-bars { display: flex; height: 48px; align-items: end; gap: 6px; }
.spark-bars span { flex: 1; min-width: 7px; border-radius: 4px 4px 1px 1px; background: #f2b2b2; }
.spark-bars span.active { background: var(--red); }

.toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.search-box { position: relative; flex: 1; max-width: 350px; }
.search-box svg { position: absolute; top: 50%; left: 13px; width: 16px; height: 16px; color: #849298; transform: translateY(-50%); }
.search-box input { width: 100%; height: 40px; padding: 0 14px 0 39px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fff; font-size: 11px; }
.search-box input:focus, select:focus, input:focus, textarea:focus { border-color: #8aa3ae !important; box-shadow: 0 0 0 3px rgba(19,68,90,.08); }
.filter-select { height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fff; color: var(--ink); font-size: 11px; }
.data-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f8faf9; color: #79878d; font-size: 9px; font-weight: 800; letter-spacing: .55px; text-align: left; white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid #edf0ef; font-size: 10px; vertical-align: middle; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfc; }
.item-cell { display: flex; align-items: center; gap: 10px; }
.item-thumb { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--bg, #edf3f1); color: var(--fg, #527064); font-size: 13px; font-weight: 800; }
.item-cell strong { display: block; font-size: 10px; }
.item-cell small { color: var(--muted); font-size: 8px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 20px; font-size: 8px; font-weight: 800; }
.badge::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.badge.ok { background: var(--green-bg); color: var(--green); }
.badge.low { background: var(--amber-bg); color: var(--amber); }
.badge.critical { background: #feeaea; color: #d03940; }
.badge.neutral { background: #edf2f3; color: #61757e; }
.delivery-filters { display: flex; flex-wrap: wrap; gap: 9px; margin: -2px 0 18px; }
.delivery-filters .filter-select { min-width: 150px; }
.driver-row { display: grid; grid-template-columns: auto 1fr auto; width: 100%; align-items: center; gap: 10px; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; }
.driver-row:last-child { border-bottom: 0; }
.driver-row:hover strong { color: var(--copper); }
.payment-list span small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.cash-account-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.cash-account-card { display: flex; min-height: 128px; flex-direction: column; justify-content: space-between; padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow-soft); }
.cash-account-card div { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cash-account-card span { color: var(--copper); font-size: 8px; font-weight: 800; letter-spacing: 1.1px; }
.cash-account-card small { color: var(--muted); font-size: 8px; text-align: right; }
.cash-account-card strong { margin: 15px 0 4px; color: var(--ink); font-family: "Playfair Display",serif; font-size: clamp(20px,2vw,29px); font-weight: 600; }
.cash-account-card em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 700; }
.cash-account-card.negative { border-color: rgba(184,95,63,.35); background: #fff5f1; }
.treasury-workspace { align-items: start; }
.denomination-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.denomination-grid label { display: grid; grid-template-columns: 1fr 64px; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); }
.denomination-grid label span { color: var(--muted); font-size: 9px; font-weight: 700; }
.denomination-grid input { width: 100%; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--ink); text-align: center; }
.cash-close-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.cash-close-preview div { padding: 14px; border-radius: 12px; background: var(--cream); }
.cash-close-preview span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.cash-close-preview strong { color: var(--ink); font-size: 18px; }
.cash-close-preview .critical-text { color: #a85039; }
.cash-close-preview .ok-text { color: #198c66; }
@media (max-width:1100px){.cash-account-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:640px){.cash-account-grid,.denomination-grid,.cash-close-preview{grid-template-columns:1fr;}}
.area-badge { padding: 5px 8px; border-radius: 6px; background: #edf2f3; color: #516871; font-size: 8px; font-weight: 700; }
.stock-value { font-weight: 800; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.row-actions button { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); }
.row-actions button:hover { border-color: #bfc9cc; color: var(--ink); }
.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.empty-state { padding: 50px 20px; color: var(--muted); font-size: 11px; text-align: center; }

.tabs { display: flex; gap: 4px; margin-bottom: 17px; padding: 4px; border-radius: 11px; background: #e9edeb; width: max-content; }
.tab { padding: 8px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(18,38,46,.08); }
.catalog-grid, .recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.catalog-card, .recipe-card { position: relative; overflow: hidden; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: .18s ease; }
.catalog-card:hover, .recipe-card:hover { border-color: #ccd4d2; transform: translateY(-2px); box-shadow: var(--shadow); }
.catalog-icon { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 18px; border-radius: 10px; background: var(--tint); color: var(--accent); font-size: 15px; font-weight: 800; }
.catalog-card h3, .recipe-card h3 { font-size: 13px; }
.catalog-card p, .recipe-card p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.catalog-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.catalog-meta strong { color: var(--ink); }
.recipe-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.recipe-price { margin: 19px 0 5px; font-family: "Manrope"; font-size: 22px; font-weight: 800; }
.recipe-cost-row { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.recipe-cost-row strong { color: var(--green); }

.workflow-bar { display: flex; align-items: center; margin-bottom: 18px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.workflow-step { display: flex; align-items: center; gap: 8px; color: #98a3a7; font-size: 9px; font-weight: 700; }
.workflow-step span { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid #d9dedd; border-radius: 50%; background: #fff; }
.workflow-step.active { color: var(--ink); }
.workflow-step.active span { border-color: var(--red); background: var(--red); color: #fff; }
.workflow-line { height: 1px; flex: 1; margin: 0 12px; background: #dfe4e2; }
.count-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--line); }
.count-stat { padding: 16px; background: #fff; }
.count-stat span { display: block; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .4px; }
.count-stat strong { display: block; margin-top: 6px; font-family: "Manrope"; font-size: 18px; }
.count-input { width: 84px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; outline: none; font-size: 10px; text-align: right; }
.difference { font-weight: 800; }
.difference.neg { color: #d23a40; }
.difference.pos { color: var(--green); }
.difference.zero { color: #7c898e; }
.sticky-save { position: sticky; z-index: 5; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; padding: 13px 16px; border: 1px solid #d7dedb; border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: 0 10px 30px rgba(9,29,38,.13); backdrop-filter: blur(12px); }
.sticky-save p { margin: 0; font-size: 10px; font-weight: 700; }
.sticky-save span { color: var(--muted); font-size: 9px; }

.modal-backdrop { position: fixed; z-index: 60; inset: 0; display: flex; visibility: hidden; align-items: center; justify-content: center; padding: 20px; background: rgba(5,21,28,.62); opacity: 0; transition: .2s ease; }
.modal-backdrop.open { visibility: visible; opacity: 1; }
.modal { position: relative; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; padding: 27px; border-radius: 17px; background: #fff; box-shadow: 0 20px 70px rgba(0,0,0,.25); transform: translateY(10px); transition: .2s ease; }
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-close { position: absolute; top: 14px; right: 14px; display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 8px; background: #f0f3f2; color: #6d7b81; font-size: 20px; }
.modal-kicker { margin: 0 0 6px; color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.modal h2 { padding-right: 32px; font-size: 20px; }
.modal-lead { margin: 6px 0 22px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-group { display: grid; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { color: #52646b; font-size: 9px; font-weight: 800; letter-spacing: .35px; }
.check-group { display: flex; gap: 18px; flex-wrap: wrap; padding-top: 8px; }
.check-group label { display: flex; align-items: center; gap: 8px; margin: 0; }
.check-group input { width: auto; }
.form-group input, .form-group select, .form-group textarea { width: 100%; min-height: 41px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; outline: none; background: #fff; font-size: 11px; }
.form-group textarea { min-height: 72px; resize: vertical; }
.form-help { color: #8d989c; font-size: 8px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.callout { display: flex; align-items: flex-start; gap: 10px; margin: 17px 0; padding: 12px; border-radius: 10px; background: var(--blue-bg); color: #315e8b; font-size: 9px; line-height: 1.5; }
.callout.warning { background: var(--amber-bg); color: #9b621f; }
.cost-lines { margin-top: 16px; border: 1px solid var(--line); border-radius: 11px; }
.cost-line { display: grid; grid-template-columns: 1fr 75px 100px; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 9px; }
.cost-line.purchase-line { grid-template-columns: minmax(220px,1.5fr) minmax(120px,.7fr) minmax(140px,.8fr) minmax(145px,.8fr); }
.cost-line.purchase-line input, .cost-line.purchase-line select { width:100%; min-height:38px; border:1px solid var(--line); border-radius:9px; padding:8px 9px; background:var(--card); color:var(--ink); font:inherit; }
.muted { color: var(--muted); font-size: 9px; }
.cost-line:last-child { border-bottom: 0; }
.cost-line.header { background: #f7f9f8; color: var(--muted); font-weight: 800; }
.cost-total { display: flex; justify-content: space-between; margin-top: 13px; padding: 13px; border-radius: 10px; background: var(--green-bg); color: #176d51; font-size: 11px; font-weight: 800; }

.toast-stack { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(340px, calc(100vw - 40px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid #dce4e1; border-radius: 11px; background: #fff; box-shadow: var(--shadow); font-size: 10px; animation: toast-in .25s ease; }
.toast i { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: var(--green-bg); color: var(--green); font-style: normal; font-weight: 800; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.mobile-overlay { display: none; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .finance-kpis { grid-template-columns:repeat(2,1fr); }
  .mini-kpis { grid-template-columns:repeat(2,1fr); }
  .sales-kpis { grid-template-columns:repeat(2,1fr); }
  .finance-layout { grid-template-columns:1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .catalog-grid, .recipe-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .cost-line.purchase-line { grid-template-columns: 1fr; }
  .cost-line.purchase-line.header { display:none; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .mobile-overlay { position: fixed; z-index: 25; inset: 0; background: rgba(4,20,27,.5); }
  .mobile-overlay.open { display: block; }
  .main-wrap { width: 100%; margin-left: 0; }
  .topbar { height: 64px; padding: 0 17px; }
  .menu-button { display: block; }
  .location-pill { margin-right: auto; margin-left: 8px; }
  .top-actions .notification { display: none; }
  .top-actions .primary-button { padding: 8px 10px; font-size: 0; }
  .top-actions .primary-button svg { width: 18px; height: 18px; }
  main { min-height: calc(100vh - 64px); padding: 22px 16px 50px; }
  .page-header { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .page-actions { width: 100%; }
  .page-actions button { flex: 1; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .finance-kpis { grid-template-columns:1fr 1fr;gap:8px; }
  .mini-kpis { grid-template-columns:1fr 1fr;gap:8px; }
  .sales-kpis { grid-template-columns:1fr 1fr;gap:8px; }
  .sales-table-head { align-items:stretch; }
  .sales-controls { width:100%;align-items:stretch;flex-direction:column; }
  .sales-tabs,.compact-search { width:100%; }
  .sales-tabs .tab { flex:1; }
  .kpi-card { min-height: 112px; padding: 15px; }
  .kpi-value { font-size: 20px; }
  .toolbar { align-items: stretch; flex-wrap: wrap; }
  .search-box { min-width: 100%; }
  .filter-select { flex: 1; }
  .catalog-grid, .recipe-grid { grid-template-columns: 1fr; }
  .area-row { grid-template-columns: 82px 1fr 70px; }
  .count-summary { grid-template-columns: 1fr 1fr; }
  .workflow-step { font-size: 0; }
  .workflow-step.active { font-size: 9px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .modal { padding: 22px 18px; }
  .sticky-save { align-items: stretch; flex-direction: column; }
  .sticky-save .primary-button { width: 100%; }
}
@media (max-width: 430px) {
  .location-pill strong { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .kpi-grid { grid-template-columns: 1fr; }
  .finance-kpis { grid-template-columns:1fr; }
  .mini-kpis { grid-template-columns:1fr; }
  .sales-kpis { grid-template-columns:1fr; }
  .kpi-card { min-height: 104px; }
  .kpi-value { margin-top: 8px; }
  .card-header { align-items: flex-start; flex-direction: column; }
}

/* KUMAMI 2.0 — access experience and adaptive workspace */
[hidden] { display: none !important; }
body { --sidebar-width: 276px; background: #f1eee7; }
.app-shell { background: radial-gradient(circle at 72% 0, rgba(201,150,76,.08), transparent 32%), #f1eee7; }
.sidebar { width: var(--sidebar-width); transition: width .28s cubic-bezier(.2,.8,.2,1), transform .28s ease; overflow: hidden; }
.main-wrap { width: calc(100% - var(--sidebar-width)); margin-left: var(--sidebar-width); transition: width .28s cubic-bezier(.2,.8,.2,1), margin-left .28s cubic-bezier(.2,.8,.2,1); }
.nav-item { min-height: 43px; white-space: nowrap; }
.nav-item i { overflow: hidden; font-style: normal; text-overflow: ellipsis; }
.sidebar-footer { min-height: 72px; padding: 10px 12px; }
.user-trigger { display:flex; min-width:0; flex:1; align-items:center; gap:10px; padding:0; border:0; background:transparent; color:#fff; text-align:left; }
.user-trigger .avatar { display:grid; width:37px; height:37px; flex:0 0 37px; place-items:center; border:1px solid rgba(218,179,112,.4); border-radius:12px; background:#3c4936; color:#e8c78f; font-size:11px; font-weight:800; }
.user-copy { min-width:0; }
.user-copy strong,.user-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.user-copy strong { max-width:145px; font-size:11px; }
.user-copy small { margin-top:3px; color:#929b8c; font-size:9px; letter-spacing:.5px; text-transform:uppercase; }
.logout-button { flex:0 0 auto; transform:rotate(45deg); }
.topbar { height:82px; border-bottom:1px solid rgba(67,69,59,.09); background:rgba(250,248,242,.82); backdrop-filter:blur(18px); }
.topbar-context { display:flex; align-items:center; gap:15px; }
.topbar-greeting small,.topbar-greeting strong { display:block; }
.topbar-greeting small { color:#9a8060; font-size:9px; font-weight:800; letter-spacing:1.3px; }
.topbar-greeting strong { margin-top:3px; color:#2b3028; font-family:"Manrope",sans-serif; font-size:14px; }
.menu-button { display:flex; width:43px; height:43px; flex-direction:column; align-items:center; justify-content:center; gap:4px; border:1px solid #ddd7ca; border-radius:13px; background:#fffdf8; }
.menu-button span { display:block; width:17px; height:1.5px; border-radius:2px; background:#31382d; transition:.2s; }
.menu-button span:nth-child(2) { width:12px; }
body.sidebar-collapsed { --sidebar-width: 82px; }
body.sidebar-collapsed .brand { justify-content:center; padding-inline:0; }
body.sidebar-collapsed .brand-copy,body.sidebar-collapsed .demo-label b,body.sidebar-collapsed .nav-section,body.sidebar-collapsed .nav-item i,body.sidebar-collapsed .user-copy,body.sidebar-collapsed .logout-button { display:none; }
body.sidebar-collapsed .demo-label { width:38px; height:30px; justify-content:center; margin-inline:auto; padding:0; }
body.sidebar-collapsed .nav { padding-inline:12px; overflow-x:hidden; }
body.sidebar-collapsed .nav-item { width:54px; justify-content:center; padding:0; }
body.sidebar-collapsed .nav-item b { position:absolute; top:3px; right:3px; min-width:16px; padding:2px 4px; }
body.sidebar-collapsed .nav-item.active::before { left:-12px; }
body.sidebar-collapsed .sidebar-footer { justify-content:center; padding-inline:0; }
body.sidebar-collapsed .user-trigger { flex:0 0 auto; }
body.sidebar-collapsed .menu-button span:first-child { transform:translateY(5.5px) rotate(45deg); }
body.sidebar-collapsed .menu-button span:nth-child(2) { opacity:0; }
body.sidebar-collapsed .menu-button span:last-child { transform:translateY(-5.5px) rotate(-45deg); }

.auth-loading { display:grid; min-height:100vh; place-content:center; gap:16px; background:#1c2119; color:#b9b8ac; text-align:center; }
.auth-loading span { display:grid; width:64px; height:64px; margin:auto; place-items:center; border-radius:20px; background:#b85f3f; color:#ffe4bd; font:800 30px "Manrope"; box-shadow:0 20px 60px rgba(0,0,0,.3); }
.auth-loading p { font-size:11px; font-weight:700; letter-spacing:1.2px; }
.auth-shell { display:grid; min-height:100vh; grid-template-columns:minmax(420px,1.05fr) minmax(480px,.95fr); background:#fbfaf6; }
.auth-story { position:relative; display:flex; min-height:100vh; flex-direction:column; justify-content:space-between; overflow:hidden; padding:54px 64px; background:#1c2119; color:#fff; }
.auth-story::before { position:absolute; inset:auto -18% -28% auto; width:620px; height:620px; border:1px solid rgba(218,179,112,.18); border-radius:50%; box-shadow:0 0 0 75px rgba(218,179,112,.035),0 0 0 150px rgba(218,179,112,.025); content:""; }
.auth-story::after { position:absolute; right:12%; bottom:14%; width:210px; height:300px; border-radius:100px 100px 20px 20px; background:linear-gradient(145deg,rgba(184,95,63,.34),rgba(201,150,76,.04)); filter:blur(.2px); content:""; transform:rotate(22deg); }
.auth-brand { position:relative; z-index:1; display:flex; align-items:center; gap:14px; }
.auth-brand>span { display:grid; width:48px; height:48px; place-items:center; border-radius:15px; background:#b85f3f; color:#ffe2b4; font:800 23px "Manrope"; }
.auth-brand strong,.auth-brand small { display:block; }
.auth-brand strong { font:800 18px "Manrope"; letter-spacing:1px; }
.auth-brand small { margin-top:2px; color:#8f9a8b; font-size:8px; font-weight:700; letter-spacing:2px; }
.auth-story-copy { position:relative; z-index:1; max-width:600px; margin-top:auto; margin-bottom:auto; }
.auth-eyebrow,.auth-kicker { color:#c9964c; font-size:10px; font-weight:800; letter-spacing:2.2px; }
.auth-story h1 { margin:24px 0; color:#f7f2e8; font:600 clamp(48px,5vw,78px)/.98 "Playfair Display",serif; letter-spacing:-3px; }
.auth-story h1 em { color:#d7a96c; font-weight:600; }
.auth-story-copy>p:last-child { max-width:460px; color:#aeb3a8; font-size:16px; line-height:1.7; }
.auth-proof { position:relative; z-index:1; display:flex; align-items:center; gap:16px; }
.auth-proof>span { color:#d1a15e; font:600 28px "Playfair Display"; }
.auth-proof p { margin:0; padding-left:16px; border-left:1px solid rgba(255,255,255,.15); color:#858e81; font-size:11px; line-height:1.6; }
.auth-proof strong { color:#d8d9d2; font-size:12px; }
.auth-panel { display:grid; min-height:100vh; place-items:center; padding:56px; }
.auth-form-wrap { width:min(100%,440px); }
.auth-mobile-mark { display:none; }
.auth-form-wrap h2 { margin:13px 0 10px; color:#242a21; font:700 39px/1.1 "Playfair Display",serif; letter-spacing:-1px; }
.auth-intro { margin:0 0 34px; color:#7c7c72; font-size:13px; line-height:1.65; }
.auth-form-wrap form>label { display:block; margin:0 0 18px; color:#4b5046; font-size:11px; font-weight:700; }
.auth-form-wrap input { width:100%; height:52px; margin-top:8px; padding:0 15px; border:1px solid #ddd8ce; border-radius:12px; outline:0; background:#fff; color:#262b23; transition:.2s; }
.auth-form-wrap input:focus { border-color:#a57549; box-shadow:0 0 0 4px rgba(184,95,63,.1); }
.password-field { position:relative; }
.password-field input { padding-right:68px; }
.password-field button { position:absolute; right:8px; bottom:8px; height:36px; border:0; background:transparent; color:#9a6b46; font-size:10px; font-weight:800; }
.password-note { margin:-8px 0 20px; color:#929184; font-size:10px; }
.auth-error { margin:0 0 16px; padding:12px 14px; border:1px solid #e8b9aa; border-radius:10px; background:#fff2ed; color:#a1462e; font-size:11px; }
.auth-submit { display:flex; width:100%; height:54px; align-items:center; justify-content:space-between; padding:0 10px 0 19px; border:0; border-radius:12px; background:#273024; color:#fff; font-weight:700; box-shadow:0 14px 28px rgba(39,48,36,.18); }
.auth-submit b { display:grid; width:35px; height:35px; place-items:center; border-radius:9px; background:#b85f3f; }
.auth-submit:disabled { opacity:.65; cursor:wait; }
.auth-security { margin:22px 0 0; color:#a1a095; font-size:9px; letter-spacing:.4px; text-align:center; }

.access-overview { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:18px; }
.access-overview article { position:relative; overflow:hidden; padding:23px 25px; border:1px solid #e3ddd0; border-radius:18px; background:#fffdf8; box-shadow:var(--shadow-soft); }
.access-overview article::after { position:absolute; right:-22px; bottom:-35px; width:105px; height:105px; border-radius:50%; background:rgba(201,150,76,.08); content:""; }
.access-overview span,.access-overview small { display:block; color:#88877e; font-size:9px; font-weight:800; letter-spacing:1.1px; }
.access-overview strong { display:block; margin:9px 0 4px; color:#2c3329; font:700 28px "Manrope"; }
.access-overview small { font-weight:500; letter-spacing:0; }
.access-user { display:flex; align-items:center; gap:11px; }
.access-user>span { display:grid; width:38px; height:38px; place-items:center; border-radius:12px; background:#edf0e8; color:#53614c; font-size:10px; font-weight:800; }
.access-user strong,.access-user small { display:block; }
.access-user small { margin-top:3px; color:#96958c; font-size:10px; }
.role-pill { padding:6px 9px; border-radius:8px; background:#f3eee4; color:#695943; font-size:10px; font-weight:700; }
.table-edit { border:0; background:transparent; color:#a45b3d; font-size:10px; font-weight:800; }
.permission-editor { padding:17px; border:1px solid #e3ddd1; border-radius:13px; background:#f8f5ee; }
.permission-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px 14px; margin-top:10px; }
.permission-grid label { display:flex; align-items:center; gap:8px; font-size:10px; font-weight:600; }
.permission-grid input { width:auto; }
/* Contraseña visible y requisitos en vivo (userModal y profileModal) */
.key-field { position:relative; }
.key-field input { padding-right:44px; }
.key-reveal { position:absolute; top:50%; right:5px; display:grid; width:32px; height:32px; place-items:center; transform:translateY(-50%); border:0; border-radius:8px; background:transparent; color:#8d7a5f; cursor:pointer; }
.key-reveal:hover { background:#f3eee4; color:#6f5c42; }
.key-reveal svg { width:17px; height:17px; stroke-width:1.7; }
.key-reveal .key-eye-off,.key-reveal.revealed .key-eye { display:none; }
.key-reveal.revealed .key-eye-off { display:block; }
.key-rules { display:grid; grid-template-columns:1fr 1fr; gap:5px 12px; margin:7px 0 0; padding:0; list-style:none; }
.key-rules li { display:flex; align-items:center; gap:6px; color:#8d8b81; font-size:9px; font-weight:700; letter-spacing:.2px; }
.key-rules li::before { display:grid; width:13px; height:13px; flex:0 0 13px; place-items:center; border:1px solid #ddd8ca; border-radius:50%; color:transparent; font-size:8px; font-weight:800; content:"✓"; }
.key-rules li.ok { color:var(--green); }
.key-rules li.ok::before { border-color:var(--green); background:var(--green); color:#fff; }
.modal-error { margin:18px 0 0; padding:11px 13px; border:1px solid #e3b4a4; border-radius:10px; background:#fdf1ec; color:#9d4429; font-size:10px; font-weight:700; line-height:1.5; }
.form-actions .primary-button:disabled,.form-actions .primary-button:disabled:hover { background:#dcd6c9; color:#fbfaf7; box-shadow:none; cursor:not-allowed; transform:none; }
.profile-summary { display:flex; align-items:center; gap:13px; margin:0 0 22px; padding:15px; border-radius:14px; background:#f3efe7; }
.profile-summary>span { display:grid; width:46px; height:46px; place-items:center; border-radius:14px; background:#34402f; color:#dfb87c; font-size:12px; font-weight:800; }
.profile-summary strong,.profile-summary small { display:block; }
.profile-summary small { margin-top:4px; color:#8b897f; font-size:10px; }

@media (max-width: 900px) {
  body { --sidebar-width: 0px; }
  body.sidebar-collapsed { --sidebar-width: 0px; }
  .sidebar { width:min(300px,88vw); }
  body.sidebar-collapsed .brand-copy,body.sidebar-collapsed .demo-label b,body.sidebar-collapsed .nav-section,body.sidebar-collapsed .nav-item i,body.sidebar-collapsed .user-copy,body.sidebar-collapsed .logout-button { display:initial; }
  body.sidebar-collapsed .nav-item { width:100%; justify-content:flex-start; padding:11px 12px; }
  .main-wrap { width:100%; margin-left:0; }
  .auth-shell { grid-template-columns:1fr; }
  .auth-story { display:none; }
  .auth-panel { padding:34px 22px; }
  .auth-mobile-mark { display:block; margin-bottom:48px; color:#394234; font:800 16px "Manrope"; letter-spacing:2px; }
  .access-overview { grid-template-columns:1fr; }
}

@media (max-width: 620px) {
  .topbar-greeting { display:none; }
  .topbar { padding-inline:12px; }
  .permission-grid { grid-template-columns:1fr; }
  .auth-form-wrap h2 { font-size:33px; }
}
.api-online .mode-label::before { content: 'SISTEMA EN LÍNEA'; font-weight: 600; }
.api-online .mode-label { font-size: 0; }
.api-online .mode-label::before { font-size: 10px; }
.demo-chip.live { background: #e3f5ec; color: #16734f; }

/* KUMAMI · premium gastronomic interface */
body {
  background:
    radial-gradient(circle at 78% -10%, rgba(201, 150, 76, .10), transparent 28rem),
    linear-gradient(180deg, #f7f3eb 0, var(--canvas) 28rem);
}

::selection { background: rgba(184, 95, 63, .18); color: var(--ink); }

.sidebar {
  width: 272px;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,.06);
  background:
    radial-gradient(circle at 18% 4%, rgba(201,150,76,.14), transparent 15rem),
    linear-gradient(178deg, #20261d 0%, #171b16 65%, #11140f 100%);
  box-shadow: 16px 0 50px rgba(26, 27, 21, .11);
}

.sidebar::after {
  position: absolute;
  right: -72px;
  bottom: 88px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(201,150,76,.10);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(201,150,76,.025), 0 0 0 52px rgba(201,150,76,.018);
  content: "";
  pointer-events: none;
}

.brand {
  gap: 14px;
  padding: 28px 24px 23px;
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50% 50% 50% 14px;
  background: linear-gradient(145deg, #cf9a50, #9d553b);
  box-shadow: 0 10px 25px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.28);
  font-family: "Playfair Display", serif;
  font-size: 25px;
  font-style: italic;
  letter-spacing: -1px;
}

.brand-mark::after {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f4d7a8;
  content: "";
}

.brand-mark span { color: #fffaf0; }
.brand-copy { min-width: 0; }
.brand strong {
  font-family: "Playfair Display", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2.2px;
}
.brand > div:last-child span {
  margin-top: 4px;
  color: #a9ae9f;
  font-size: 8px;
  letter-spacing: 1.35px;
}

.demo-label {
  position: relative;
  margin: 0 18px 18px;
  padding: 9px 11px;
  border-color: rgba(218,200,164,.11);
  border-radius: 12px;
  background: rgba(255,255,255,.028);
  color: #aeb5a6;
}
.demo-label span { background: #d5a85c; box-shadow: 0 0 0 4px rgba(213,168,92,.11); }
.api-online .demo-label span { background: #83a877; box-shadow: 0 0 0 4px rgba(131,168,119,.12); }

.nav {
  overflow-y: auto;
  padding: 0 13px 20px;
  scrollbar-color: rgba(255,255,255,.10) transparent;
  scrollbar-width: thin;
}
.nav-section {
  margin: 21px 14px 9px;
  color: #727b6d;
  font-size: 8px;
  letter-spacing: 1.75px;
}
.nav-item {
  gap: 12px;
  margin: 2px 0;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #aab1a3;
  font-size: 12px;
  font-weight: 600;
}
.nav-item svg { width: 17px; height: 17px; opacity: .85; }
.nav-item:hover {
  border-color: rgba(255,255,255,.045);
  background: rgba(255,255,255,.045);
  color: #f8f1e4;
}
.nav-item.active {
  border-color: rgba(219,177,111,.13);
  background: linear-gradient(90deg, rgba(184,95,63,.24), rgba(184,95,63,.08));
  color: #fff8ed;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.nav-item.active::before {
  left: -13px;
  width: 3px;
  height: 28px;
  background: linear-gradient(#d7a65d, #b85f3f);
}
.nav-item b { background: rgba(201,150,76,.14); color: #e4bd80; }

.sidebar-footer {
  z-index: 1;
  margin: 0 13px 13px;
  padding: 15px 10px 2px;
  border-color: rgba(255,255,255,.07);
}
.avatar {
  border: 1px solid rgba(229,203,162,.16);
  border-radius: 50%;
  background: linear-gradient(145deg, #4f5b47, #2e372a);
  color: #f4dfbd;
}
.sidebar-footer span { color: #7f897b; }

.main-wrap { width: calc(100% - 272px); margin-left: 272px; }
.topbar {
  height: 78px;
  padding: 0 38px;
  border-color: rgba(89,82,68,.10);
  background: rgba(249,246,239,.82);
  box-shadow: 0 1px 0 rgba(255,255,255,.75);
  backdrop-filter: blur(20px) saturate(120%);
}
.status-dot { background: #66835c; box-shadow: 0 0 0 4px rgba(102,131,92,.13); }
.location-pill small { color: #9a8e7b; letter-spacing: 1.35px; }
.location-pill strong { color: #34372f; font-size: 12px; }

.icon-button { border-radius: 12px; }
.icon-button:hover { background: rgba(86,101,74,.08); }
.notification {
  border: 1px solid rgba(89,82,68,.12);
  background: rgba(255,253,248,.65);
}
.notification i { border-color: #f8f4ec; background: var(--copper); }

.primary-button, .secondary-button, .danger-button {
  min-height: 43px;
  border-radius: 12px;
  font-size: 11px;
  letter-spacing: .1px;
}
.primary-button {
  background: linear-gradient(135deg, #bd6a49, #9d4d35);
  box-shadow: 0 8px 20px rgba(157,77,53,.19), inset 0 1px 0 rgba(255,255,255,.2);
}
.primary-button:hover { background: linear-gradient(135deg, #aa593c, #833d2c); box-shadow: 0 10px 24px rgba(133,65,45,.23); }
.secondary-button { border-color: #ddd6c8; background: rgba(255,253,248,.85); color: #3d4138; }
.secondary-button:hover { border-color: #cfc3ae; background: #fffdf8; }
.danger-button { border-color: #e4c7bf; background: #fff7f3; color: #a14c37; }
.compact { min-height: 39px; padding: 9px 14px; }

main { max-width: 1600px; min-height: calc(100vh - 78px); padding: 34px 38px 68px; }
.page-header {
  position: relative;
  min-height: 116px;
  align-items: center;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 24px 27px;
  border: 1px solid rgba(117,102,78,.11);
  border-radius: 20px;
  background:
    linear-gradient(105deg, rgba(255,253,248,.96), rgba(247,242,232,.88)),
    var(--card);
  box-shadow: var(--shadow-soft);
}
.page-header::before {
  position: absolute;
  top: -82px;
  right: -30px;
  width: 245px;
  height: 245px;
  border: 1px solid rgba(184,95,63,.08);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(201,150,76,.035), 0 0 0 70px rgba(86,101,74,.018);
  content: "";
}
.page-header > * { position: relative; z-index: 1; }
.eyebrow {
  margin-bottom: 7px;
  color: var(--copper);
  font-size: 8px;
  letter-spacing: 1.9px;
}
h1, h2, h3 { color: #292d25; }
h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(29px, 3vw, 39px);
  font-weight: 600;
  letter-spacing: -.75px;
}
h2 { font-size: 16px; letter-spacing: -.35px; }
.page-header p:not(.eyebrow), .subtle { max-width: 790px; color: #7d7b72; line-height: 1.55; }
.page-actions { justify-content: flex-end; }
.demo-chip {
  padding: 5px 8px;
  border: 1px solid rgba(170,111,40,.12);
  border-radius: 20px;
  background: #fbf0dc;
  color: #926025;
}
.demo-chip.live { border-color: rgba(77,113,72,.12); background: #edf3e9; color: #4c7147; }

.kpi-grid, .finance-kpis, .mini-kpis { gap: 15px; }
.kpi-card {
  min-height: 132px;
  padding: 20px;
  border-color: rgba(107,96,77,.12);
  border-radius: 18px;
  background: linear-gradient(150deg, #fffdf8 0%, #fbf8f1 100%);
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.kpi-card:hover { border-color: rgba(184,95,63,.16); box-shadow: var(--shadow); transform: translateY(-2px); }
.kpi-card::before {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent 72%);
  content: "";
  opacity: .55;
}
.kpi-card::after { top: -29px; right: -25px; width: 92px; height: 92px; opacity: .52; }
.kpi-top { font-size: 9px; letter-spacing: .2px; text-transform: uppercase; }
.kpi-icon { width: 34px; height: 34px; border-radius: 11px; }
.kpi-value { margin-top: 15px; color: #282c25; font-size: 24px; }
.kpi-note { line-height: 1.45; }

.card, .data-card, .catalog-card, .recipe-card {
  border-color: rgba(107,96,77,.12);
  border-radius: 18px;
  background: rgba(255,253,248,.94);
  box-shadow: var(--shadow-soft);
}
.card-header { padding: 20px 22px 15px; }
.card-header p { color: #868178; line-height: 1.45; }
.card-body { padding: 7px 22px 22px; }
.finance-layout, .dashboard-grid, .stack { gap: 16px; }
.month-chart { border-color: #e7e0d3; }
.month-bar { background: #aab2a2; }
.month-bar.active { background: linear-gradient(180deg, #cf8a59, #a8563c); box-shadow: 0 7px 12px rgba(168,86,60,.13); }
.goal-mark { border-color: #c99a55; }
.payment-list .bar-fill { background: linear-gradient(90deg, #66785d, #97a58a); }
.bar-track { background: #eee9df; }

.toolbar { margin-bottom: 16px; }
.search-box input, .filter-select, .form-group input, .form-group select, .form-group textarea, .count-input {
  border-color: #ddd6c8;
  background: rgba(255,253,248,.92);
  color: var(--ink);
}
.search-box input, .filter-select { height: 42px; border-radius: 12px; }
.search-box input::placeholder, textarea::placeholder, input::placeholder { color: #aaa397; }
.search-box input:focus, select:focus, input:focus, textarea:focus {
  border-color: #9d8b70 !important;
  box-shadow: 0 0 0 3px rgba(157,139,112,.11);
}

.data-card { overflow: hidden; }
th {
  padding: 13px 17px;
  border-color: #e6dfd3;
  background: #f5f0e6;
  color: #817b70;
  font-size: 8px;
  letter-spacing: .8px;
}
td { padding: 14px 17px; border-color: #eee8dd; color: #4b4d45; font-size: 10px; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #faf5eb; }
.table-footer { border-color: #e6dfd3; background: #fcf9f3; }
.item-thumb { border-radius: 11px; }
.area-badge { border: 1px solid #dfd9cc; border-radius: 20px; background: #f4f0e8; color: #5f6659; }
.badge { border: 1px solid transparent; }
.badge.ok { border-color: rgba(77,113,72,.10); }
.badge.low { border-color: rgba(170,111,40,.10); }
.badge.critical { border-color: rgba(184,95,63,.10); background: #faeae5; color: #a85039; }
.badge.neutral { background: #efede7; color: #666960; }

.tabs { border: 1px solid #e2dacd; border-radius: 13px; background: #ede7dc; }
.tab { border-radius: 9px; }
.tab.active { background: #fffdf8; box-shadow: 0 3px 10px rgba(57,48,36,.08); }
.catalog-card, .recipe-card { padding: 20px; }
.catalog-card:hover, .recipe-card:hover { border-color: rgba(184,95,63,.22); box-shadow: var(--shadow); }
.catalog-icon { border-radius: 12px; }
.catalog-meta, .recipe-cost-row { border-color: #e8e1d5; }

.workflow-bar, .count-summary, .sticky-save {
  border-color: rgba(107,96,77,.13);
  border-radius: 16px;
  background: rgba(255,253,248,.94);
  box-shadow: var(--shadow-soft);
}
.workflow-step.active span { border-color: var(--copper); background: var(--copper); }
.workflow-line { background: #e2dacd; }
.count-summary { background: #e4ddd0; }
.count-stat { background: #fffdf8; }

.modal-backdrop { background: rgba(22,25,19,.70); backdrop-filter: blur(7px); }
.modal {
  padding: 30px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 22px;
  background: #fffdf8;
  box-shadow: 0 30px 90px rgba(18,20,16,.34);
}
.modal-close { border-radius: 50%; background: #f0ebe2; color: #6f6e65; }
.modal-kicker { color: var(--copper); letter-spacing: 1.6px; }
.modal h2 { font-family: "Playfair Display", serif; font-size: 25px; font-weight: 600; }
.modal-lead { font-size: 11px; }
.form-group label { color: #635f56; letter-spacing: .5px; }
.form-group input, .form-group select, .form-group textarea { min-height: 43px; border-radius: 11px; }
.form-actions { border-color: #e6dfd3; }
.callout { border: 1px solid #dfe6e0; border-radius: 13px; background: #eef2ed; color: #4f665e; }
.callout.warning { border-color: #ead9bd; background: #fbf1df; color: #8d622d; }
.cost-lines { border-color: #dfd8cc; border-radius: 14px; }
.cost-line { border-color: #e9e2d6; }
.cost-line.header { background: #f5f0e7; }
.cost-total { background: #edf3e9; color: #4d7148; }
.toast { border-color: #ded7ca; border-radius: 14px; background: #fffdf8; box-shadow: var(--shadow); }

@media (max-width: 1100px) {
  .sidebar { width: 250px; }
  .main-wrap { width: calc(100% - 250px); margin-left: 250px; }
  .topbar { padding-inline: 28px; }
  main { padding-inline: 28px; }
}

@media (max-width: 760px) {
  .sidebar { width: min(288px, 86vw); transform: translateX(-100%); }
  .main-wrap { width: 100%; margin-left: 0; }
  .topbar { height: 66px; padding: 0 16px; }
  main { min-height: calc(100vh - 66px); padding: 18px 14px 50px; }
  .page-header { min-height: auto; align-items: flex-start; padding: 21px 19px; border-radius: 17px; }
  .page-header::before { width: 180px; height: 180px; }
  h1 { font-size: 29px; }
  .page-actions { justify-content: stretch; }
  .page-actions > * { flex: 1; min-width: 0; }
  .kpi-grid, .finance-kpis, .mini-kpis, .sales-kpis { gap: 9px; }
  .kpi-card { min-height: 116px; padding: 16px; border-radius: 15px; }
  .card, .data-card, .catalog-card, .recipe-card { border-radius: 15px; }
  .modal { padding: 24px 18px; border-radius: 19px; }
}

@media (max-width: 430px) {
  .brand { padding-top: 24px; }
  .location-pill small { display: none; }
  .location-pill strong { font-size: 11px; }
  .page-header { padding: 19px 17px; }
  h1 { font-size: 27px; }
  .kpi-grid, .finance-kpis, .mini-kpis, .sales-kpis { grid-template-columns: 1fr; }
  .kpi-card { min-height: 106px; }
  .kpi-value { font-size: 22px; }
}

/* Adaptive shell must remain last in the cascade. */
body { --sidebar-width:276px; }
.sidebar { width:var(--sidebar-width); transition:width .28s cubic-bezier(.2,.8,.2,1),transform .28s ease; overflow:hidden; }
.main-wrap { width:calc(100% - var(--sidebar-width)); margin-left:var(--sidebar-width); transition:width .28s cubic-bezier(.2,.8,.2,1),margin-left .28s cubic-bezier(.2,.8,.2,1); }
.topbar { height:82px; }
.nav-item i { overflow:hidden; font-style:normal; text-overflow:ellipsis; }
body.sidebar-collapsed { --sidebar-width:82px; }
body.sidebar-collapsed .brand { justify-content:center; padding-inline:0; }
body.sidebar-collapsed .brand-copy,body.sidebar-collapsed .demo-label b,body.sidebar-collapsed .nav-section,body.sidebar-collapsed .nav-item i,body.sidebar-collapsed .user-copy,body.sidebar-collapsed .logout-button { display:none; }
body.sidebar-collapsed .demo-label { width:38px; height:30px; justify-content:center; margin-inline:auto; padding:0; }
body.sidebar-collapsed .nav { padding-inline:12px; overflow-x:hidden; }
body.sidebar-collapsed .nav-item { width:54px; justify-content:center; padding:0; }
body.sidebar-collapsed .nav-item b { position:absolute; top:3px; right:3px; min-width:16px; padding:2px 4px; }
body.sidebar-collapsed .sidebar-footer { justify-content:center; padding-inline:0; }
body.sidebar-collapsed .user-trigger { flex:0 0 auto; }
@media (max-width:900px){
  body,body.sidebar-collapsed { --sidebar-width:0px; }
  .sidebar { width:min(300px,88vw); transform:translateX(-100%); }
  .sidebar.open { transform:translateX(0); }
  .mobile-overlay { position:fixed; z-index:25; inset:0; background:rgba(17,22,17,.55); backdrop-filter:blur(3px); }
  .mobile-overlay.open { display:block; }
  .main-wrap { width:100%; margin-left:0; }
  body.sidebar-collapsed .brand-copy,body.sidebar-collapsed .demo-label b,body.sidebar-collapsed .nav-section,body.sidebar-collapsed .nav-item i,body.sidebar-collapsed .user-copy,body.sidebar-collapsed .logout-button { display:initial; }
  body.sidebar-collapsed .nav-item { width:100%; justify-content:flex-start; padding:11px 12px; }
}
.welcome-access { display:grid; min-height:420px; grid-template-columns:1.4fr .6fr; gap:34px; align-items:end; overflow:hidden; padding:46px; border-radius:24px; background:linear-gradient(135deg,#252d22,#3d4837); color:#fff; box-shadow:0 24px 55px rgba(39,48,36,.18); }
.welcome-access>div>span { display:grid; width:52px; height:52px; margin-bottom:54px; place-items:center; border:1px solid rgba(224,190,132,.35); border-radius:16px; color:#ddb374; }
.welcome-access svg { width:25px; }
.welcome-access h2 { margin:13px 0; color:#faf5e9; font:600 46px/1.06 "Playfair Display",serif; letter-spacing:-1.5px; }
.welcome-access p:last-child { max-width:600px; color:#afb5a9; line-height:1.7; }
.welcome-access aside { padding:26px; border:1px solid rgba(255,255,255,.1); border-radius:18px; background:rgba(255,255,255,.05); backdrop-filter:blur(10px); }
.welcome-access aside small,.welcome-access aside strong,.welcome-access aside span { display:block; }
.welcome-access aside small { color:#d2a86d; font-size:9px; font-weight:800; letter-spacing:1.5px; }
.welcome-access aside strong { margin:13px 0 7px; font:600 24px "Playfair Display"; }
.welcome-access aside span { color:#9fa79b; font-size:10px; }
@media(max-width:700px){.welcome-access{grid-template-columns:1fr;padding:28px}.welcome-access>div>span{margin-bottom:32px}.welcome-access h2{font-size:35px}}

/* KUMAMI v2 · account controls, themes and premium application shell */
.sidebar-footer {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 14px 8px 4px;
}
.sidebar-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 8px;
}
.sidebar-utility-label {
  color: #697365;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.45px;
}
.theme-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #aeb5a6;
}
.theme-switch-track {
  position: relative;
  display: grid;
  width: 51px;
  height: 27px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 6px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 30px;
  background: rgba(255,255,255,.055);
}
.theme-switch-track i { z-index: 1; display: grid; place-items: center; color: #7d8779; }
.theme-switch-track svg { width: 12px; height: 12px; stroke-width: 1.8; }
.theme-switch-track b {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: linear-gradient(145deg,#e4b66e,#b86846);
  box-shadow: 0 3px 9px rgba(0,0,0,.28);
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
html[data-theme="dark"] .theme-switch-track b { transform: translateX(24px); }
.theme-switch-copy { min-width: 67px; font-size: 9px; font-weight: 700; text-align: left; }
.user-trigger {
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.user-trigger:hover { border-color: rgba(218,179,112,.17); background: rgba(255,255,255,.06); transform: translateY(-1px); }
.user-copy small { display: block; margin-top: 3px; }
.user-chevron { margin-left: auto; color: #7e897a !important; font-size: 18px !important; }
.logout-button {
  display: flex;
  width: 100%;
  min-height: 37px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #8f988b;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  transform: none;
  transition: color .18s ease, background .18s ease;
}
.logout-button svg { width: 16px; height: 16px; }
.logout-button:hover { background: rgba(184,95,63,.12); color: #e1a188; }
.header-theme-button { border: 1px solid rgba(89,82,68,.12); background: rgba(255,253,248,.65); }
.header-theme-button svg { stroke-width: 1.65; }

.topbar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184,95,63,.24), rgba(201,150,76,.28), transparent);
  content: "";
}
.page-header { isolation: isolate; }
.page-header::after {
  position: absolute;
  right: 22px;
  bottom: 17px;
  width: 54px;
  height: 5px;
  border-radius: 10px;
  background: linear-gradient(90deg,var(--copper),var(--gold));
  content: "";
  opacity: .72;
}
.card, .data-card, .catalog-card, .recipe-card, .kpi-card { backdrop-filter: blur(16px); }
.card-header h2::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,150,76,.10);
  vertical-align: 2px;
  content: "";
}
.kpi-value { font-variant-numeric: tabular-nums; }
table { font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }

html[data-theme="dark"] body {
  --navy: #0f120e;
  --navy-2: #1d231b;
  --ink: #eee9dc;
  --muted: #969b8e;
  --line: #34392f;
  --canvas: #121510;
  --card: #1c2019;
  --cream: #1c2019;
  --cream-2: #272c23;
  --green-bg: #263226;
  --amber-bg: #392e1e;
  --blue-bg: #24302d;
  --shadow: 0 20px 60px rgba(0,0,0,.32);
  --shadow-soft: 0 10px 30px rgba(0,0,0,.20);
  background:
    radial-gradient(circle at 78% -10%, rgba(184,95,63,.11), transparent 30rem),
    linear-gradient(180deg,#171a14 0,#11140f 32rem);
  color: var(--ink);
  color-scheme: dark;
}
html[data-theme="dark"] ::selection { background: rgba(201,150,76,.28); color: #fff9ed; }
html[data-theme="dark"] .topbar {
  border-color: rgba(231,214,184,.08);
  background: rgba(18,21,16,.84);
  box-shadow: 0 1px 0 rgba(255,255,255,.025);
}
html[data-theme="dark"] .topbar-greeting strong,
html[data-theme="dark"] .location-pill strong,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 { color: #f0eadc; }
html[data-theme="dark"] .topbar-greeting small,
html[data-theme="dark"] .location-pill small { color: #a8865e; }
html[data-theme="dark"] .header-theme-button,
html[data-theme="dark"] .notification { border-color: #353b31; background: rgba(255,255,255,.025); color: #d9d5ca; }
html[data-theme="dark"] .icon-button:hover { background: rgba(255,255,255,.065); }
html[data-theme="dark"] .notification i { border-color: #171a14; }
html[data-theme="dark"] .page-header {
  border-color: rgba(221,192,146,.10);
  background:
    linear-gradient(108deg,rgba(29,34,26,.98),rgba(24,28,22,.94)),
    var(--card);
}
html[data-theme="dark"] .page-header::before { border-color: rgba(201,150,76,.09); box-shadow: 0 0 0 35px rgba(184,95,63,.035),0 0 0 70px rgba(201,150,76,.018); }
html[data-theme="dark"] .page-header p:not(.eyebrow),
html[data-theme="dark"] .subtle { color: #969b8f; }
html[data-theme="dark"] .kpi-card {
  border-color: rgba(224,201,164,.10);
  background: linear-gradient(150deg,#20251d 0%,#191d17 100%);
}
html[data-theme="dark"] .kpi-card:hover { border-color: rgba(201,150,76,.24); }
html[data-theme="dark"] .kpi-card::after { opacity: .12; }
html[data-theme="dark"] .kpi-value { color: #f0eadc; }
html[data-theme="dark"] .card,
html[data-theme="dark"] .data-card,
html[data-theme="dark"] .catalog-card,
html[data-theme="dark"] .recipe-card,
html[data-theme="dark"] .access-overview article {
  border-color: rgba(224,201,164,.10);
  background: rgba(28,32,25,.94);
}
html[data-theme="dark"] .card-header p,
html[data-theme="dark"] .access-overview span,
html[data-theme="dark"] .access-overview small { color: #92978b; }
html[data-theme="dark"] .access-overview strong { color: #eee8da; }
html[data-theme="dark"] .bar-track { background: #30362c; }
html[data-theme="dark"] .month-chart,
html[data-theme="dark"] .legend-row,
html[data-theme="dark"] .catalog-meta,
html[data-theme="dark"] .recipe-cost-row { border-color: #353a31; }
html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .filter-select,
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group select,
html[data-theme="dark"] .form-group textarea,
html[data-theme="dark"] .count-input,
html[data-theme="dark"] .secondary-button {
  border-color: #3a4035;
  background: #20251d;
  color: #e7e1d4;
}
html[data-theme="dark"] .secondary-button:hover { border-color: #5a604f; background: #292e25; }
html[data-theme="dark"] th { border-color: #373c33; background: #252a22; color: #9da294; }
html[data-theme="dark"] td { border-color: #30352d; color: #c9c8be; }
html[data-theme="dark"] tbody tr:hover { background: rgba(201,150,76,.045); }
html[data-theme="dark"] .table-footer { border-color: #373c33; background: #20241d; }
html[data-theme="dark"] .area-badge,
html[data-theme="dark"] .role-pill { border-color: #41473b; background: #2a3027; color: #c2c5b9; }
html[data-theme="dark"] .badge.neutral { background: #2d322a; color: #c2c4bb; }
html[data-theme="dark"] .tabs { border-color: #3b4037; background: #252a22; }
html[data-theme="dark"] .tab { color: #999f92; }
html[data-theme="dark"] .tab.active { background: #363b31; color: #f0eadc; box-shadow: 0 3px 10px rgba(0,0,0,.2); }
html[data-theme="dark"] .workflow-bar,
html[data-theme="dark"] .count-summary,
html[data-theme="dark"] .sticky-save { border-color: #383d34; background: #242920; }
html[data-theme="dark"] .workflow-step span { border-color: #444a3f; background: #22271f; }
html[data-theme="dark"] .count-summary { background: #343a30; }
html[data-theme="dark"] .count-stat { background: #20251d; }
html[data-theme="dark"] .modal { border-color: rgba(255,255,255,.08); background: #20241d; }
html[data-theme="dark"] .modal-close { background: #30352c; color: #bbbdb3; }
html[data-theme="dark"] .profile-summary,
html[data-theme="dark"] .permission-editor { border-color: #3b4036; background: #292e25; }
html[data-theme="dark"] .key-reveal { color: #b5a488; }
html[data-theme="dark"] .key-reveal:hover { background: #30352c; color: #d8c8ac; }
html[data-theme="dark"] .key-rules li { color: #9b9a90; }
html[data-theme="dark"] .key-rules li::before { border-color: #454a3f; }
html[data-theme="dark"] .key-rules li.ok { color: #9fc496; }
html[data-theme="dark"] .key-rules li.ok::before { border-color: #9fc496; background: #9fc496; color: #1d231b; }
html[data-theme="dark"] .modal-error { border-color: #6b3d2c; background: #38241d; color: #e8a98f; }
html[data-theme="dark"] .form-actions .primary-button:disabled,
html[data-theme="dark"] .form-actions .primary-button:disabled:hover { background: #3a3f35; color: #8e9286; }
html[data-theme="dark"] .form-group label { color: #c6c3b8; }
html[data-theme="dark"] .form-actions { border-color: #383d34; }
html[data-theme="dark"] .toast { border-color: #3b4036; background: #252a21; color: #e7e2d7; }
html[data-theme="dark"] .callout { border-color: #3a463e; background: #26312b; color: #aebeb5; }
html[data-theme="dark"] .callout.warning { border-color: #57452a; background: #392f20; color: #d6ae74; }
html[data-theme="dark"] .cost-lines { border-color: #3b4036; }
html[data-theme="dark"] .cost-line { border-color: #343930; }
html[data-theme="dark"] .cost-line.header { background: #292e26; }

body.sidebar-collapsed .sidebar-theme-row { display: none; }
body.sidebar-collapsed .sidebar-footer { gap: 5px; }
body.sidebar-collapsed .logout-button { display: flex; width: 48px; justify-content: center; padding: 8px; }
body.sidebar-collapsed .logout-button span:last-child { display: none; }

@media (max-width: 900px) {
  body.sidebar-collapsed .sidebar-theme-row { display: flex; }
  body.sidebar-collapsed .logout-button { width: 100%; justify-content: flex-start; padding: 8px 12px; }
  body.sidebar-collapsed .logout-button span:last-child { display: initial; }
}
@media (max-width: 620px) {
  .theme-switch-copy, .header-theme-button { display: none; }
  .top-actions { gap: 6px; }
  .top-actions .primary-button { padding-inline: 11px; font-size: 0; }
  .top-actions .primary-button svg { width: 18px; height: 18px; }
  .page-header::after { right: 16px; bottom: 12px; width: 38px; }
}

/* KUMAMI v3 · editorial restaurant intelligence */
html { scroll-behavior: auto; }
.page-header, .kpi-card, .card, .data-card { animation: none !important; }
.main-wrap, .sidebar { will-change: width, margin-left; }

.menu-button,
html[data-theme="dark"] .menu-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(48,55,44,.14);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.menu-button:hover { border-color: rgba(184,95,63,.28); background: rgba(184,95,63,.07); }
.menu-button span,
body.sidebar-collapsed .menu-button span,
body.sidebar-collapsed .menu-button span:first-child,
body.sidebar-collapsed .menu-button span:nth-child(2),
body.sidebar-collapsed .menu-button span:last-child {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  margin: 0;
  border-radius: 0;
  background: transparent;
  opacity: 1;
  transform: none;
}
.menu-button svg { display: block; width: 20px; height: 20px; stroke-width: 1.8; }
html[data-theme="dark"] .menu-button { border-color: rgba(236,224,200,.16); color: #eee8db; }

body {
  background:
    radial-gradient(circle at 88% 2%, rgba(193,133,79,.10), transparent 26rem),
    #ece8df;
}
.app-shell { background: transparent; }
.topbar {
  height: 78px;
  padding-inline: 34px;
  border-bottom-color: rgba(60,65,52,.10);
  background: rgba(241,238,230,.87);
  box-shadow: none;
}
.topbar-greeting strong { font-family: "Playfair Display",serif; font-size: 16px; font-weight: 600; }
.location-pill {
  position: absolute;
  left: 50%;
  padding: 9px 14px;
  border: 1px solid rgba(62,70,55,.10);
  border-radius: 999px;
  background: rgba(255,253,248,.58);
  transform: translateX(-50%);
}
html[data-theme="dark"] .location-pill { border-color: rgba(236,224,200,.10); background: rgba(255,255,255,.025); }

main { max-width: 1640px; padding: 32px 38px 72px; }
.page-header {
  min-height: 178px;
  align-items: flex-end;
  margin-bottom: 24px;
  padding: 31px 34px;
  border: 0;
  border-radius: 4px 28px 28px 28px;
  background:
    radial-gradient(circle at 88% 18%, rgba(214,169,100,.22), transparent 17rem),
    linear-gradient(118deg,#182017 0%,#2b3828 58%,#3d4937 100%);
  box-shadow: 0 24px 60px rgba(34,42,31,.16);
  color: #f8f3e8;
}
.page-header::before {
  top: auto;
  right: 7%;
  bottom: -145px;
  width: 330px;
  height: 330px;
  border-color: rgba(225,193,141,.15);
  box-shadow: 0 0 0 42px rgba(225,193,141,.025),0 0 0 84px rgba(225,193,141,.018);
}
.page-header::after { right: auto; bottom: 31px; left: 0; width: 5px; height: 62px; border-radius: 0 7px 7px 0; opacity: 1; }
.page-header h1,
html[data-theme="dark"] .page-header h1 { color: #fbf7ed; font-size: clamp(34px,3.4vw,50px); line-height: .98; letter-spacing: -1.5px; }
.page-header .eyebrow { margin-bottom: 13px; color: #d9ad6f; letter-spacing: 2.4px; }
.page-header p:not(.eyebrow),
html[data-theme="dark"] .page-header p:not(.eyebrow) { max-width: 760px; margin-top: 12px; color: #b9c0b3; font-size: 11px; }
.page-header .demo-chip { border-color: rgba(255,255,255,.10); background: rgba(255,255,255,.08); color: #e9c893; }
.page-header .page-actions { margin-left: auto; align-self: center; }
.page-header .filter-select,
.page-header .secondary-button { border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.08); color: #f5efe4; }
.page-header .filter-select option { color: #262b24; }

.executive-stage {
  display: grid;
  grid-template-columns: minmax(0,1.45fr) minmax(360px,.75fr);
  gap: 16px;
  margin-bottom: 16px;
}
.executive-feature {
  position: relative;
  display: flex;
  min-height: 286px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 30px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 18%,rgba(217,167,96,.28),transparent 16rem),
    linear-gradient(135deg,#9e5137 0%,#bd714b 48%,#d19a56 130%);
  box-shadow: 0 22px 50px rgba(116,64,42,.20);
  color: #fff8ed;
}
.executive-feature::after {
  position: absolute;
  top: -118px;
  right: -48px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(255,255,255,.035),0 0 0 88px rgba(255,255,255,.018);
  content: "";
}
.executive-feature-top { position: absolute; z-index: 1; top: 27px; right: 30px; left: 30px; display: flex; align-items: center; justify-content: space-between; color: #f3dac2; font-size: 9px; font-weight: 800; letter-spacing: 1.7px; }
.executive-feature .demo-chip { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.10); color: #fff4e5; }
.executive-feature > strong { position: relative; z-index: 1; display: block; font: 700 clamp(34px,4.2vw,61px)/1 "Manrope"; letter-spacing: -3px; }
.executive-feature > p { position: relative; z-index: 1; margin: 11px 0 23px; color: #f0d7c2; font-size: 11px; }
.executive-feature-foot { position: relative; z-index: 1; display: flex; gap: 10px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18); }
.executive-feature-foot span { padding-right: 22px; color: #f0d9c6; font-size: 10px; }
.executive-feature-foot b { margin-right: 4px; color: #fff; font-size: 13px; }
.executive-signals { display: grid; grid-template-rows: repeat(3,1fr); gap: 10px; }
.executive-signals article {
  position: relative;
  display: grid;
  min-height: 0;
  grid-template-columns: 1fr auto;
  align-content: center;
  padding: 19px 21px;
  border: 1px solid rgba(78,74,62,.11);
  border-radius: 17px;
  background: rgba(255,253,248,.82);
  box-shadow: 0 10px 28px rgba(49,44,35,.06);
}
.executive-signals article::before { position: absolute; inset: 14px auto 14px 0; width: 3px; border-radius: 0 4px 4px 0; background: linear-gradient(var(--gold),var(--copper)); content: ""; }
.executive-signals span { color: #8b867b; font-size: 8px; font-weight: 800; letter-spacing: 1.1px; }
.executive-signals strong { grid-row: 1/3; grid-column: 2; align-self: center; color: #282d25; font: 700 clamp(18px,1.65vw,25px) "Manrope"; letter-spacing: -1px; }
.executive-signals small { margin-top: 6px; color: #99958c; font-size: 9px; }
.dashboard-secondary { grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 16px; }
.dashboard-secondary .kpi-card { min-height: 112px; border-radius: 16px; box-shadow: none; }

.card, .data-card, .catalog-card, .recipe-card, .kpi-card {
  border-color: rgba(74,71,61,.11);
  background: rgba(255,253,248,.84);
  box-shadow: 0 12px 34px rgba(46,42,34,.055);
}
.card { border-radius: 21px; }
.data-card { border-radius: 20px; }
.card-header { padding: 22px 24px 16px; }
.card-header h2 { font-family: "Playfair Display",serif; font-size: 19px; font-weight: 600; }
.card-header h2::before { display: none; }
.card-body { padding: 7px 24px 24px; }
th { height: 44px; padding-inline: 19px; background: rgba(44,53,42,.055); color: #75796f; letter-spacing: 1px; }
td { height: 55px; padding-inline: 19px; font-size: 11px; }

html[data-theme="dark"] body { background: radial-gradient(circle at 86% 0,rgba(184,95,63,.10),transparent 28rem),#10130f; }
html[data-theme="dark"] .page-header { background: radial-gradient(circle at 88% 18%,rgba(184,95,63,.18),transparent 18rem),linear-gradient(118deg,#1b2119,#2a3427); }
html[data-theme="dark"] .executive-signals article { border-color: rgba(223,201,165,.10); background: rgba(28,32,25,.92); }
html[data-theme="dark"] .executive-signals strong { color: #f0eadc; }
html[data-theme="dark"] .executive-signals span,html[data-theme="dark"] .executive-signals small { color: #969b8f; }

@media (max-width: 1100px) {
  .executive-stage { grid-template-columns: 1fr; }
  .executive-signals { grid-template-columns: repeat(3,1fr); grid-template-rows: none; }
  .executive-signals article { min-height: 112px; grid-template-columns: 1fr; }
  .executive-signals strong { grid-row: auto; grid-column: auto; margin-top: 9px; }
}
@media (max-width: 760px) {
  .topbar { height: 66px; }
  .location-pill { position: static; margin-right: auto; margin-left: 6px; padding: 7px 10px; transform: none; }
  main { padding: 18px 14px 52px; }
  .page-header { min-height: 190px; padding: 25px 22px; border-radius: 3px 22px 22px 22px; }
  .page-header h1,html[data-theme="dark"] .page-header h1 { font-size: 34px; }
  .page-header .page-actions { width: 100%; margin: 20px 0 0; align-self: auto; }
  .executive-feature { min-height: 245px; padding: 24px; border-radius: 19px; }
  .executive-feature-top { top: 22px; right: 24px; left: 24px; }
  .executive-feature > strong { font-size: 36px; letter-spacing: -2px; }
  .executive-signals { grid-template-columns: 1fr; }
  .dashboard-secondary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 430px) {
  .executive-feature-foot { flex-direction: column; gap: 7px; }
  .dashboard-secondary { grid-template-columns: 1fr; }
}

/* Sidebar inteligente · proximidad, fijación y grupos */
.nav { display: block; padding-top: 3px; }
.nav-group { margin: 3px 0; }
.nav-group-toggle {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 39px;
  align-items: center;
  gap: 11px;
  padding: 9px 13px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #747e71;
  text-align: left;
  transition: color .18s ease,background .18s ease;
}
.nav-group-toggle > span { display: grid; width: 17px; height: 17px; flex: 0 0 17px; place-items: center; }
.nav-group-toggle svg { width: 17px; height: 17px; stroke-width: 1.7; }
.nav-group-toggle b { overflow: hidden; flex: 1; font-size: 8px; font-weight: 800; letter-spacing: 1.35px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.nav-group-toggle > i {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px,-1px);
  transition: transform .2s ease;
}
.nav-group.open .nav-group-toggle > i { transform: rotate(225deg) translate(-1px,-1px); }
.nav-group-toggle:hover { background: rgba(255,255,255,.035); color: #c4cbbb; }
.nav-group:has(.nav-item.active) .nav-group-toggle { color: #d4ad73; }
.nav-group-items {
  display: grid;
  max-height: 0;
  gap: 1px;
  overflow: hidden;
  opacity: 0;
  transition: max-height .28s cubic-bezier(.2,.8,.2,1),opacity .2s ease,padding .2s ease;
}
.nav-group.open .nav-group-items { max-height: 360px; padding: 3px 0 7px; opacity: 1; }
.nav-group-items .nav-item { min-height: 39px; padding-block: 9px; padding-left: 40px; }
.nav-group-items .nav-item > span:first-child { margin-left: -27px; }

@media (min-width: 901px) {
  body.sidebar-collapsed .sidebar { width: 82px; }
  body.sidebar-collapsed .sidebar:hover,
  body.sidebar-collapsed .sidebar:focus-within {
    width: 276px;
    box-shadow: 22px 0 60px rgba(12,16,11,.26);
  }
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .brand-copy,
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .demo-label b,
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle b,
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle > i,
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .user-copy,
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .user-chevron,
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .logout-button span:last-child,
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .sidebar-theme-row { display: none; }
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-items { max-height: 0 !important; padding: 0; opacity: 0; }
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle { width: 54px; justify-content: center; margin-inline: auto; padding: 0; }
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle > span { width: 20px; height: 20px; }
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle svg { width: 19px; height: 19px; }
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group:has(.nav-item.active) .nav-group-toggle { background: linear-gradient(135deg,rgba(184,95,63,.24),rgba(201,150,76,.10)); color: #f0c58a; }
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .sidebar-footer { display: flex; align-items: center; justify-content: center; }
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .user-trigger { width: 48px; flex: 0 0 48px; justify-content: center; padding: 5px; }
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .logout-button { display: none; }

  body.sidebar-collapsed .sidebar:hover .brand-copy,
  body.sidebar-collapsed .sidebar:focus-within .brand-copy,
  body.sidebar-collapsed .sidebar:hover .demo-label b,
  body.sidebar-collapsed .sidebar:focus-within .demo-label b,
  body.sidebar-collapsed .sidebar:hover .nav-group-toggle b,
  body.sidebar-collapsed .sidebar:focus-within .nav-group-toggle b,
  body.sidebar-collapsed .sidebar:hover .user-copy,
  body.sidebar-collapsed .sidebar:focus-within .user-copy,
  body.sidebar-collapsed .sidebar:hover .logout-button span:last-child,
  body.sidebar-collapsed .sidebar:focus-within .logout-button span:last-child,
  body.sidebar-collapsed .sidebar:hover .nav-item i,
  body.sidebar-collapsed .sidebar:focus-within .nav-item i,
  body.sidebar-collapsed .sidebar:hover .user-chevron,
  body.sidebar-collapsed .sidebar:focus-within .user-chevron { display: block; }
  body.sidebar-collapsed .sidebar:hover .nav-group-toggle > i,
  body.sidebar-collapsed .sidebar:focus-within .nav-group-toggle > i { display: block; }
  body.sidebar-collapsed .sidebar:hover .sidebar-theme-row,
  body.sidebar-collapsed .sidebar:focus-within .sidebar-theme-row { display: flex; }
  body.sidebar-collapsed .sidebar:hover .nav-group-toggle,
  body.sidebar-collapsed .sidebar:focus-within .nav-group-toggle { width: 100%; justify-content: flex-start; padding: 9px 13px; }
  body.sidebar-collapsed .sidebar:hover .brand,
  body.sidebar-collapsed .sidebar:focus-within .brand { justify-content: flex-start; padding: 28px 24px 23px; }
  body.sidebar-collapsed .sidebar:hover .demo-label,
  body.sidebar-collapsed .sidebar:focus-within .demo-label { width: auto; height: auto; justify-content: flex-start; margin: 0 18px 18px; padding: 9px 11px; }
  body.sidebar-collapsed .sidebar:hover .nav-group.open .nav-group-items,
  body.sidebar-collapsed .sidebar:focus-within .nav-group.open .nav-group-items { max-height: 360px; padding: 3px 0 7px; opacity: 1; }
  body.sidebar-collapsed .sidebar:hover .nav-group-items .nav-item,
  body.sidebar-collapsed .sidebar:focus-within .nav-group-items .nav-item { width: 100%; justify-content: flex-start; padding: 9px 13px 9px 40px; }
  body.sidebar-collapsed .sidebar:hover .sidebar-footer,
  body.sidebar-collapsed .sidebar:focus-within .sidebar-footer { display: grid; padding: 14px 8px 4px; }
  body.sidebar-collapsed .sidebar:hover .user-trigger,
  body.sidebar-collapsed .sidebar:focus-within .user-trigger { width: 100%; justify-content: flex-start; padding: 9px 10px; }
  body.sidebar-collapsed .sidebar:hover .logout-button,
  body.sidebar-collapsed .sidebar:focus-within .logout-button { display: flex; width: 100%; justify-content: flex-start; padding: 8px 12px; }
}

html[data-theme="dark"] .nav-group-toggle { color: #747e71; }
html[data-theme="dark"] .nav-group-toggle:hover { color: #cbd1c2; }

@media (max-width: 900px) {
  .nav-group-toggle b,.nav-group-toggle > i { display: block !important; }
  .nav-group.open .nav-group-items { max-height: 360px !important; padding: 3px 0 7px !important; opacity: 1 !important; }
}

/* Sidebar stability · keep the lower rail from reflowing on hover. */
@media (min-width: 901px) {
  .nav { scrollbar-gutter: stable; }
  .sidebar-footer {
    height: 166px;
    min-height: 166px;
    flex: 0 0 166px;
    overflow: hidden;
  }
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .sidebar-footer {
    align-items: flex-end;
    padding-bottom: 4px;
  }
}

/* Stable shell · the desktop sidebar overlays instead of resizing tables. */
html { overflow-y: scroll; scrollbar-gutter: stable; }
body { overflow-x: clip; }
@media (min-width: 901px) {
  .main-wrap {
    width: calc(100% - 82px);
    margin-left: 82px;
    transition: none;
    will-change: auto;
  }
  .menu-button {
    position: fixed;
    z-index: 40;
    top: 50%;
    left: 70px;
    width: 28px;
    height: 48px;
    border-color: rgba(223,190,137,.16);
    border-radius: 0 14px 14px 0;
    background: #1b2119;
    color: #d8b47b;
    box-shadow: 8px 4px 22px rgba(18,22,16,.18);
    transform: translateY(-50%);
    transition: left .28s cubic-bezier(.2,.8,.2,1), border-color .18s ease, background .18s ease;
  }
  body:not(.sidebar-collapsed) .menu-button,
  body.sidebar-collapsed .sidebar:hover + .menu-button,
  body.sidebar-collapsed .sidebar:focus-within + .menu-button { left: 264px; }
  .menu-button:hover { border-color: rgba(223,190,137,.32); background: #2a3226; }
  .menu-button svg { width: 17px; height: 17px; }
  .topbar-context { padding-left: 0; }
}
.inventory-table-wrap { overflow-x: auto; }
.inventory-data-card { contain: none; }

@media (max-width: 900px) {
  .menu-button { position: fixed; z-index: 40; top: 12px; left: 12px; }
  .topbar { padding-left: 64px; }
}
/* Operational modules imported from the source workbooks */
.module-split{display:grid;grid-template-columns:minmax(320px,.78fr) minmax(0,1.5fr);gap:22px;align-items:start}
.module-form{padding:24px}.module-form .card-header{padding:0 0 18px}.module-form .form-actions{padding:20px 0 0}
.padded{padding:22px}.driver-list{display:grid;padding:8px 24px 24px}.driver-list>div{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}.driver-list small{display:block;color:var(--muted);margin-top:3px}
.schedule-card{overflow:hidden}.schedule-table{min-width:1420px}.schedule-table td{padding:10px 8px}.schedule-table th{white-space:nowrap}.schedule-table td:first-child{min-width:190px}.schedule-table td:first-child small{display:block;color:var(--muted);margin-top:4px}.shift-cell{width:116px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink);padding:8px 7px;font-size:12px;font-weight:700}
.schedule-table th small{display:block;margin-top:4px;color:var(--muted);font-weight:600}.schedule-table tr.schedule-review td{background:color-mix(in srgb,#fff0e7 55%,var(--card))}.schedule-table tr.schedule-review td:first-child{box-shadow:inset 3px 0 #c8613c}.schedule-lower{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:22px;margin-top:22px}.coverage-table th,.coverage-table td{text-align:center}.coverage-table th:first-child,.coverage-table td:first-child{text-align:left}.coverage-cell{display:inline-flex;min-width:45px;justify-content:center;padding:7px 9px;border-radius:10px;background:#e8f4f1;color:#198c66;font-weight:800}.coverage-cell.short{background:#feeaea;color:#c33b42}.schedule-alert-list{display:grid;padding:8px 24px 24px}.schedule-alert-list>div:not(.empty-state){display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start;padding:13px 0;border-bottom:1px solid var(--line)}.schedule-alert-list small{display:block;color:var(--muted);margin-top:4px;line-height:1.45}
.treasury-total{display:grid;grid-template-columns:minmax(280px,1.4fr) repeat(3,minmax(170px,1fr));gap:14px;margin-bottom:22px}.treasury-total>div,.treasury-total article{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:23px;box-shadow:var(--shadow-soft)}.treasury-total>div{background:linear-gradient(135deg,var(--navy),#38472d);color:#fff}.treasury-total span,.treasury-total small{display:block;color:var(--muted);font-size:11px;letter-spacing:.1em;text-transform:uppercase}.treasury-total>div span,.treasury-total>div small{color:rgba(255,255,255,.68)}.treasury-total strong{display:block;font-size:24px;margin:10px 0 7px}.treasury-total>div strong{font-family:Georgia,serif;font-size:42px}
.master-detail{margin-top:22px;overflow:hidden}.master-detail>summary{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 26px;cursor:pointer;list-style:none}.master-detail>summary::-webkit-details-marker{display:none}.master-detail>summary strong,.master-detail>summary small{display:block}.master-detail>summary small{margin-top:5px;color:var(--muted);font-weight:500}.master-detail[open]>summary{border-bottom:1px solid var(--line)}.compact-toolbar{margin:0;padding:18px 22px 8px}.recipe-lines-header{padding:22px 0 10px}.recipe-edit-line{grid-template-columns:minmax(220px,1.5fr) minmax(110px,.5fr) minmax(90px,.4fr)}.recipe-edit-line input{width:100%;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);padding:11px 12px;font:inherit}.production-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0 0 20px}.production-totals>div{padding:16px 18px;border:1px solid var(--line);border-radius:16px;background:var(--soft)}.production-totals span,.production-totals strong{display:block}.production-totals span{color:var(--muted);font-size:12px}.production-totals strong{margin-top:5px;font-size:20px}
@media(max-width:1180px){.module-split,.schedule-lower{grid-template-columns:1fr}.treasury-total{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.treasury-total{grid-template-columns:1fr}.module-form{padding:18px}.page-actions input[type=date]{max-width:145px}.production-totals{grid-template-columns:1fr}.recipe-edit-line{grid-template-columns:1fr 100px}.recipe-edit-line span{display:none}.master-detail>summary{align-items:flex-start;flex-direction:column}}

/* Ficha completa: lectura y guardado accesibles en formularios extensos. */
.modal:has(#employeeProfileForm){width:min(760px,100%)}
#employeeProfileForm .employee-section{margin-top:12px;padding-top:14px;border-top:1px solid var(--line)}
#employeeProfileForm .employee-section strong{font-size:14px;color:var(--ink)}
#employeeProfileForm .form-actions{position:sticky;bottom:-27px;z-index:2;flex-wrap:wrap;background:var(--card);padding:15px 0 20px}
#employeeIdentityStatus{font-size:12px;line-height:1.5;color:var(--ink)}
@media(max-width:700px){#employeeProfileForm .form-actions{bottom:-22px}#employeeProfileForm .form-actions button{flex:1 1 100%}}

/* Identidad oficial KUMAMI: los SVG incluyen sus márgenes de protección. */
.brand { padding-inline: 14px; }
.brand-logo-full { display: block; width: 100%; max-width: 218px; height: auto; }
.brand-logo-icon { display: none; width: 48px; height: 50px; }
.auth-brand img { display: block; width: min(100%, 280px); height: auto; }
.auth-loading img { display: block; width: 72px; height: 74px; margin: auto; }
@media (min-width: 901px) {
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .brand-logo-full { display: none; }
  body.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .brand-logo-icon { display: block; }
}
@media (max-width: 900px) {
  .auth-mobile-mark { display: block; width: 220px; height: auto; margin-bottom: 48px; }
}

/* Distribución de marca: isotipo en el menú y logotipo completo en el encabezado. */
.brand, body.sidebar-collapsed .brand { justify-content: center; padding-inline: 14px; }
.brand-logo-full { display: none; }
.brand-logo-icon { display: block; width: 58px; height: 60px; max-width: none; }
.topbar-brand { display: block; width: clamp(130px, 14vw, 182px); height: auto; flex: 0 0 auto; }
.topbar-brand-dark { display: none; }
html[data-theme="dark"] .topbar-brand-light { display: none; }
html[data-theme="dark"] .topbar-brand-dark { display: block; }
.main-wrap { display: flex; min-height: 100vh; flex-direction: column; }
#mainContent { width: 100%; min-height: 0; flex: 1 0 auto; }
.site-credit { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 30px; background: #2D3826; color: #F7F2E7; }
.site-credit-brand { display: flex; align-items: center; gap: 7px; min-width: 0; color: rgba(247,242,231,.76); font-size: 10px; white-space: nowrap; }
.site-credit-brand img { display: block; width: 116px; height: 38px; flex: none; object-fit: cover; mix-blend-mode: screen; }
.site-credit small { color: rgba(247,242,231,.68); font-size: 10px; text-align: right; }
.auth-shell { max-width: none; margin: 0; padding: 0; grid-template-rows: minmax(0,1fr) auto; }
.auth-story, .auth-panel { min-height: calc(100vh - 70px); }
.auth-site-credit { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .topbar-greeting { display: none; }
  .auth-panel { grid-column: 1; }
}
@media (max-width: 620px) {
  .topbar-brand { width: 128px; }
  .location-pill { display: none; }
  .site-credit { flex-wrap: wrap; justify-content: center; padding: 13px 16px; }
  .site-credit small { width: 100%; text-align: center; }
  .auth-story, .auth-panel { min-height: calc(100vh - 94px); }
}

/* Aplicación: el símbolo K queda en el icono del sitio y en el menú contraído. */
.brand-logo-icon { display: none; }
.topbar-brand { width: clamp(104px, 11vw, 140px); }
.site-credit-brand img { width: 76px; height: auto; object-fit: contain; mix-blend-mode: normal; }
@media (min-width: 901px) {
  body:not(.sidebar-collapsed) .sidebar .brand { display: none; }
  body.sidebar-collapsed .brand-logo-icon { display: block; }
}
@media (max-width: 900px) {
  .sidebar .brand { display: none; }
}
@media (max-width: 620px) {
  .topbar-brand { width: 110px; }
}

/* Letras oficiales KUMAMI y firma ANALIT nítida a tamaño de pie. */
.site-credit-brand img { width: 120px; height: 28px; object-fit: cover; mix-blend-mode: screen; }

/* Navegación móvil: encabezado visible, módulos desplazables y pie accesible. */
@media (max-width: 900px) {
  body.mobile-menu-open { overflow: hidden; }
  .sidebar {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sidebar .brand, body.sidebar-collapsed .sidebar .brand {
    display: flex;
    min-height: 76px;
    flex: 0 0 76px;
    align-items: center;
    justify-content: flex-start;
    padding: 9px 18px 8px 67px;
  }
  .sidebar .brand-logo-full { display: none; }
  .sidebar .brand-logo-icon { display: block; width: 48px; height: 50px; max-width: none; }
  .sidebar .demo-label { flex: 0 0 auto; margin-bottom: 9px; }
  .sidebar .nav, body.sidebar-collapsed .sidebar .nav {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 18px;
  }
  .sidebar .sidebar-footer, body.sidebar-collapsed .sidebar .sidebar-footer {
    display: grid;
    justify-content: stretch;
    flex: 0 0 auto;
    max-height: 38dvh;
    padding: 14px 8px 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .sidebar .nav-group.open .nav-group-items {
    max-height: none !important;
    overflow: visible;
    transition: opacity .2s ease;
  }
  .sidebar .nav-group-toggle { min-height: 44px; }
  .sidebar .nav-group-items .nav-item { min-height: 44px; }
  body.mobile-menu-open .menu-button {
    border-color: rgba(247,242,231,.2);
    background: #2D3826;
    color: #F7F2E7;
  }
}

/* El logotipo/nombre KUMAMI de la pantalla de entrada abre la web comercial.
   Es un enlace de verdad, pero tiene que verse exactamente igual que antes:
   sin subrayado, con el mismo color y el mismo tamaño; solo cambia el cursor,
   y con teclado el foco se ve. No fija "display" a propósito: así el enlace del
   móvil se sigue ocultando en escritorio con .auth-mobile-mark y no queda un
   enlace invisible al que se pueda llegar con el tabulador. */
.brand-web-link { color: inherit; text-decoration: none; cursor: pointer; border-radius: 6px; }
.brand-web-link img { display: block; width: 100%; height: auto; }
.brand-web-link:focus-visible { outline: 2px solid #d7a96c; outline-offset: 4px; }
.auth-brand .brand-web-link { width: min(100%, 280px); }

/* El crédito "Desarrollado por ANALIT" del pie lleva a la web de ANALIT.
   Abre en OTRA pestaña a propósito: dentro de la app alguien puede estar a
   mitad de un registro y un clic no puede sacarlo de su trabajo. Se ve igual
   que antes: sin subrayado, mismo color y mismo tamaño del logotipo; solo
   cambia el cursor, y con teclado el foco se ve. */
.site-credit-link { display: inline-flex; align-items: center; flex: none; color: inherit; text-decoration: none; cursor: pointer; border-radius: 4px; }
.site-credit-link:focus-visible { outline: 2px solid #d7a96c; outline-offset: 3px; }
