:root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#111111;background:#111111;font-variant-numeric:tabular-nums;--green:#946f00;--line:#dededb;--muted:#575757}*{box-sizing:border-box}body{margin:0}button,select,input{font:inherit;color:inherit}button,select{cursor:pointer}button,select,input{border:1px solid var(--line);border-radius:8px;background:white;padding:8px 12px}button:hover,select:hover{border-color:#a38826;background:#fff8da}button:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #bb8d00;outline-offset:2px}header{height:56px;display:flex;align-items:center;gap:32px;padding:0 3.5%;background:#111111;color:white;position:sticky;top:0;z-index:4}.brand{font-size:24px;font-weight:720;letter-spacing:-1.4px;display:flex;align-items:center;gap:10px}.brand svg{fill:#f2c400}nav,.tools{display:flex;align-items:center;gap:4px}header button,header select{background:transparent;color:#eeeeee;border-color:transparent;font-size:14px}header button:hover,header select:hover,header button.active{background:#2a2a2a;border-color:transparent;color:white}.tools{margin-left:auto}.tools button{border-color:#555555}main{max-width:1560px;margin:auto;padding:32px 3.5% 48px}.intro,.row,.dialogHead{display:flex;align-items:center;justify-content:space-between;gap:12px}.intro{align-items:center;margin-bottom:17px}.context{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}.context i{width:7px;height:7px;border-radius:50%;background:#f2c400}h1,h2,h3,p{margin:0}h1{font-size:clamp(30px,3vw,44px);font-weight:650;letter-spacing:-1.8px;margin:6px 0}h2{font-size:19px;letter-spacing:-.55px;font-weight:650}h3{font-size:15px}p,.muted,small{color:var(--muted)}.import,.primary{background:#f2c400;color:white;border-color:transparent;font-weight:600}.import:hover,.primary:hover{background:#e1b500}.context,.meta,small{font-size:13px}.meta{margin-top:5px;color:var(--muted)}#chips{display:flex;gap:5px;flex-wrap:wrap}#chips button{margin-bottom:10px;font-size:13px;background:#fff4bd}#status:empty{display:none}#status{background:#fff8df;padding:9px;border-radius:8px;margin-bottom:10px}#kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:16px}.card,article,#comparison:not(:empty){background:white;border:1px solid var(--line);border-radius:14px;box-shadow:0 2px 4px #1b413503}.card{padding:16px 20px;position:relative}.card:first-child{background:#f2c400;color:#fff;border-color:#f2c400}.card:first-child small{color:#2a2a2a}.kname{font-size:14px;font-weight:600}.big{font-size:clamp(25px,2.4vw,38px);font-weight:620;letter-spacing:-1.2px;margin:6px 0}.big em{font-size:15px;font-weight:400;font-style:normal;letter-spacing:0}.delta{display:inline-block;background:#eeeeeb;color:#2a2a2a;border-radius:5px;padding:2px 6px;font-size:13px;margin-right:5px}.delta.down{background:#f1e8d7;color:#573b0a}.panels,.lower{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(0,1fr);gap:16px;margin:16px 0}article,#comparison:not(:empty){padding:20px;min-width:0}.sectionhead{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.icon{padding:5px 8px;font-size:15px}.chartTools,.legend{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0;font-size:13px}.chartTools{justify-content:space-between}.chartTools select{font-size:13px;padding:5px 8px}.legend span:before{content:"";display:inline-block;width:20px;border-top:3px solid #946f00;vertical-align:middle;margin-right:5px}.legend span+span:before{border-color:#555555;border-top-style:dashed}.graph{position:relative}.graph svg{width:100%;height:auto;display:block;overflow:visible}.graph text{font:12px Inter,"Segoe UI",sans-serif;fill:#555555}.tip{padding:8px 12px;background:#f4f2ed;border-radius:6px;margin-top:8px;font-size:14px}.rank{display:grid;grid-template-columns:1fr auto;gap:5px 12px;margin-top:12px;text-align:left;width:100%;border:0;padding:2px;background:none;font-size:14px}.rank b{font-weight:600}.track{grid-column:1/-1;background:#e8e8e5;position:relative;height:7px;border-radius:3px}.track:after{content:"";position:absolute;left:50%;height:12px;top:-2px;border-left:1px solid #888888}.track i{position:absolute;height:100%;background:#d6ab00;border-radius:3px}.track i.neg{background:#535353}.heat{display:grid;grid-template-columns:30px repeat(24,minmax(0,1fr));gap:3px;margin-top:17px;align-items:center;text-align:center}.heat small{font-size:11px}.heat button{height:18px;padding:0;border-radius:3px;border:0}.heat button:hover{outline:2px solid #111111}.scale{display:inline-block;width:90px;height:9px;background:linear-gradient(90deg,#fff8de,#876600);margin:0 5px}.scroller{overflow:auto;max-height:370px}table{border-collapse:collapse;width:100%;font-size:14px;margin-top:12px}td,th{text-align:right;border-bottom:1px solid var(--line);padding:9px 5px}th{font-weight:500;color:var(--muted)}td:first-child,th:first-child{text-align:left}td button{padding:1px 3px;text-align:left;border:0;color:#383838}.dialogHead{margin-bottom:16px}dialog{width:min(570px,96vw);max-height:88dvh;overflow:auto;border:1px solid var(--line);border-radius:15px;padding:22px;color:#111111}dialog::backdrop{background:#111111aa}.form{display:grid;gap:13px}.form label{display:grid;gap:5px;font-size:14px;font-weight:550}.form input,.form select{width:100%;min-height:40px}.form label.check{display:flex;align-items:center}.check input{width:auto;min-height:0}.menu{display:grid;gap:8px}.menu button{text-align:left}.empty{padding:22px 0;color:var(--muted)}.mobileHeat{display:none}.note{font-size:13px;color:var(--muted);margin-top:10px}.legendDot{display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:4px}.stack{display:flex;align-items:end;height:120px;gap:5px}.stack>div{flex:1;display:flex;height:100%;flex-direction:column-reverse;justify-content:flex-start}.stack button{padding:0;border:0;border-radius:1px;width:100%}#comparison{margin-top:16px}button:disabled{opacity:.5;cursor:wait}
@media(max-width:980px){header{gap:12px;padding:0 16px}main{padding:22px 16px}.panels,.lower{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr)}article{padding:15px}.sectionhead{flex-wrap:wrap}.legend{gap:6px}}
@media(max-width:720px){header{gap:7px;height:54px;padding:0 10px}.brand{font-size:19px;gap:4px}.brand svg{width:21px}.tools{gap:2px}.tools button{padding:5px 7px}.tools button,.tools select{min-height:44px}.tools #filters span{display:none}main{padding:18px 10px}.intro{align-items:flex-start}.import{display:none}h1{font-size:32px}.intro p{font-size:14px}#kpis{grid-template-columns:1fr;gap:6px}.card{display:grid;grid-template-columns:1fr auto;align-items:center;padding:10px 14px}.card .big{grid-row:1/3;grid-column:2;margin:0}.card small{font-size:12px}.panels,.lower{grid-template-columns:1fr;gap:10px;margin:10px 0}article{padding:15px}.rank{min-height:44px}.heatWrap{display:none}.mobileHeat{display:inline-block;margin-top:12px}.heatWrap.expanded{display:block;overflow:auto}.heatWrap.expanded .heat{min-width:700px}.heatWrap.expanded button{min-height:32px}dialog{margin:auto auto 0;width:100%;max-width:100%;border-radius:15px 15px 0 0}.form button,.form select,.form input,.icon,.chartTools select,.dialogHead button,.menu button{min-height:44px}.graph svg{min-height:170px}.chartTools{gap:5px}.legend{font-size:12px}.rank .track{height:8px}}
@media(prefers-reduced-motion:no-preference){button{transition:background .12s,border-color .12s}}

#restaurants { display:none }
.restaurant-view #restaurants { display:block }
.restaurant-view .panels,.restaurant-view .lower,.restaurant-view #comparison { display:none }
main { max-width:1560px; padding-top:24px }
#shortcuts { display:inline-flex; padding:3px; gap:2px; border-radius:9px; border:1px solid #454545; background:#2a2a2a }
#shortcuts button { border:0; background:none; font-size:14px; padding:5px 12px }
#shortcuts button[aria-pressed=true] { background:white; color:#111111; box-shadow:0 1px 3px #00000022; font-weight:650 }
#chips button { margin:0 }
.restaurant-layout { display:grid; grid-template-columns:minmax(0,1.95fr) minmax(280px,1fr); align-items:start; gap:16px }
#pointDetail { padding:0; overflow:hidden }
.point-heading { padding:18px 20px 12px; display:flex; align-items:center; justify-content:space-between; gap:12px }
#pointSearch { width:min(42%,230px); background:#fafafa }
.point-scroll { max-height:68vh; overflow:auto; scrollbar-gutter:stable }
.point-table { margin:0; border-spacing:0; border-collapse:separate; font-size:15px }
.point-table thead th { position:sticky; top:0; background:#efefed; z-index:1; color:#333333; padding:7px 12px; font-size:14px }
.point-table th button { border:0; background:transparent; font-weight:600; padding:2px 0 }
.point-table thead small { display:block; font-weight:400 }
.point-table tbody th,.point-table tbody td { padding:7px 12px; background:white }
.point-table tbody tr:nth-child(even)>* { background:#fafafa }
.point-table tbody tr:hover>* { background:#fff8d9 }
.point-table .point-link { text-align:left; color:#252525 }
.point-metric b,.point-metric small,.partial { display:block }
.point-metric small { font-size:12px; margin-top:2px }
.partial { color:#815128; margin-top:3px }
.positive { color:#333333 }
.negative { color:#614414 }
.network-kpi .change { font-weight:650; padding:2px 7px; border-radius:4px; background:#eeeee9; margin-right:5px }
.network-kpi .change.negative { background:#f5ecce }
.network-kpi:first-child .change { color:#1c1c1c }
.network-kpi:first-child .change.negative { color:#493700 }
.network-kpi small>span:last-child { white-space:nowrap }
#movementPanel { border-top:3px solid #f2c400 }
.movement-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:12px 0 }
.movement { display:grid; grid-template-columns:minmax(0,1fr) auto; width:100%; gap:6px 9px; padding:9px 0; border:0; text-align:left; font-size:14px }
.movement strong { font-variant-numeric:tabular-nums }
.axis { grid-column:1/-1; display:block; position:relative; height:8px; background:#e8e8e5; border-radius:2px }
.axis:after { content:""; position:absolute; left:50%; top:-2px; bottom:-2px; border-left:1px solid #707070 }
.axis i { position:absolute; height:100% }
.axis .rise { background:#dfb500 }
.axis .fall { background:#555555 }
.all-changes { margin-top:14px; width:100% }
.mobileSort { display:none }
@media(min-width:721px) and (max-width:1020px){.restaurant-layout{grid-template-columns:minmax(0,1.65fr) minmax(230px,1fr)}header{gap:8px}.point-heading{align-items:flex-start;flex-direction:column}#pointSearch{width:100%}.point-table tbody th,.point-table tbody td,.point-table thead th{padding:6px}}
@media(max-width:720px){
 main{padding-top:16px}
 #shortcuts button,.all-changes,.movement-tools select { min-height:44px }
 .restaurant-layout { display:flex; flex-direction:column }
 #movementPanel,#pointDetail { width:100% }
 #movementPanel { order:-1 }
 .movement { min-height:44px; padding:6px 0 }
 .network-kpi .big { font-size:24px }
 .point-heading { padding:14px; flex-wrap:wrap }
 #pointSearch { width:100%; min-height:44px }
 .mobileSort { display:block; padding:0 14px 8px; font-size:13px }
 .mobileSort select { min-height:44px }
 .point-scroll { max-height:none; scrollbar-gutter:auto }
 .point-table thead { display:none }
 .point-table,.point-table tbody { display:block }
 .point-table tbody tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-top:1px solid var(--line); padding:4px 12px 10px; gap:3px }
 .point-table tbody th,.point-table tbody td { text-align:left; border:0; padding:2px; background:transparent }
 .point-table tbody th { grid-column:1/-1 }
 .point-metric:before { content:attr(data-label); font-size:12px; color:var(--muted) }
 .point-link { min-height:44px }
}

.mobile-views { display:none }
@media(max-width:720px){
 .mobile-views { display:flex; gap:4px; margin-bottom:9px }
 .mobile-views button { flex:1; min-height:44px }
 .mobile-views button[aria-pressed=true] { color:#fff; background:#2a2a2a; border-color:#2a2a2a }
 #restaurants[data-view=table] #movementPanel,#restaurants[data-view=changes] #pointDetail { display:none }
}

.matrix-view .panels,.matrix-view .lower,.matrix-view #comparison{display:none}
.econ-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0}
.scenario-fields{display:flex;align-items:end;gap:12px;margin-top:12px}
.scenario-fields label{display:grid;flex:1;gap:5px;font-size:14px}
.scenario-fields input{width:100%;min-height:44px}
.econ-breakdown .sectionhead{align-items:center}
.point-table .change{white-space:normal}
@media(min-width:721px){.restaurant-layout{grid-template-columns:minmax(0,2.6fr) minmax(250px,1fr)}}
@media(max-width:720px){.econ-grid{grid-template-columns:1fr}.point-table tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))}.econ-breakdown .sectionhead{align-items:flex-start}.network-kpi small{grid-column:1/-1}.network-kpi .big{grid-row:1}.scenario-fields{flex-wrap:wrap}}

/* ПЕКУ ПЕКУ — цвета из фирменной карточки. */
:root {
  --brand-black:#111111;
  --brand-yellow:#f2c400;
  --brand-paper:#ffffff;
  --brand-graphite:#2a2a2a;
}
header { border-bottom:1px solid #444; box-shadow:0 2px 10px #0002 }
.brand { color:var(--brand-paper); font-family:Georgia,"Times New Roman",serif; font-weight:700; letter-spacing:-.04em; border-bottom:3px solid var(--brand-yellow); line-height:1.05 }
header button.active,#shortcuts button[aria-pressed=true],.mobile-views button[aria-pressed=true] {
  background:var(--brand-yellow); color:var(--brand-black); border-color:var(--brand-yellow)
}
header button:focus-visible,header select:focus-visible { outline-color:var(--brand-yellow) }
main { padding-top:20px }
.intro { justify-content:flex-start; gap:20px; margin-bottom:14px }
.bakery-logo { display:block; width:86px; height:88px; padding:5px; border-radius:4px; background:white; object-fit:contain; flex:none }
.report-title { min-width:0 }
.intro h1,.sectionhead h2,.point-heading h2,article>h2,#comparison h2,.dialogHead h2 {
  font-family:Georgia,"Times New Roman",serif; font-weight:700
}
.intro h1 { color:white; font-size:clamp(32px,3.2vw,49px); letter-spacing:-.035em; line-height:1.08 }
.intro .context,.intro p { color:#d2d2d2 }
.intro .import { margin-left:auto }
.import,.primary,.import:hover,.primary:hover { color:var(--brand-black) }
#shortcuts button { color:#f3f3f3 }
#shortcuts button:hover { color:var(--brand-black); background:#fff4c3 }
#shortcuts button[aria-pressed=true] { color:var(--brand-black); background:var(--brand-yellow) }
.card,article,#comparison:not(:empty) { border-radius:8px; box-shadow:none }
.card { color:white; background:var(--brand-graphite); border-color:#404040 }
.card small,.card .muted { color:#dedede }
.card:first-child { background:var(--brand-yellow); border-color:var(--brand-yellow); color:var(--brand-black) }
.card:first-child small,.card:first-child .muted { color:var(--brand-graphite) }
.network-kpi .change,.delta { color:#222; background:#e6e6e1 }
.network-kpi .change.negative,.delta.down { color:#422e07; background:#faeabc }
article h2 { font-size:22px; letter-spacing:-.035em }
.point-table thead { box-shadow:inset 0 -2px #c9c9c7 }
.point-table th[aria-sort=ascending],.point-table th[aria-sort=descending] { box-shadow:inset 0 -3px var(--brand-yellow) }
.point-table .point-link:hover { text-decoration:underline; text-decoration-color:#ad8700; text-underline-offset:3px }
#movementPanel { border-top:4px solid var(--brand-yellow) }
.axis .fall,.track i.neg { background:repeating-linear-gradient(120deg,#444 0 4px,#777 4px 6px) }
.point-metric .change { font-weight:550 }
@media(max-width:720px) {
  .intro { gap:12px; align-items:center }
  .bakery-logo { width:62px; height:64px; padding:3px }
  .intro h1 { font-size:clamp(25px,7vw,32px); margin:4px 0 }
  .intro p,.intro .context { font-size:12px }
  main { padding-top:14px }
}

/* Dashboard navigation and report controls */
:root { --rail-width:64px; --toolbar-height:58px }
html { scroll-padding-top:calc(var(--report-header-height,var(--toolbar-height)) + 12px) }
body { padding-left:var(--rail-width) }
.side-rail {
  position:fixed; inset:0 auto 0 0; z-index:6; width:var(--rail-width);
  display:flex; align-items:center; flex-direction:column; gap:16px;
  padding:10px 0; border-right:1px solid #444; background:var(--brand-black);
}
.side-rail .bakery-logo { width:42px; height:42px; padding:3px }
#nav { display:flex; flex-direction:column; gap:7px }
#nav button {
  position:relative; display:grid; place-items:center; width:44px; height:44px;
  padding:0; color:#eee; border:1px solid #484848; background:var(--brand-graphite);
}
#nav button:hover { border-color:var(--brand-yellow) }
#nav button[aria-current=page] {
  border-color:var(--brand-yellow); background:var(--brand-yellow); color:var(--brand-black);
}
#nav svg {
  width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8;
  stroke-linecap:round; stroke-linejoin:round; pointer-events:none;
}
#nav button span {
  visibility:hidden; position:absolute; left:calc(100% + 8px); top:50%; transform:translateY(-50%);
  padding:7px 10px; border:1px solid #555; border-radius:6px; white-space:nowrap;
  background:#222; color:white; font-size:13px; pointer-events:none;
}
@media (hover:hover) { #nav button:hover span { visibility:visible } }
#nav button:focus-visible span { visibility:visible }
.report-header {
  display:block; height:auto; padding:0; position:sticky; top:0; z-index:5;
}
.report-toolbar {
  height:var(--toolbar-height); display:flex; align-items:center; gap:12px;
  padding:0 18px;
}
.period-controls { display:flex; align-items:center; gap:6px; min-width:0 }
#back { flex:none; white-space:nowrap; border-color:#555 }
.report-header [hidden] { display:none }
.report-selects { display:flex; min-width:0; align-items:center; gap:7px }
.report-header select { border-color:#555; background:#232323; color:white; min-width:0; max-width:215px }
.report-header select option { background:#232323; color:white }
.report-header .tools { flex:none; gap:4px }
.movement-tools select { max-width:100%; min-width:0 }
#filterCount { margin-left:4px; padding:0 4px; border-radius:4px; background:var(--brand-yellow); color:#111 }
#periodPreset { display:none }
#chips:not([hidden]) { display:flex; flex-wrap:wrap; gap:5px; padding:0 18px 8px }
#chips button {
  display:inline-flex; align-items:center; gap:6px; max-width:100%; padding:4px 8px;
  color:var(--brand-black); background:#fff4bd; text-align:left; overflow-wrap:anywhere;
}
#chips button:hover { background:var(--brand-yellow) }
@media(max-width:1060px) {
  .report-header #shortcuts { display:none }
  #periodPreset { display:block; flex:none }
}
@media(max-width:650px) {
  :root { --rail-width:52px; --toolbar-height:98px }
  .side-rail { padding-top:8px; gap:12px }
  .side-rail .bakery-logo { width:38px; height:38px }
  #nav { gap:5px }
  .report-toolbar {
    display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:44px 39px;
    gap:3px 5px; padding:5px 6px 6px;
  }
  .report-selects { grid-row:2; grid-column:1/-1 }
  .report-header select { width:100%; max-width:none; padding:5px 4px; min-height:37px }
  .report-selects select { width:50% }
  #periodPreset { flex:1 1 0; min-height:44px }
  #back { min-height:44px; padding-inline:7px }
  #chips:not([hidden]) { padding:0 6px 6px }
  #chips button { min-height:32px }
  .report-header .tools button { min-width:42px }
  .report-header .tools button span { display:none }
  .intro h1 { overflow-wrap:anywhere }
  .network-kpi .big { font-size:clamp(18px,5.7vw,24px) }
}
@media(max-width:390px) {
  #back { width:34px; padding-inline:0 }
  #back .back-label { display:none }
  .report-header .tools button { min-width:36px; padding-inline:5px }
}
@media(max-height:405px) {
  .side-rail { gap:6px; padding-top:4px }
  #nav { gap:3px; max-height:calc(100dvh - 56px); overflow-y:auto; scrollbar-width:none }
  #nav button { flex:none }
}

.matrix-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:14px 0 }
.matrix-tools button[aria-pressed=true] { background:var(--brand-yellow); border-color:var(--brand-yellow) }
.matrix-tools input { min-width:0; max-width:100% }
.matrix-tools select { max-width:100% }
#matrixSkuTools[hidden] { display:none }
#matrixSkuTools select { width:min(24rem,100%) }
.matrix-shop-bar { display:block; height:4px; margin:5px 3px 0; border-radius:3px; background:#ede9dd }
.matrix-shop-bar i { display:block; height:100%; border-radius:inherit; background:var(--brand-yellow) }
th .table-sort {
  display:inline-flex; justify-content:flex-end; align-items:center; gap:3px;
  max-width:100%; padding:3px 2px; border:0; border-radius:4px;
  background:transparent; color:inherit; text-align:inherit; font:inherit; font-weight:inherit;
}
th:first-child .table-sort { justify-content:flex-start }
th .table-sort:hover { background:#fff4c3 }
.table-sort .sort-direction { flex:none; color:#716343; font-size:.9em }
th[aria-sort] .table-sort { color:#17140e }
th[aria-sort] .sort-direction { color:#756000; font-weight:700 }
.matrix-scroll { max-height:65vh }
.matrix-table thead th { position:sticky; top:0; background:#eee; z-index:1 }
.matrix-table th,.matrix-table td { padding:9px 10px }
.matrix-table tbody tr:nth-child(even) { background:#f8f8f8 }
.matrix-table tbody th { width:36% }
.matrix-table td small { display:block; margin-top:2px }
.matrix-table th button { text-align:left; padding:3px 0; border:0; text-decoration:underline; text-underline-offset:2px }
@media(max-width:720px) {
 .matrix-table { min-width:555px }
 .matrix-view #matrix article { padding:12px }
 .matrix-tools button,.matrix-tools select,.matrix-tools input { min-height:44px }
 .matrix-view .scroller { overflow:auto }
}

/* Report tables and hourly activity */
.lower { grid-template-columns:1fr; align-items:start }
#detailPanel { grid-row:1 }
.scroller th,.scroller td { padding:8px 10px }
.scroller td:not(:first-child) { white-space:nowrap }
.scroller thead th { text-wrap:balance }
.scroller tbody tr:nth-child(even) { background:#f7f7f6 }
.scroller table { margin-top:0 }
.scroller { margin-top:12px }
.matrix-table th button { color:#111 }
.matrix-linear { min-width:1060px; border-collapse:separate; border-spacing:0 }
.matrix-linear tbody th { width:auto; min-width:210px; max-width:300px; text-align:left }
.matrix-linear tr:first-child th { height:40px }
.matrix-linear tr:nth-child(2) th { top:40px }
.matrix-linear tr:first-child th:not(:first-child) { text-align:center }
.matrix-linear tbody th,.matrix-linear thead tr:first-child th:first-child { position:sticky; left:0; background:#f7f7f5; z-index:2 }
.matrix-linear thead tr:first-child th:first-child { top:0; z-index:3; text-align:left }
.matrix-group-start { border-left:2px solid #dededb }
.heat-scroll { overflow:auto; margin-top:12px }
.hour-table { margin:0; min-width:430px; table-layout:fixed }
.hour-table th,.hour-table td { padding:3px; text-align:center }
.hour-table th:first-child { width:62px; text-align:center; position:sticky; left:0; background:#fff; z-index:1 }
.hour-table td button { width:100%; padding:4px 2px; text-align:center; min-height:25px; color:#111; font-size:13px; border-radius:3px }
.hour-table .heat-empty { color:#666; background:#f4f4f3 }
.dish-tools,.dish-pagination { display:flex; flex-wrap:wrap; align-items:center; gap:8px }
.dish-tools input { min-width:0; max-width:100% }
#dishRows .scroller { max-height:none }
#dishRows th:first-child { width:48% }
#dishRows td:first-child { overflow-wrap:anywhere }
.dish-pagination { justify-content:flex-end; margin-top:12px; font-size:13px }
@media (max-width:720px) {
 .hour-table td button { min-height:36px }
 .scroller th,.scroller td { padding:6px 4px }
 .matrix-linear tbody th { min-width:135px; max-width:155px }
 #dishRows td:last-child { white-space:normal }
 #dishRows td,#dishRows th { font-size:12px }
 #dishRows th:first-child { width:auto }
}

.matrix-scroll, .point-scroll { max-height:none; overflow-x:auto; scrollbar-gutter:auto }
.matrix-scroll.matrix-scroll-limited { max-height:65vh; overflow:auto }
#pointDetail .point-link, .management-table th[scope=row] { color:#111 }
.stores-linear { width:100%; margin:0 }
.stores-linear th[scope=colgroup] button { border:0; padding:4px; text-align:center }
.stores-linear td { white-space:normal }
.stores-linear tbody tr:hover { background:#f7f1dd }
.stores-linear thead small { display:inline }
.restaurant-layout { grid-template-columns:minmax(0,1fr) }
.heat-legend { display:flex; flex-wrap:wrap; gap:4px; margin-top:9px; font-size:12px }
.heat-legend span { padding:3px 7px; border-radius:4px }
.heat-volume-0,.heat-rise-0,.heat-fall-0 { background:#f5f5f3 }
.heat-volume-1 { background:#e5f3fc }
.heat-volume-2 { background:#b3ddf3 }
.heat-volume-3 { background:#63b2da }
.heat-volume-4 { background:#0c5b86 }
.heat-rise-1 { background:#e3f5eb }
.heat-rise-2 { background:#b3e4cb }
.heat-rise-3 { background:#64bf99 }
.heat-rise-4 { background:#167553 }
.heat-fall-1 { background:#ffede7 }
.heat-fall-2 { background:#ffd0c0 }
.heat-fall-3 { background:#eea38a }
.heat-fall-4 { background:#9c381e }
.heat-legend :is(.heat-volume-4,.heat-rise-4,.heat-fall-4),
.hour-table td button:is(.heat-volume-4,.heat-rise-4,.heat-fall-4) { color:#fff }
.heat-legend .heat-empty,.hour-table .heat-empty { background:repeating-linear-gradient(135deg,#f5f5f3 0 4px,#e8e8e5 4px 6px) }
.management-view :is(#restaurants,.panels,.lower,#comparison) { display:none }
.management-table select { min-width:115px }
.management-table tbody tr:nth-child(even) { background:#f7f7f6 }

.matrix-table th button, #pointDetail .point-link, .management-table th[scope=row],
#rankPanel .rank > span:first-child, #movementPanel .movement > span:first-child { color:#000 }

@media(min-width:1100px) {
 .stores-linear { min-width:0; table-layout:fixed }
 .stores-linear thead th:first-child[rowspan] { width:17% }
 .stores-linear tbody th { min-width:0; overflow-wrap:anywhere }
 .stores-linear th,.stores-linear td { padding:7px 5px; overflow-wrap:anywhere }
}

/* Visual system for the analytical workspace */
:root {
  --workspace:#f3f2ee;
  --ink:#191815;
  --line:#e3e0d7;
  --muted:#5d5a52;
  --surface:#fff;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-6:24px;
  --panel-radius:12px;
  color:var(--ink);
  background:var(--workspace);
}
.skip-report {
  position:fixed; left:calc(var(--rail-width) + 10px); top:8px; z-index:12;
  transform:translateY(-160%); padding:8px 14px; border-radius:6px;
  background:var(--brand-yellow); color:var(--ink); font-weight:700;
}
.skip-report:focus { transform:none }
input:focus-visible,a:focus-visible { outline:3px solid #947400; outline-offset:2px }
main { padding:clamp(16px,2.5vw,36px) clamp(12px,3vw,44px) 48px; }
main:focus-visible { outline-offset:-3px }
.intro { gap:var(--space-4); margin-bottom:var(--space-6) }
.intro h1 { color:var(--ink); line-height:1.04; text-wrap:balance; font-size:clamp(30px,3.2vw,48px) }
.intro .context,.intro p { color:var(--muted); line-height:1.45 }
.intro .context i { background:#9b7a00 }
.intro .import { min-height:40px; flex:none }
#kpis {
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:clamp(4px,1vw,var(--space-3));
  margin-bottom:var(--space-6);
}
#kpis:empty { display:none }
#kpis:has(+ #kpiContext:not([hidden])) { margin-bottom:6px }
#kpiContext { color:#d2d2d2; margin:0 0 14px }
#kpis .card {
  min-inline-size:0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  container-type:inline-size;
  padding:clamp(4px,1.15vw,15px);
}
#kpis .kname { min-block-size:2.5em }
#kpis .big {
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:4px;
  max-inline-size:100%;
  margin:4px 0 7px;
}
.kpi-number {
  font-size:clamp(8px,min(24cqi,calc(175cqi / var(--kpi-chars))),38px);
  white-space:nowrap;
}
#kpis .big em { font-size:clamp(8px,8cqi,14px) }
.kpi-short-label { display:none }
.card,.card:first-child,article,#comparison:not(:empty) {
  background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:var(--panel-radius); box-shadow:0 2px 5px #1e180506;
}
.card,.card:first-child { padding:var(--space-4); border-top:3px solid #d6d1c6 }
.card[data-kpi=sales] { background:#fff8d7; border-top-color:#b18c00 }
.card[data-kpi=revenue] { background:var(--brand-yellow); border-color:var(--brand-yellow) }
.card[data-kpi=waste] { background:#f0efed; border-top-color:var(--brand-graphite) }
.card[data-kpi=wasteValue] { background:#f7eedb; border-top-color:#8b6a40 }
.card small,.card:first-child small,.card .muted,.card:first-child .muted { color:var(--muted) }
.kname { color:#454239; font-size:14px; font-weight:650; line-height:1.25 }
.big { font-size:clamp(25px,2.75vw,40px); font-weight:680; line-height:1.15; margin:7px 0; letter-spacing:-.035em }
.big em { color:var(--muted); font-size:.45em; font-weight:600; white-space:nowrap }
.kpi-meta { display:flex; flex-wrap:wrap; align-items:center; gap:5px 8px; color:var(--muted); font-size:12px; line-height:1.35 }
.kpi-meta .change { display:inline-block; margin:0 }
.kpi-coverage { flex-basis:100% }
.kpi-warning { color:#755b06; padding-left:7px; border-left:2px solid #bc9500 }
.network-kpi .change.positive,.stores-linear .change.positive { color:#115a40; background:#e1f1e8 }
.network-kpi .change.negative,.stores-linear .change.negative { color:#8b2c23; background:#fae7e3 }
.stores-linear .change { display:inline-block; border-radius:4px; padding:2px 4px }
article,#comparison:not(:empty) { padding:clamp(14px,1.8vw,24px) }
#pointDetail { padding:0 }
article h2,#comparison h2,.dialogHead h2 { font-family:inherit; font-weight:650; font-size:21px; letter-spacing:-.02em; text-wrap:balance }
.panels,.lower,.restaurant-layout { gap:var(--space-4) }
.point-heading { padding:18px 20px 14px; flex-direction:row; align-items:center; flex-wrap:wrap }
.point-tools { display:flex; align-items:center; gap:var(--space-3); flex-wrap:wrap }
#pointSearch { width:min(216px,100%) }
.point-tools a { color:#65500a; text-underline-offset:3px; font-size:13px }
.matrix-linear thead th,.scroller thead th,.management-table thead th { background:#f2efe7; color:#494438; font-weight:620 }
.matrix-linear thead tr:first-child th:first-child { background:#f2efe7 }
.matrix-linear .matrix-group-start { border-left:1px solid #d9d3c5 }
.matrix-linear tbody td strong { font-weight:680 }
.matrix-linear tbody tr:hover td { background:#fff9e5 }
.scroller tbody tr:nth-child(even) { background:#faf9f6 }
#movementPanel .axis,.track { background:#eeece6 }
.rank:focus-visible,.movement:focus-visible,.matrix-linear button:focus-visible { outline-offset:-2px }
#rankPanel .rank { padding:7px 5px; margin-top:5px }
#rankPanel .rank:hover,#movementPanel .movement:hover { background:#fff8dd }
#rankPanel .rank b,.movement strong { white-space:nowrap }
.chartTools { margin:8px 0 14px }
.tip { background:#fcf6df }
#status { color:#51410e; border:1px solid #e8dba6 }
@media(max-width:720px) {
  main { padding:16px 10px 28px }
  .intro { margin-bottom:14px }
  .intro h1 { font-size:clamp(25px,7vw,34px) }
  #kpis { margin-bottom:14px }
  #kpis .card { border-radius:8px }
  #kpis .kname { font-size:clamp(10px,2.15vw,13px) }
  #kpis .big { flex-direction:column; flex-wrap:nowrap; gap:2px; min-block-size:1.45em }
  .kpi-full-label { display:none }
  .kpi-short-label { display:inline }
  .kpi-meta { font-size:clamp(9px,1.65vw,11px); gap:3px 4px; overflow-wrap:anywhere }
  .network-kpi .change { padding:2px 3px }
  .kpi-warning { padding-left:3px }
  .point-heading { padding:14px }
  .point-tools { width:100% }
  #pointSearch { width:100%; min-height:44px }
  .point-tools a { display:none }
  article h2,#comparison h2 { font-size:18px }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important }
}

/* Separate the relative change without wrapping the percentage. */
.matrix-linear .delta-percent { white-space:nowrap; font-variant-numeric:tabular-nums }
.stores-linear .delta-percent { overflow-wrap:normal }
.stack .waste-correction { background-image:repeating-linear-gradient(135deg,transparent 0 3px,#fff9 3px 5px)!important }
.matrix-linear thead tr:nth-child(2) th { white-space:nowrap }
.matrix-linear:not(.stores-linear) { min-width:1180px }
@media(min-width:1100px) {
 .stores-linear thead tr:nth-child(2) th { padding-inline:3px; font-size:12px }
 .stores-linear .delta-percent { font-size:12px }
}

/* Black brand frame and white report surfaces. */
:root {
  --workspace:var(--brand-black);
  --chart-fact:#896500;
  --chart-base:#5a5a57;
  --chart-target:#8b4f24;
}
.report-header { background:var(--brand-black); color-scheme:dark }
.intro h1 { color:var(--brand-paper) }
.intro .context,.intro p { color:#d2d2d2 }
.intro .context i { background:var(--brand-yellow) }
.card[data-kpi=revenue] :is(.kname,.big em,.kpi-meta,.muted) { color:#392b00 }
button:disabled { cursor:default }
dialog::backdrop { background:#000b }
.matrix-linear tbody th,.matrix-table th button,#pointDetail .point-link,.sku-revenue-row > span:first-child { color:#111 }
.matrix-table th button { background:transparent }
.matrix-table th button:hover { background:#f8eac1 }
.chart-actions { display:flex; gap:6px }
.trend-plot { padding:10px 12px 4px; margin-top:8px; border:1px solid var(--line); background:var(--surface); border-radius:8px }
.trend-plot h3 { display:flex; justify-content:space-between; margin:0 0 6px }
.trend-plot .graph svg { min-height:0 }
.trend-plot .graph text { fill:var(--muted) }
.chart-grid { stroke:var(--line); stroke-width:1 }
.chart-fact { stroke:var(--chart-fact); stroke-width:2.4; fill:var(--chart-fact) }
.chart-base { stroke:var(--chart-base); stroke-width:1.6; fill:var(--chart-base) }
path.chart-fact,path.chart-base { fill:none }
path.chart-base { stroke-dasharray:6 4 }
.chart-target { stroke:var(--chart-target); stroke-width:2; stroke-dasharray:2 4 }
.legend span:before { border-color:var(--chart-fact) }
.legend span+span:before { border-color:var(--chart-base) }
.legend span.target-legend:before { border-color:var(--chart-target); border-top-style:dotted }
.reason-legend { display:flex; flex-wrap:wrap; column-gap:14px; row-gap:6px; margin-top:10px; font-size:13px; color:var(--muted) }
.trend-table-title { margin-top:14px }
.pdf-options { display:grid; gap:5px; margin:0; padding:12px; border:1px solid var(--line); border-radius:8px }
.pdf-options .meta { margin:0 0 8px 24px }
#pdfProgress:empty { display:none }
.axis.single-sided::after,.track.single-sided::after { left:0 }
.axis .rise,.track .rise { background:var(--brand-yellow) }
.sku-revenue { margin-top:20px; padding-top:14px; border-top:1px solid var(--line) }
.sku-revenue-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 12px; margin-top:9px; font-size:14px }
.sku-revenue-track { grid-column:1/-1; height:4px; border-radius:4px; overflow:hidden; background:#eeece6 }
.sku-revenue-track i { display:block; height:100%; background:var(--brand-yellow) }
.heat-legend span { color:#111 }
.heat-legend :is(.heat-volume-4,.heat-rise-4,.heat-fall-4) { color:white }
.management-table :is(th,td) { padding:8px 12px }
@media(max-width:720px) {
 .management-table { table-layout:fixed }
 .management-table :is(th,td) { padding-inline:6px }
 .management-table th { overflow-wrap:anywhere }
 .management-table td select { min-width:0; width:100%; padding-inline:5px; font-size:13px }
 .trend-plot { padding:8px 3px }
 .trend-plot h3 { padding:0 5px }
}
.signin {
  min-height:100dvh; display:grid; place-items:center;
  padding:20px; background:var(--brand-black,#111);
}
.signin .signin-panel {
  width:min(100%,390px); margin:0; padding:clamp(20px,5vw,34px);
  border-radius:14px; background:#fff; color:#111;
  border-top:4px solid var(--brand-yellow,#f2c400);
}
.signin-panel img { display:block; object-fit:contain; margin-bottom:12px }
.signin-panel h1 { font-size:clamp(25px,5vw,32px); line-height:1.1; letter-spacing:-.03em; margin:0 0 20px }
.signin-panel .form[hidden], .signin-panel #signinStatus:empty { display:none }
body:not([data-account-role=admin]):not([data-account-role=editor]) #upload { display:none }
dialog:has(#accountResults) { width:min(850px,96vw) }
#accountResults th, #accountResults td { padding-inline:7px }
#accountResults td:first-child button { color:#111; text-decoration:underline; text-underline-offset:3px }
#backToUsers { margin-top:12px }
