nav#tabs [data-view="live-calendar"] { font-size:13px; white-space:normal; line-height:1.25; }
nav#tabs:has([data-view="gastro-bonuses"]:not([hidden])) :is([data-view="shift-openings"],[data-view="live-calendar"],[data-view="gastro-bonuses"]) { grid-column:span 2; }
nav#tabs:has([data-view="gastro-bonuses"][hidden]) :is([data-view="shift-openings"],[data-view="live-calendar"]) { grid-column:span 3; }
#periodLabel { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.lc-panel {
  --lc-warn:#8a5706;
  --lc-warn-bg:#fff1d8;
  --lc-miss-bg:#faedf0;
  --lc-low-bg:#f9dfe6;
  --lc-great-bg:#d5f2e5;
  min-width:0;
  display:grid;
  gap:12px;
  padding:13px;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  background:var(--surface);
  box-shadow:var(--shadow);
}
.lc-dialog {
  --lc-good-text:#126b4d;
  --lc-warn:#8a5706;
  --lc-warn-bg:#fff1d8;
  --lc-miss-bg:#faedf0;
  --lc-low-bg:#f9dfe6;
  --lc-great-bg:#d5f2e5;
  display:grid;
  gap:10px;
}
:root[data-theme="dark"] :is(.lc-panel,.lc-dialog) {
  --lc-good-text:var(--good);
  --lc-warn:#ffd38b;
  --lc-warn-bg:#413422;
  --lc-miss-bg:#382c37;
  --lc-low-bg:#482d39;
  --lc-great-bg:#1a4739;
}

.lc-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.lc-heading h2 { margin:0; font-size:18px; line-height:1.2; }
.lc-control {
  display:grid;
  place-items:center;
  width:44px;
  height:42px;
  padding:0 0 3px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--surface-2);
  color:var(--text);
  font-size:24px;
  line-height:1;
  cursor:pointer;
}
.lc-monthbar { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; gap:7px; align-items:center; }
.lc-monthbar strong { text-align:center; font-size:16px; }
.lc-month-picker, .lc-month-choice {
  min-height:42px;
  padding:6px 4px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface-2);
  color:var(--text);
  font-weight:650;
  cursor:pointer;
}
.lc-month-picker { font-size:15px; }
.lc-month-picker span { color:var(--muted); }
.lc-month-picker::first-letter, .lc-month-choice::first-letter { text-transform:uppercase; }
.lc-month-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
.lc-month-choice[aria-pressed="true"] { color:var(--accent); background:var(--primary-soft); border-color:var(--primary); }
.lc-scope {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);
  gap:8px;
}
.lc-scope > :only-child { grid-column:1 / -1; }
.lc-select { display:grid; gap:4px; min-width:0; color:var(--muted); font-size:12px; font-weight:650; }
.lc-select select {
  display:block;
  min-width:0;
  width:100%;
  min-height:40px;
  padding:6px 7px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface-2);
  color:var(--text);
  font:inherit;
  font-size:14px;
  text-overflow:ellipsis;
}

.lc-filter-bar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.lc-filter-open, .lc-filter-clear {
  min-height:40px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface-2);
  color:var(--text);
  font:inherit;
  font-size:13px;
  font-weight:650;
  cursor:pointer;
}
.lc-filter-open { display:inline-flex; align-items:center; gap:6px; }
.lc-filter-open:not(:only-child) { color:var(--accent); background:var(--primary-soft); }
.lc-filter-open span {
  min-width:18px;
  padding:2px 4px;
  border-radius:6px;
  background:var(--primary-2);
  color:#fff;
  text-align:center;
  font-size:11px;
}
.lc-filter-clear { margin-left:auto; color:var(--accent); background:var(--surface); }

