:root {
  --ink: #2b2911;
  --muted: #716e5b;
  --line: #e0ddc9;
  --panel: #ffffff;
  --paper: #f8f7ef;
  --steel: #2b2911;
  --brand-yellow: #f8f32b;
  --soft-yellow: #f2f0dd;
  --secondary-line: #c9c38d;
  --orange: #e16b2d;
  --blue: #2563eb;
  --green: #108a63;
  --violet: #6255d9;
  --red: #cb3d3d;
  --chart-magenta-light: #f05fa9;
  --chart-magenta: #ec2192;
  --chart-magenta-dark: #e0007a;
  --chart-cyan-light: #20b8e5;
  --chart-cyan: #1796d3;
  --chart-cyan-dark: #046eb8;
  --chart-violet-light: #b14aa6;
  --chart-violet: #93278d;
  --chart-violet-dark: #751d7b;
  --chart-indigo-light: #8265ae;
  --chart-indigo: #694d97;
  --chart-indigo-dark: #493a85;
  --shadow: 0 18px 45px rgba(43, 41, 17, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px;
  background: var(--steel);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-yellow);
  color: var(--steel);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.brand-subtitle {
  margin: 3px 0 0;
  color: #e7e4cf;
  font-size: 13px;
}

.menu-toggle {
  margin-left: auto;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.menu-toggle:hover,
.menu-toggle:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}

.status-pill {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28c76f;
  box-shadow: 0 0 0 4px rgba(40, 199, 111, 0.14);
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
  padding: 0;
  transition: grid-template-columns 0.28s ease, gap 0.28s ease;
}

.shell.is-sidebar-collapsed .layout {
  grid-template-columns: 0 minmax(0, 1fr);
  gap: 0;
}

.sidebar,
.report-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 1px 2px rgba(43, 41, 17, 0.05);
}

.sidebar {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  width: 300px;
  min-height: 100vh;
  padding: 28px 22px 22px;
  position: sticky;
  top: 0;
  z-index: 3;
  border: 0;
  border-radius: 0;
  background: var(--steel);
  color: #ffffff;
  box-shadow: none;
  transition: opacity 0.22s ease, transform 0.28s ease, visibility 0.22s ease;
}

.shell.is-sidebar-collapsed .sidebar {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-28px);
  visibility: hidden;
}

