:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fbfdff;
  --line: #e1e7f0;
  --line-strong: #c4cedb;
  --text: #233047;
  --muted: #778398;
  --good: #278563;
  --good-bg: #edf8f3;
  --warn: #c47a1b;
  --warn-bg: #fff7e8;
  --bad: #c04f48;
  --bad-bg: #fff0ef;
  --normal: #3f74b5;
  --normal-bg: #eef5ff;
  --accent: #3677bd;
  --shadow: 0 10px 26px rgba(35, 48, 71, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic",
    "Noto Sans JP", sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1fr);
  align-items: end;
  gap: 18px;
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
}

.header-meta {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.sync-button {
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.sync-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sync-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.sync-status {
  min-width: 92px;
  color: var(--muted);
}

.sync-status.success {
  color: var(--good);
}

.sync-status.error {
  color: var(--bad);
}

.eagle {
  position: relative;
  width: 128px;
  height: 64px;
  overflow: hidden;
}

.eagle-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.pace-on .eagle-spread {
  opacity: 1;
  transform: scale(1.08);
}

.pace-behind .eagle-folded {
  opacity: 1;
  transform: scale(0.92);
}

.view-tabs {
  display: flex;
  gap: 2px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.tab-button {
  min-width: 112px;
  padding: 11px 16px 9px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
}

.tab-button.active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

main {
  padding: 20px 28px 36px;
}

.dashboard-view {
  display: none;
}

.dashboard-view.active {
  display: block;
}

.section {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.section-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.section-header p:empty {
  display: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(5, 1fr);
  border-bottom: 1px solid var(--line);
}

.summary-grid.month {
  grid-template-columns: repeat(4, 1fr);
}

.summary-grid.compact {
  grid-template-columns: 1.35fr repeat(3, 1fr);
}

.metric {
  min-height: 92px;
  padding: 14px 16px 13px;
  border-right: 1px solid var(--line);
}

.metric.pace-ok {
  background: #f0f7ff;
}

.metric.pace-late {
  background: #fff2f1;
}

.metric:last-child {
  border-right: 0;
}

.metric-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.metric-value {
  display: block;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.15;
  white-space: nowrap;
}

.metric-value.main {
  color: var(--accent);
  font-size: 34px;
  font-weight: 720;
}

.metric.pace-late .metric-value.main {
  color: var(--bad);
}

.today-profit-card {
  position: relative;
  overflow: hidden;
  grid-column: span 1;
  min-height: 104px;
  border-right: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(54, 119, 189, 0.05);
}

.today-profit-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -66px;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: rgba(54, 119, 189, 0.08);
}

.today-profit-card.pace-late::after {
  background: rgba(192, 79, 72, 0.08);
}

.today-profit-card .metric-label,
.today-profit-card .metric-value,
.today-profit-card .inline-progress {
  position: relative;
  z-index: 1;
}

.today-profit-card .metric-value.main {
  font-size: 38px;
  font-weight: 760;
}

.today-side-metric .metric-value {
  font-size: 26px;
  font-weight: 720;
}

.summary-feature-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.featured-card,
.forecast-card {
  min-height: 205px;
  padding: 24px 26px;
  border-radius: 10px;
}

.featured-card {
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.featured-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -92px;
  width: 285px;
  height: 285px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.featured-card.pace-ok {
  background: linear-gradient(135deg, #245ddf 0%, #2e96d3 100%);
}

.featured-card.pace-late {
  background: linear-gradient(135deg, #c94b48 0%, #e07863 100%);
}

.featured-label,
.forecast-label {
  position: relative;
  z-index: 1;
  color: inherit;
  font-size: 19px;
  font-weight: 700;
}

.featured-value {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  font-size: 58px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.featured-sub {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 22px;
  font-weight: 720;
}

.featured-track,
.forecast-track {
  position: relative;
  z-index: 1;
  height: 16px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 2px rgba(26, 45, 75, 0.18);
}

.featured-track {
  background: rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 3px rgba(26, 45, 75, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.28);
}

.featured-track span,
.forecast-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.featured-track span {
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.18);
}

.featured-card.pace-ok .featured-track span {
  background: linear-gradient(90deg, #ffffff 0%, #dceeff 100%);
}

.featured-card.pace-late .featured-track span {
  background: linear-gradient(90deg, #ffffff 0%, #ffe5e2 100%);
}

.featured-track span::after,
.forecast-track span::after,
.inline-progress-track .progress-fill::after,
.progress-track .progress-fill::after {
  content: "";
  position: absolute;
  inset: 1px 0 auto 0;
  height: 30%;
  background: rgba(255, 255, 255, 0.28);
  border-radius: inherit;
}

.featured-footer,
.forecast-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 17px;
  font-weight: 700;
}

.forecast-card {
  border: 1px solid #d9e0ec;
  background: #ffffff;
  color: #69758a;
}

.forecast-value {
  margin-top: 18px;
  color: #a66a12;
  font-size: 46px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.forecast-card.forecast-ok .forecast-value {
  color: var(--good);
}

.forecast-sub {
  margin-top: 14px;
  color: #69758a;
  font-size: 20px;
  font-weight: 650;
}

.forecast-track {
  border-color: #d8e0ec;
  background: #e7ebf1;
}

.forecast-track span {
  position: relative;
  background: linear-gradient(90deg, #f3b23b 0%, #de8d16 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.forecast-card.forecast-ok .forecast-track span {
  background: linear-gradient(90deg, #49aa7c 0%, #278563 100%);
}

.forecast-card.forecast-ok .forecast-footer {
  color: var(--good);
}

.forecast-footer {
  justify-content: flex-end;
  color: #69758a;
}

.metric-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.progress-area {
  padding: 17px 20px 19px;
}

.progress-row {
  display: grid;
  grid-template-columns: 150px 1fr 68px;
  align-items: center;
  gap: 14px;
  margin: 10px 0;
}

.progress-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.progress-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border: 1px solid #d2dbe8;
  border-radius: 999px;
  background: #e9eef5;
  box-shadow: inset 0 1px 2px rgba(26, 45, 75, 0.08);
}

.progress-fill {
  position: relative;
  display: block;
  height: 100%;
  background: var(--accent);
}

.progress-fill.good {
  background: var(--good);
}

.progress-fill.warn {
  background: #d48116;
}

.progress-fill.bad {
  background: var(--bad);
}

.progress-fill.pace-ok {
  background: linear-gradient(90deg, #4c8ed5 0%, #2f75bd 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.progress-fill.pace-late {
  background: linear-gradient(90deg, #d76b65 0%, #bf4e49 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.progress-percent {
  text-align: right;
  font-size: 13px;
  font-weight: 650;
}

.inline-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inline-progress-track {
  height: 9px;
  overflow: hidden;
  border: 1px solid #cfd7e4;
  border-radius: 999px;
  background: #edf1f6;
  box-shadow: inset 0 1px 2px rgba(26, 45, 75, 0.08);
}

.inline-progress-track .progress-fill {
  display: block;
}

.compact-table-wrap {
  padding: 14px 18px 16px;
  border-bottom: 1px solid var(--line);
}

.table-dropdown {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.table-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
  background: #fbfcfe;
}

.table-dropdown summary::-webkit-details-marker {
  display: none;
}

.table-dropdown summary::after {
  content: "開く";
  min-width: 58px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.table-dropdown[open] summary {
  border-bottom: 1px solid var(--line);
}

.table-dropdown[open] summary::after {
  content: "閉じる";
}

.dropdown-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.dropdown-subtitle {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.dropdown-subtitle:empty {
  display: none;
}

.compact-store-table {
  width: 100%;
  border-collapse: collapse;
}

.compact-store-table th,
.compact-store-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.compact-store-table th {
  color: var(--muted);
  background: #fbfcfe;
  font-size: 12px;
  font-weight: 650;
}

.compact-store-table td {
  font-weight: 560;
}

.compact-store-table tr:last-child td {
  border-bottom: 0;
}

.compact-store-table .total-row td {
  background: #fbfcfe;
  font-weight: 760;
}

.compact-store-table .department-row td:first-child {
  padding-left: 28px;
  color: #526176;
}

.structure-summary {
  border-top: 1px solid var(--line);
}

.profit-flow {
  display: grid;
  grid-template-columns: 1fr 34px 1fr 34px 1fr 34px 1fr 34px 1.15fr;
  align-items: stretch;
  padding: 22px 20px;
}

.flow-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.flow-item.result {
  border-color: #9eb7d8;
  background: var(--normal-bg);
}

.flow-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.flow-value {
  font-size: 22px;
  font-weight: 650;
  white-space: nowrap;
}

.flow-note {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.flow-op {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 650;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) 1fr;
  gap: 0;
}

.priority-panel {
  padding: 20px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.priority-line {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.priority-rank {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.priority-name {
  font-size: 24px;
  font-weight: 900;
}

.priority-name.bad {
  color: var(--bad);
}

.priority-name.warn {
  color: var(--warn);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: #fbfcfe;
}

.data-table td {
  font-size: 14px;
}

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

.num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.strong-num {
  font-size: 18px;
  font-weight: 650;
}

.status {
  display: inline-block;
  min-width: 58px;
  padding: 5px 8px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.status.good,
.status.hot {
  border-color: #b8decd;
  background: var(--good-bg);
  color: var(--good);
}

.status.warn {
  border-color: #efd09b;
  background: var(--warn-bg);
  color: var(--warn);
}

.status.bad {
  border-color: #f0b6b3;
  background: var(--bad-bg);
  color: var(--bad);
}

.status.normal {
  border-color: #bfd1ea;
  background: var(--normal-bg);
  color: var(--normal);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.kpi-cell {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.kpi-cell:nth-child(4n) {
  border-right: 0;
}

.kpi-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kpi-value {
  display: inline-block;
  margin-top: 8px;
  font-size: 24px;
  font-weight: 850;
}

.kpi-delta {
  margin-left: 8px;
  color: var(--good);
  font-size: 12px;
  font-weight: 800;
}

.motivation-panel {
  margin: 12px 18px 0;
  border: 1px solid #cfe0f5;
  background: linear-gradient(135deg, #f4f9ff 0%, #ffffff 58%, #fff8ed 100%);
  box-shadow: 0 12px 22px rgba(54, 119, 189, 0.08);
}

.motivation-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 14px 0;
  color: var(--muted);
  font-size: 12px;
}

.motivation-head span {
  font-weight: 700;
}

.motivation-head strong {
  color: var(--accent);
  font-size: 15px;
}

.motivation-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.motivation-list.inline {
  background: transparent;
}

.motivation-item {
  min-height: 86px;
  padding: 11px 15px 12px;
  border-right: 1px solid #d9e7f7;
}

.motivation-with-eagle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.motivation-item:last-child {
  border-right: 0;
}

.motivation-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.motivation-value {
  margin-top: 5px;
  color: var(--text);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.22;
}

.motivation-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.motivation-eagle {
  flex: 0 0 auto;
  width: 66px;
  height: 38px;
}

.expense-scroll {
  margin: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.expense-table {
  min-width: 2460px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.expense-table th,
.expense-table td {
  padding: 9px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.expense-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f9fd;
  color: #6f7a90;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}

.expense-table .expense-item {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 210px;
  background: #ffffff;
  color: var(--text);
  text-align: left !important;
  box-shadow: 1px 0 0 var(--line);
}

.expense-table thead .expense-item {
  z-index: 4;
  background: #f7f9fd;
  color: #6f7a90;
}

.expense-table .indent {
  padding-left: 30px;
  color: #728096;
  font-weight: 520;
}

.expense-table .group-row .expense-item,
.expense-table .group-row td {
  color: var(--text);
  font-weight: 760;
}

.expense-table .ratio {
  color: #69758a;
}

.expense-table .current-month {
  background: #eef5ff;
  color: var(--text);
  font-weight: 780;
}

.expense-table .expense-item.current-month {
  background: #ffffff;
}

.expense-table tr:last-child th,
.expense-table tr:last-child td {
  border-bottom: 0;
}

.expense-mobile-list {
  display: none;
}

.ops-store-table .progress-cell {
  min-width: 170px;
}

.mini-progress {
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  gap: 9px;
}

.mini-progress .progress-track {
  height: 9px;
}

.structure-table td {
  font-variant-numeric: tabular-nums;
}

.issue-matrix {
  width: 100%;
  border-collapse: collapse;
}

.issue-matrix th,
.issue-matrix td {
  padding: 14px;
  border: 1px solid var(--line);
  text-align: center;
}

.issue-matrix th {
  color: var(--muted);
  font-size: 12px;
  background: #fbfcfe;
}

.issue-matrix .store-name {
  text-align: left;
  font-size: 15px;
  font-weight: 850;
}

.cell-state {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 850;
}

.cell-state.good {
  color: var(--good);
}

.cell-state.warn {
  color: var(--warn);
}

.cell-state.bad {
  color: var(--bad);
}

.cell-detail {
  color: var(--muted);
  font-size: 12px;
}

.final-note {
  margin: 26px 0 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: #ffffff;
  color: #26344d;
  line-height: 1.8;
}

@media (max-width: 1180px) {
  .summary-grid,
  .summary-grid.compact,
  .summary-grid.month,
  .summary-feature-grid,
  .kpi-grid,
  .motivation-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-value {
    font-size: 42px;
  }

  .forecast-value {
    font-size: 36px;
  }

  .app-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .header-meta {
    justify-content: flex-start;
    text-align: left;
  }

  .profit-flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .flow-op {
    min-height: 18px;
  }
}

@media (min-width: 901px) {
  .summary-grid.compact {
    grid-template-columns: 1.55fr repeat(3, 1fr);
  }

  .today-profit-card {
    min-height: 140px;
  }
}

@media (max-width: 900px) {
  .app-header {
    padding: 18px 18px 16px;
  }

  h1 {
    font-size: 23px;
  }

  .eagle {
    width: 86px;
    height: 46px;
  }

  .view-tabs {
    overflow-x: auto;
    padding: 0 12px;
  }

  .tab-button {
    min-width: 82px;
    padding: 13px 12px 11px;
    white-space: nowrap;
  }

  main {
    padding: 16px 12px 28px;
  }

  .section {
    margin-bottom: 18px;
  }

  .section-header {
    align-items: flex-start;
    padding: 14px 16px;
  }

  .section-header h2 {
    font-size: 16px;
  }

  .section-header p {
    font-size: 11px;
  }

  .summary-grid.compact {
    grid-template-columns: repeat(3, 1fr);
  }

  .today-profit-card {
    grid-column: 1 / -1;
    min-height: 132px;
    border-bottom: 1px solid var(--line);
  }

  .today-profit-card .metric-value.main {
    font-size: 42px;
  }

  .today-side-metric .metric-value {
    font-size: 22px;
  }

  .metric {
    min-height: 92px;
    padding: 14px;
  }

  .summary-feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .featured-card,
  .forecast-card {
    min-height: auto;
    padding: 20px;
  }

  .featured-value {
    font-size: 44px;
  }

  .featured-sub {
    font-size: 16px;
  }

  .forecast-value {
    font-size: 38px;
  }

  .motivation-panel {
    margin: 14px 14px 0;
  }

  .motivation-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .motivation-item {
    min-height: 76px;
    padding: 8px 9px;
    border-right: 1px solid #d9e7f7;
    border-bottom: 0;
  }

  .motivation-item:last-child {
    border-bottom: 0;
  }

  .motivation-value {
    font-size: clamp(15px, 3vw, 20px);
  }

  .motivation-label,
  .motivation-note {
    font-size: 10px;
  }

  .motivation-eagle {
    width: 44px;
    height: 28px;
  }

  .compact-table-wrap {
    padding: 8px;
  }

  .compact-store-table {
    table-layout: fixed;
    width: 100%;
  }

  .compact-store-table th,
  .compact-store-table td {
    padding: 5px 4px;
    font-size: clamp(8px, 1.85vw, 11px);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .compact-store-table th {
    font-size: clamp(7px, 1.75vw, 10px);
  }

  .compact-store-table .num {
    text-align: right;
    white-space: normal;
  }

  .compact-store-table .department-row td:first-child {
    padding-left: 8px;
  }

  .profit-flow {
    padding: 14px;
  }

  .expense-scroll {
    display: none;
  }

  .expense-mobile-list {
    display: grid;
    gap: 8px;
    margin: 14px;
  }

  .expense-mobile-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(150px, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: #ffffff;
  }

  .expense-mobile-row.group-row {
    background: #f7f9fd;
    font-weight: 760;
  }

  .expense-mobile-row.indent {
    margin-left: 14px;
  }

  .expense-mobile-name {
    color: var(--text);
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .expense-mobile-values {
    display: grid;
    grid-template-columns: 1fr 72px;
    gap: 8px;
    text-align: right;
  }

  .expense-mobile-values small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
  }

  .expense-mobile-values strong {
    display: block;
    margin-top: 2px;
    color: var(--text);
    font-size: 13px;
    font-weight: 760;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .summary-grid.compact {
    grid-template-columns: 1.25fr repeat(3, 1fr);
  }

  .today-profit-card {
    grid-column: span 1;
  }

  .today-profit-card .metric-value.main {
    font-size: 28px;
  }

  .metric-value {
    font-size: 17px;
  }

  .today-side-metric .metric-value {
    font-size: 18px;
  }

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

  .forecast-value {
    font-size: 28px;
  }

  .metric {
    min-height: 82px;
    padding: 10px 8px;
  }

  .metric-label {
    font-size: 10px;
  }

  .summary-feature-grid {
    grid-template-columns: 1fr 0.8fr;
    gap: 8px;
    padding: 8px;
  }

  .featured-card,
  .forecast-card {
    padding: 13px 12px;
  }

  .featured-label,
  .forecast-label {
    font-size: 14px;
  }

  .featured-sub,
  .forecast-sub {
    font-size: 11px;
  }

  .expense-mobile-row {
    grid-template-columns: 1fr;
  }

  .expense-mobile-values {
    grid-template-columns: 1fr 72px;
  }
}