.lc-filter-sheet { gap:14px; }
.lc-filter-group { min-inline-size:0; margin:0; padding:0; border:0; }
.lc-filter-group legend { margin-bottom:6px; padding:0; font-size:13px; font-weight:700; }
.lc-filter-group > div { display:flex; flex-wrap:wrap; gap:5px; }
.lc-filter-chip {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:39px;
  padding:5px 8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface-2);
  color:var(--text);
  font:inherit;
  font-size:12px;
  font-weight:600;
  line-height:1.2;
  cursor:pointer;
}
.lc-filter-chip[aria-pressed="true"] { border-color:var(--primary); background:var(--primary-soft); color:var(--accent); }
.lc-filter-chip[aria-disabled="true"] { cursor:default; }
.lc-filter-chip[data-lc-filter-key="critical"]:not([aria-pressed="true"]) { color:var(--bad); }
.lc-filter-chip i { width:7px; height:7px; border-radius:2px; background:var(--muted); }
.lc-filter-chip i.tone-miss { background:var(--bad); }
.lc-filter-chip i.tone-near { background:var(--lc-warn); }
.lc-filter-chip i.tone-done, .lc-filter-chip i.tone-great { background:var(--good); }
.lc-filter-actions {
  position:sticky;
  bottom:0;
  z-index:1;
  display:grid;
  grid-template-columns:1fr 1.4fr;
  gap:8px;
  padding:8px 0 2px;
  border-top:1px solid var(--line);
  background:var(--surface);
}

.lc-kpis {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  margin:0;
}
.lc-kpis > div { min-width:0; padding:7px 6px; border-radius:9px; background:var(--surface-2); }
.lc-kpis dt { color:var(--muted); font-size:11px; line-height:1.2; }
.lc-kpis dd {
  margin:3px 0 0;
  font-size:clamp(11px,3.05vw,15px);
  font-weight:700;
  line-height:1.2;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}

.lc-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.lc-weekday { text-align:center; color:var(--muted); font-size:11px; font-weight:650; }
.lc-weekday:nth-child(n+6), .lc-day-number.is-weekend { color:var(--bad); }
.lc-day {
  display:grid;
  grid-template-rows:1fr auto 1fr;
  align-items:center;
  justify-items:center;
  gap:1px;
  min-width:0;
  min-height:60px;
  padding:4px 0;
  border:1px solid var(--line);
  border-radius:8px;
  text-align:center;
  color:var(--text);
  background:var(--surface-2);
  font:inherit;
  font-variant-numeric:tabular-nums;
  cursor:pointer;
  touch-action:manipulation;
}
.lc-day-number { align-self:start; font-size:13px; line-height:1; font-weight:700; color:var(--text); }
.lc-day strong { font-size:clamp(9px,2.55vw,12px); line-height:1; }
.lc-day small { font-size:clamp(8px,2.5vw,11px); line-height:1; align-self:end; }
.lc-grid.is-single-metric .lc-day { grid-template-rows:auto 1fr; }
.lc-grid.is-single-metric .lc-day small { align-self:center; font-size:clamp(9px,2.55vw,12px); font-weight:700; }
.lc-day.is-filtered { opacity:.55; color:var(--muted); }
.lc-day.is-today { border-color:var(--primary); box-shadow:inset 0 0 0 1px var(--primary); }
.lc-day.is-future { background:var(--surface-2); color:var(--muted); }
.tone-low:is(.lc-day,.lc-store-button strong) { color:var(--bad); background:var(--lc-low-bg); }
.tone-miss:is(.lc-day,.lc-legend span,.lc-store-button strong) { color:var(--bad); background:var(--lc-miss-bg); }
.tone-near:is(.lc-day,.lc-legend span,.lc-store-button strong) { color:var(--lc-warn); background:var(--lc-warn-bg); }
.tone-done:is(.lc-day,.lc-legend span,.lc-store-button strong) { color:var(--good); background:var(--good-soft); }
.tone-great:is(.lc-day,.lc-store-button strong) { color:var(--good); background:var(--lc-great-bg); }
.lc-legend {
  display:flex;
  gap:5px;
  align-items:center;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:11px;
  line-height:1.25;
}
.lc-legend .tone-miss, .lc-legend .tone-near, .lc-legend .tone-done { padding:3px 6px; border-radius:5px; font-weight:700; white-space:nowrap; }