.shell.is-sidebar-collapsed .main {
  padding-left: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-brand .brand-mark {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 26px;
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand strong {
  font-size: 21px;
  line-height: 1.15;
}

.sidebar-brand span {
  margin-top: 5px;
  color: #d9d5bd;
  font-size: 13px;
}

.sidebar-divider {
  height: 1px;
  margin: 28px 0;
  background: rgba(224, 221, 201, 0.22);
}

.sidebar-nav-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  border: 2px solid var(--brand-yellow);
  border-radius: 14px;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.sidebar-nav-title span {
  color: var(--brand-yellow);
  font-size: 21px;
}

.sidebar-controls {
  min-width: 0;
}

.sidebar .field label,
.sidebar .mini-label {
  color: #d9d5bd;
}

.sidebar .select {
  min-height: 46px;
  border-color: rgba(224, 221, 201, 0.45);
  background: #ffffff;
  color: var(--ink);
}

.sidebar .button {
  border: 2px solid var(--brand-yellow);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.sidebar .button:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar .button.ghost {
  border: 1px solid rgba(224, 221, 201, 0.42);
  background: transparent;
  color: #efeddc;
}

.sidebar .button:disabled {
  border-color: rgba(224, 221, 201, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #8f8b72;
}

.sidebar .helper {
  color: #c9c5ac;
}

.sidebar .helper strong {
  color: #ffffff;
}

.sidebar-status {
  margin-top: auto;
  border: 1px solid rgba(224, 221, 201, 0.24);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-status .status-pill {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
}

.sidebar-status small {
  display: block;
  margin: 8px 0 0 16px;
  color: #bdb89d;
  font-size: 12px;
}

.field {
  margin-bottom: 14px;
}

.field label,
.mini-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: var(--ink);
  min-height: 42px;
  padding: 0 12px;
}

.select:hover,
.check-row:hover {
  border-color: var(--secondary-line);
}

.select:focus-visible,
.check-row:focus-within,
.button:focus-visible,
.menu-toggle:focus-visible {
  outline: 3px solid rgba(248, 243, 43, 0.55);
  outline-offset: 2px;
}

.section-options {
  display: grid;
  gap: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #d8dee9;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
}

.button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 0 13px;
  background: var(--steel);
  color: white;
  font-weight: 800;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.button:not(:disabled):hover {
  transform: translateY(-1px);
  background: #3a3718;
}

.button.secondary:not(:disabled):hover {
  border-color: #aaa35f;
  background: #eae7cf;
}

.button.ghost:not(:disabled):hover {
  border-color: var(--secondary-line);
  background: #faf9f1;
}

.button.secondary {
  border: 1px solid var(--secondary-line);
  background: var(--soft-yellow);
  color: var(--ink);
}

.button.ghost {
  border: 1px solid transparent;
  border-color: var(--line);
  background: #ffffff;
  color: var(--muted);
}

.button:disabled {
  cursor: not-allowed;
  background: #d9dee7;
  color: #8a94a6;
}

.helper {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.main {
  min-width: 0;
  padding: 34px clamp(20px, 3vw, 46px) 46px;
}

.workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.workspace-eyebrow {
  margin: 0 0 8px;
  color: #9b9782;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.workspace-head .brand-title {
  color: var(--ink);
  font-size: clamp(27px, 3vw, 40px);
}

.workspace-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.workspace-head .menu-toggle {
  flex: 0 0 auto;
  min-height: 42px;
  margin-left: 0;
  border: 1px solid var(--secondary-line);
  border-radius: 10px;
  background: var(--soft-yellow);
  color: var(--ink);
}

.workspace-head .menu-toggle:hover,
.workspace-head .menu-toggle:focus {
  border-color: #aaa35f;
  background: #eae7cf;
}

.report-card {
  overflow: hidden;
}

.report-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.report-title {
  margin: 0;
  font-size: clamp(23px, 2.4vw, 34px);
  line-height: 1.25;
}

.report-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.content {
  padding: 18px 20px 22px;
}

.summary {
  margin: 0 0 18px;
  max-width: 980px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.kpi-section {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-group-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kpi-section .kpis {
  margin-bottom: 0;
}


.kpis-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpis-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stacked-detail {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.stacked-detail-ingredients {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stacked-detail-card small {
  display: block;
  margin-top: 8px;
  color: #69778a;
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: lowercase;
}

.kpis-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpis-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kpi {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
}

.kpi-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kpi-value {
  margin-top: 5px;
  font-size: 26px;
  font-weight: 900;
}

.kpi-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.report-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.panel {
  min-width: 0;
  padding: 14px;
  margin-bottom: 14px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chart {
  width: 100%;
  min-height: 300px;
  display: block;
}

.chart-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: #aeb8c8 #eef2f7;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.chart-scroll:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.mobile-bar-chart {
  display: none;
}

.chart-bar {
  cursor: pointer;
  outline: none;
}

.bar-focus {
  fill: transparent;
  transition: fill 0.16s ease;
}

.bar-shape {
  transition: opacity 0.16s ease, filter 0.16s ease, transform 0.16s ease;
  transform-box: fill-box;
  transform-origin: center bottom;
}

.chart-bar:hover .bar-focus,
.chart-bar:focus .bar-focus,
.chart-bar.is-selected .bar-focus {
  fill: rgba(39, 54, 79, 0.06);
}

.chart-bar:hover .bar-shape,
.chart-bar:focus .bar-shape {
  filter: drop-shadow(0 6px 8px rgba(39, 54, 79, 0.22));
  opacity: 0.92;
  transform: scaleY(1.035);
}

.chart-bar.is-selected .bar-shape {
  filter: drop-shadow(0 7px 10px rgba(39, 54, 79, 0.3));
  stroke: #172033;
  stroke-width: 4;
}

.stacked-bar-outline {
  fill: none;
  pointer-events: none;
  stroke: transparent;
  stroke-width: 0;
  transition: stroke 0.16s ease, stroke-width 0.16s ease, filter 0.16s ease;
}

.chart-bar.is-selected .stacked-bar-outline {
  stroke: #172033;
  stroke-width: 5;
  filter: drop-shadow(0 7px 10px rgba(39, 54, 79, 0.32));
}

.day-detail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.day-detail-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft-yellow);
  padding: 10px 12px;
}

.day-detail-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.day-detail-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.table-swipe-hint {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid #edf0f5;
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--soft-yellow);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr {
  transition: background 0.14s ease, box-shadow 0.14s ease;
}

tbody tr:hover,
tbody tr:focus {
  background: #faf9f1;
  box-shadow: inset 3px 0 0 var(--secondary-line);
  outline: none;
}

tbody tr.is-selected {
  background: var(--soft-yellow);
  box-shadow: inset 3px 0 0 var(--brand-yellow);
}

.table-total-row td {
  padding-top: 14px;
  padding-bottom: 14px;
  background: #d9f2e7;
  color: #075c44;
  border-top: 3px solid #108a63;
  font-size: 15px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.table-total-row-top td {
  border-top: 0;
  border-bottom: 3px solid #108a63;
}

.table-total-row td:first-child {
  color: #063f31;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.empty {
  display: grid;
  min-height: 520px;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #5d6b7d;
}

.empty-inner {
  max-width: 520px;
}

.empty h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 22px;
}

.report-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  border: 1px solid var(--secondary-line);
  border-radius: 14px;
  padding: 16px;
  background: var(--soft-yellow);
}

.report-cta h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.report-cta p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.report-cta .button {
  min-width: 220px;
}

.error-note {
  margin: 14px 0 0;
  border: 1px solid #f1b6b6;
  border-radius: 8px;
  background: #fff5f5;
  color: #9b2c2c;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  max-width: min(360px, calc(100vw - 36px));
  border-radius: 8px;
  background: var(--steel);
  color: white;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1040px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    width: 100%;
    min-height: auto;
    padding: 20px;
  }

  .shell.is-sidebar-collapsed .layout {
    grid-template-columns: 1fr;
  }

  .shell.is-sidebar-collapsed .sidebar {
    display: none;
  }

  .sidebar-divider {
    margin: 18px 0;
  }

  .sidebar-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .sidebar-controls .actions,
  .sidebar-controls .helper {
    grid-column: 1 / -1;
  }

  .sidebar-status {
    margin-top: 18px;
  }

  .main {
    padding: 26px 18px 36px;
  }

  .kpis,
  .kpis-three,
  .kpis-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body {
    font-size: 16px;
  }

  .layout {
    padding: 0;
  }

  .sidebar-controls {
    grid-template-columns: 1fr;
  }

  .sidebar-controls .actions,
  .sidebar-controls .helper {
    grid-column: auto;
  }

  .workspace-head {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 18px;
  }

  .workspace-head .brand-title {
    font-size: 25px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .menu-toggle,
  .status-pill {
    margin-left: 0;
    min-height: 44px;
  }

  .menu-toggle {
    margin-left: 0;
    padding: 0 14px;
  }

  .select,
  .button {
    min-height: 50px;
    font-size: 16px;
  }

  .field label,
  .mini-label {
    font-size: 12px;
  }

  .status-pill {
    width: 100%;
    justify-content: center;
  }

  .report-head {
    display: block;
    padding: 16px;
  }

  .content {
    padding: 14px 12px 18px;
  }

  .summary {
    font-size: 15px;
    line-height: 1.6;
  }

  .panel {
    padding: 14px 12px;
    margin-bottom: 16px;
  }

  .panel-title {
    font-size: 18px;
    line-height: 1.4;
  }

  .kpi {
    min-height: 132px;
    padding: 18px 16px;
  }

  .kpi-label {
    font-size: 13px;
    line-height: 1.35;
  }

  .kpi-value {
    font-size: 30px;
  }

  .kpi-note {
    font-size: 15px;
  }

  .kpis,
  .day-detail {
    grid-template-columns: 1fr;
  }

  .day-detail-card {
    min-height: 88px;
    padding: 16px;
  }

  .day-detail-card span {
    font-size: 13px;
  }

  .day-detail-card strong {
    font-size: 23px;
  }

  .chart-scroll {
    margin: 0 -4px;
    width: calc(100% + 8px);
    padding: 0 4px 10px;
  }

  .chart-scroll::after {
    content: "Desliza para ver más →";
    position: sticky;
    left: 4px;
    display: block;
    width: max-content;
    margin-top: 6px;
    color: #526071;
    font-size: 13px;
    font-weight: 800;
  }

  .chart-scroll .chart {
    max-width: none;
    min-height: 0;
  }

  .desktop-bar-chart {
    display: none;
  }

  .chart-scroll .monthly-chart,
  .chart-scroll .rendimiento-chart {
    width: 700px;
  }

  .mobile-bar-chart {
    display: block;
  }

  .mobile-chart-average {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
    border: 1px solid var(--chart-color, #2563eb);
    border-radius: 10px;
    padding: 8px 11px;
    background: #f8fafc;
  }

  .mobile-chart-average span {
    color: #526071;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .mobile-chart-average strong {
    color: #172033;
    font-size: 20px;
    font-weight: 950;
  }

  .mobile-bar-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(16, 34px);
    grid-auto-flow: column;
    gap: 3px;
    column-gap: 10px;
  }

  .mobile-bar-row {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-height: 34px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 3px 4px;
    background: transparent;
    color: #172033;
    text-align: left;
    touch-action: manipulation;
  }

  .mobile-bar-row:active,
  .mobile-bar-row.is-selected {
    border-color: #172033;
    background: #f4f7fb;
    box-shadow: 0 0 0 1px rgba(23, 32, 51, 0.1);
  }

  .mobile-bar-day {
    color: #526071;
    font-size: 12px;
    font-weight: 900;
    text-align: right;
  }

  .mobile-bar-value {
    color: #172033;
    font-size: 12px;
    font-weight: 950;
    text-align: right;
  }

  .mobile-bar-track {
    display: flex;
    width: 100%;
    height: 15px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9edf3;
  }

  .mobile-bar-fill {
    display: block;
    min-width: 3px;
    height: 100%;
    border-radius: inherit;
    transition: width 0.2s ease;
  }

  .mobile-stacked-track > span {
    display: block;
    height: 100%;
  }

  .mobile-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 8px;
    border-radius: 10px;
    padding: 8px 10px;
    background: #f8fafc;
  }

  .mobile-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #405066;
    font-size: 13px;
    font-weight: 800;
  }

  .mobile-chart-legend i {
    width: 11px;
    height: 11px;
    border-radius: 3px;
  }

  .table-wrap {
    position: relative;
    margin: 0 -4px;
    border-radius: 9px;
    overscroll-behavior-x: contain;
    scrollbar-color: #8290a5 #eef2f7;
    scrollbar-width: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 2px;
  }

  .table-swipe-hint {
    display: block;
    margin: 0 0 9px;
    color: #526071;
    font-size: 13px;
    font-weight: 800;
  }

  table {
    font-size: 15px;
  }

  th,
  td {
    min-height: 52px;
    padding: 15px 16px;
  }

  th {
    font-size: 13px;
    line-height: 1.3;
  }

  tbody tr {
    min-height: 52px;
  }

  tbody tr:active {
    background: #e8f0ff;
    box-shadow: inset 4px 0 0 #2563eb;
  }

  th:first-child,
  td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #ffffff;
    box-shadow: 5px 0 9px rgba(39, 54, 79, 0.09);
  }

  th:first-child {
    z-index: 3;
    background: #f4f6f8;
  }

  tbody tr.is-selected td:first-child,
  tbody tr:active td:first-child {
    background: #eef4ff;
  }

  .table-total-row td {
    padding-top: 17px;
    padding-bottom: 17px;
    font-size: 17px;
  }

  .table-total-row td:first-child {
    background: #d9f2e7;
    font-size: 17px;
  }

  .trend-head {
    display: grid;
  }

  .trend-head strong {
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    font-size: 17px;
  }

  .trend-detail {
    grid-template-columns: 1fr;
  }

  .report-cta {
    display: grid;
  }

  .report-cta .button {
    width: 100%;
    min-width: 0;
    min-height: 50px;
  }
}

.chart-point {
  cursor: pointer;
  outline: none;
}

.trend-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.trend-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.trend-head .panel-title {
  margin-bottom: 4px;
}

.trend-head p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.trend-head strong {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #cfd6e2;
  border-radius: 7px;
  padding: 0 12px;
  background: #ffffff;
  color: #108a63;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.monthly-chart {
  min-height: 280px;
}

.chart-month {
  cursor: pointer;
  outline: none;
}

.chart-month-dot,
.chart-month-ring,
.chart-month-label {
  transition: r 0.16s ease, filter 0.16s ease, stroke-width 0.16s ease, stroke-opacity 0.16s ease, fill 0.16s ease;
}

.chart-month-hit {
  pointer-events: all;
}

.chart-month:hover .chart-month-dot,
.chart-month:focus .chart-month-dot {
  filter: drop-shadow(0 6px 9px rgba(16, 138, 99, 0.28));
  stroke-width: 4;
}

.chart-month.is-selected .chart-month-ring {
  stroke-width: 6;
  stroke-opacity: 0.24;
  filter: drop-shadow(0 8px 14px rgba(37, 99, 235, 0.24));
}

.chart-month.is-selected .chart-month-dot {
  filter: drop-shadow(0 8px 14px rgba(37, 99, 235, 0.34));
  stroke-width: 5;
}

.chart-month.is-selected .chart-month-label {
  fill: #111827;
  font-weight: 950;
}

.chart-month-line {
  filter: drop-shadow(0 8px 14px rgba(16, 138, 99, 0.14));
}

.trend-detail {
  grid-template-columns: 1fr 1fr 1.4fr;
}

.chart-point circle {
  transition: r 0.16s ease, filter 0.16s ease, stroke-width 0.16s ease;
}

.chart-point:hover circle,
.chart-point:focus circle,
.chart-point.is-selected circle {
  filter: drop-shadow(0 5px 8px rgba(39, 54, 79, 0.28));
  stroke-width: 3;
}


@media print {
  body {
    background: #ffffff;
  }

  .topbar,
  .sidebar,
  .report-cta,
  .toast {
    display: none !important;
  }

  .layout {
    display: block;
    padding: 0;
  }

  .main {
    width: 100%;
  }

  .report-card,
  .panel,
  .kpi,
  .day-detail-card,
  .table-wrap {
    box-shadow: none;
  }

  .report-card {
    border: 0;
    border-radius: 0;
  }

  .panel {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .chart {
    min-height: 240px;
  }
}

@media (max-width: 520px) {
  .kpis,
  .kpis-three,
  .kpis-five {
    grid-template-columns: 1fr;
  }
}
