:root {
  --bg: #f3efe6;
  --panel: rgba(255, 252, 247, 0.92);
  --panel-strong: #fffdf8;
  --text: #173126;
  --muted: #587064;
  --line: rgba(23, 49, 38, 0.1);
  --green: #1f7a57;
  --green-soft: #dbf4e9;
  --amber: #d88b2d;
  --amber-soft: #fff0d9;
  --red: #c7492d;
  --red-soft: #ffe3dc;
  --shadow: 0 18px 48px rgba(34, 41, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top left, rgba(216, 139, 45, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(31, 122, 87, 0.16), transparent 26%),
    linear-gradient(180deg, #f7f2e7 0%, #edf3eb 100%);
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Be Vietnam Pro", sans-serif;
}

.app-shell {
  width: min(1080px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero-card,
.panel-card,
.summary-card,
.station-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card,
.panel-card {
  padding: 22px;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 7vw, 54px);
  line-height: 1;
  max-width: 11ch;
}

.hero-copy {
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.65;
}

.hero-meta,
.hero-top,
.section-inline,
.station-top,
.station-code-row,
.input-row,
.watch-chip-wrap,
.metric-grid,
.station-flags,
.summary-grid,
.section-head {
  display: flex;
  gap: 12px;
}

.hero-meta,
.hero-top,
.section-head,
.section-inline,
.station-top {
  justify-content: space-between;
  align-items: center;
}

.main-app[hidden] {
  display: none;
}

.auth-panel {
  max-width: 560px;
  margin: 48px auto 0;
}

.auth-title {
  max-width: 12ch;
}

.auth-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--muted);
  font-weight: 600;
}

.button-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-time {
  color: var(--muted);
  font-size: 14px;
}

.summary-grid {
  margin: 18px 0;
  flex-wrap: wrap;
}

.summary-card {
  flex: 1 1 160px;
  padding: 18px;
}

.summary-card span,
.metric-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-card strong,
.metric-item strong {
  font-size: 28px;
}

.dashboard-stack {
  display: grid;
  gap: 18px;
}

.section-head h2,
.section-inline h3 {
  margin-bottom: 0;
}

.watch-form,
.field {
  display: grid;
  gap: 14px;
}

.watch-form {
  margin-top: 12px;
}

.field {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

input,
button,
a {
  font: inherit;
}

input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(23, 49, 38, 0.1);
  border-radius: 18px;
  background: var(--panel-strong);
  color: var(--text);
}

.input-row input {
  flex: 1;
}

button,
.detail-link {
  border: 0;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

button:hover,
.detail-link:hover {
  transform: translateY(-1px);
}

.primary-button,
.ghost-button,
.watch-chip,
.watch-chip-remove,
.detail-link {
  border-radius: 18px;
  font-weight: 700;
}

.primary-button,
.ghost-button {
  padding: 14px 18px;
  cursor: pointer;
}

.small-button {
  padding: 10px 12px;
  font-size: 13px;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, #155f44 0%, #278762 100%);
  box-shadow: 0 12px 24px rgba(31, 122, 87, 0.18);
}

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

.watchlist-wrap {
  margin-top: 18px;
}

.chip-list,
.station-list {
  display: grid;
  gap: 14px;
}

.chip-list {
  margin-top: 12px;
}

.watch-chip-wrap {
  justify-content: flex-start;
}

.watch-chip,
.watch-chip-remove {
  background: var(--green-soft);
  color: var(--green);
  padding: 10px 14px;
  cursor: pointer;
}

.watch-chip-remove {
  padding-inline: 12px;
}

.station-card {
  padding: 18px;
  background: var(--panel-strong);
}

.station-card[data-severity="danger"] {
  border-color: rgba(199, 73, 45, 0.32);
  box-shadow: inset 0 0 0 2px rgba(199, 73, 45, 0.18);
}

.station-card[data-severity="warning"] {
  border-color: rgba(216, 139, 45, 0.32);
  box-shadow: inset 0 0 0 2px rgba(216, 139, 45, 0.18);
}

.station-card[data-severity="offline"] {
  border-color: rgba(23, 49, 38, 0.18);
  background: #f0efe9;
}

.station-card[data-severity="special"] {
  border-color: rgba(31, 122, 87, 0.34);
  background: #ebf8f1;
}

.station-code {
  font-size: 18px;
}

.station-name {
  margin: 8px 0 6px;
  font-size: 22px;
}

.station-time {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.status-pill,
.pill,
.flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-online,
.pill-success {
  color: var(--green);
  background: var(--green-soft);
}

.status-offline,
.pill-danger {
  color: var(--red);
  background: var(--red-soft);
}

.pill-neutral {
  color: #6a5b3c;
  background: #f6ecd7;
}

.pill-soft {
  color: #7b5d18;
  background: var(--amber-soft);
}

.metric-grid {
  margin: 16px 0;
  flex-wrap: wrap;
}

.metric-item {
  flex: 1 1 120px;
  padding: 14px;
  border-radius: 20px;
  background: #f8f5ee;
  border: 1px solid rgba(23, 49, 38, 0.06);
}

.station-flags {
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.flag {
  color: var(--muted);
  background: #eff3ef;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  background: linear-gradient(135deg, #cb6f20 0%, #e09937 100%);
}

.empty-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 16px, 1080px);
    padding-top: 16px;
    padding-bottom: 28px;
  }

  .hero-card,
  .panel-card {
    padding: 18px;
    border-radius: 24px;
  }

  .summary-card,
  .station-card {
    border-radius: 24px;
  }

  .hero-meta,
  .hero-top,
  .section-head,
  .station-top,
  .input-row {
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    max-width: none;
  }

  .summary-card strong,
  .metric-item strong {
    font-size: 24px;
  }
}