.lc-date, .lc-note { margin:0; color:var(--muted); font-size:13px; line-height:1.35; }
.lc-date::first-letter { text-transform:uppercase; }
.lc-dialog h3, .lc-dialog h4 { margin:0; font-size:14px; line-height:1.3; }
.lc-metrics { margin:0; display:grid; }
.lc-metrics > div {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:8px;
  padding:8px 0;
  border-bottom:1px solid var(--line);
  font-size:13px;
  line-height:1.35;
}
.lc-metrics dt { color:var(--muted); }
.lc-metrics dd { min-width:0; margin:0; font-weight:650; white-space:pre-line; overflow-wrap:anywhere; }
.lc-dialog > .lc-metrics dd { text-align:right; font-variant-numeric:tabular-nums; }
.lc-highlight { font-weight:700; }
.lc-highlight.is-good { color:var(--lc-good-text); }
.lc-highlight.is-bad { color:var(--bad); }
.lc-highlight.is-attention { color:var(--lc-warn); }
.lc-analysis { display:grid; gap:10px; margin-top:4px; }
.lc-analysis > h3 { font-size:16px; }
.lc-assessment {
  display:grid;
  gap:3px;
  padding:9px 11px;
  border-radius:9px;
  background:var(--surface-2);
  font-size:14px;
  line-height:1.35;
}
.lc-assessment span { color:var(--muted); font-size:12px; }
.lc-assessment:has(.is-good) { background:var(--good-soft); }
.lc-assessment:has(.is-bad) { background:var(--bad-soft); }
.lc-assessment:has(.is-attention) { background:var(--lc-warn-bg); }
.lc-analysis-section {
  display:grid;
  gap:5px;
  padding:8px 2px 9px;
  border-bottom:1px solid var(--line);
  font-size:14px;
  line-height:1.42;
}
.lc-analysis-section > div { min-width:0; display:grid; gap:5px; overflow-wrap:anywhere; }
.lc-analysis-section p { margin:0; }
.lc-analysis-fact { font-size:15px; font-variant-numeric:tabular-nums; }
.lc-breakdown {
  display:grid;
  gap:6px;
  margin:0;
  padding:0;
  list-style:none;
}
.lc-breakdown li { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:2px 9px; }
.lc-breakdown li .lc-highlight { white-space:nowrap; }
.lc-explanation {
  display:grid;
  gap:6px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface-2);
  font-size:13px;
  line-height:1.38;
}
.lc-explanation.is-action { background:var(--lc-warn-bg); color:var(--text); }
.lc-explanation.is-action h4 { color:var(--lc-warn); }
.lc-explanation p { margin:0; white-space:pre-line; }
.lc-explanation ol { display:grid; gap:5px; margin:0; padding:0 0 0 19px; }
.lc-explanation li { white-space:pre-line; }
.lc-back { justify-self:start; }
.lc-detail-button { width:100%; }
.lc-store-list { display:grid; gap:5px; }
.lc-store-button {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:8px;
  min-height:43px;
  padding:7px 9px;
  border:1px solid var(--line);
  border-radius:9px;
  color:var(--text);
  background:var(--surface);
  text-align:left;
  cursor:pointer;
}
.lc-store-button > strong { padding:4px 6px; border-radius:6px; font-variant-numeric:tabular-nums; }
.lc-store-button span:last-child { color:var(--muted); font-size:18px; }
.lc-detail-groups { margin:4px 0 0; padding:0; list-style:none; }
.lc-detail-groups li { display:grid; gap:3px; padding:8px 0; border-bottom:1px solid var(--line); font-size:13px; }
.lc-detail-groups li span { color:var(--muted); }

@media (max-width:360px) {
  .lc-panel { padding:9px; }
  .lc-grid { gap:3px; }
  .lc-day { min-height:56px; }
  .lc-kpis { gap:4px; }
  .lc-kpis > div { padding-inline:4px; }
  .lc-legend > :first-child { flex-basis:100%; }
}
