:root {
  color-scheme: light;
  --bg: #eef3f8;
  --panel: #ffffff;
  --ink: #142132;
  --muted: #687789;
  --line: #dbe4ec;
  --blue: #1f6feb;
  --blue-soft: #e7f0ff;
  --green: #0d9488;
  --green-soft: #e0f5f2;
  --orange: #f59e0b;
  --orange-soft: #fff3d8;
  --red: #dc2626;
  --red-soft: #ffe7e7;
  --shadow: 0 18px 45px rgba(21, 38, 62, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1120px;
  background:
    radial-gradient(circle at top left, rgba(31, 111, 235, 0.14), transparent 32rem),
    linear-gradient(180deg, #f7faff 0%, var(--bg) 58%);
  color: var(--ink);
  font-family:
    "Yu Gothic", "Meiryo", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
}

.page-shell {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 22px;
}

.eyebrow,
.section-tag {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 19px;
}

.lead {
  max-width: 740px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.hero-card,
.panel,
.kpi-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 228, 236, 0.85);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  display: flex;
  min-height: 142px;
  flex-direction: column;
  justify-content: center;
  border-radius: 24px;
  padding: 24px;
}

.label,
.muted {
  color: var(--muted);
}

.label {
  font-size: 12px;
  font-weight: 700;
}

.hero-card strong {
  display: block;
  margin-top: 10px;
  font-size: 20px;
  line-height: 1.45;
}

.hero-card small {
  margin-top: 14px;
  color: var(--muted);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.kpi-card {
  border-radius: 20px;
  padding: 18px;
}

.kpi-card .value {
  margin-top: 8px;
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.kpi-card .note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.kpi-card.alert {
  border-color: rgba(220, 38, 38, 0.35);
  background: linear-gradient(180deg, #fff, #fff6f6);
}

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

.two-col {
  grid-template-columns: 1.18fr 0.82fr;
}

.panel {
  min-height: 260px;
  border-radius: 24px;
  padding: 20px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.panel-heading .muted {
  margin: 4px 0 0;
  font-size: 12px;
}

.forecast-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.forecast-day {
  min-height: 155px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px;
  background: #f9fbfd;
}

.forecast-day.weekend {
  background: #fff8ed;
  border-color: #f8d7a2;
}

.forecast-day .date {
  color: var(--muted);
  font-size: 12px;
}

.forecast-day .weekday {
  display: inline-block;
  margin-top: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #164d9c;
  font-size: 12px;
  font-weight: 800;
}

.forecast-day.weekend .weekday {
  background: var(--orange-soft);
  color: #9a5b00;
}

.forecast-day .sales {
  margin-top: 16px;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.forecast-day .sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.message-list {
  display: grid;
  gap: 12px;
}

.message {
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #f9fbfd;
}

.message.warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: var(--orange-soft);
}

.message h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.message p {
  margin: 0;
  color: #4d5d6d;
  font-size: 13px;
  line-height: 1.65;
}

.chart-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 13px;
}

.tab.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.chart {
  width: 100%;
  min-height: 290px;
}

.chart.compact {
  min-height: 210px;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

.axis-label {
  fill: #718093;
  font-size: 11px;
}

.bar-list {
  display: grid;
  gap: 11px;
}

.metric-row {
  display: grid;
  grid-template-columns: 70px 1fr 64px;
  align-items: center;
  gap: 12px;
}

.metric-row .name {
  font-weight: 800;
}

.meter {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #edf2f7;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #7aa7ff);
}

.metric-row.warning .meter span {
  background: linear-gradient(90deg, var(--orange), #facc15);
}

.metric-row .value {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.table-wrap {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

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

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

th:first-child,
td:first-child,
th:nth-child(2),
td:nth-child(2) {
  text-align: left;
}

thead th {
  background: #f5f8fb;
  color: var(--muted);
  font-weight: 800;
}

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

.negative {
  color: var(--green);
  font-weight: 800;
}

.positive {
  color: var(--red);
  font-weight: 800;
}
