:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);

  --spring: #4ade80;
  --summer: #f97316;
  --autumn: #facc15;
  --winter: #38bdf8;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 20% 10%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(1100px 700px at 80% 20%, rgba(249, 115, 22, 0.14), transparent 55%),
    radial-gradient(900px 650px at 50% 90%, rgba(74, 222, 128, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
}

.page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  background: rgba(10, 16, 32, 0.55);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.92);
}

.logo svg {
  width: 26px;
  height: 26px;
}

.title {
  font-weight: 650;
  letter-spacing: 0.2px;
}

.subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.btnLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.btnLink:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.datePicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
}

.dateInput {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  width: 145px;
}

.dateInput::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.btnSm {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
}

.main {
  width: min(1180px, calc(100% - 44px));
  margin: 18px auto 0;
  flex: 1;
}

.hero {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.05fr 0.95fr;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

.phaseBadge {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.phaseBadge::before {
  content: "";
  position: absolute;
  inset: -60% -30%;
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.2), transparent 55%),
    radial-gradient(circle at 80% 30%, rgba(249, 115, 22, 0.18), transparent 55%),
    radial-gradient(circle at 45% 85%, rgba(74, 222, 128, 0.12), transparent 60%);
  filter: blur(16px);
  opacity: 0.8;
  pointer-events: none;
}

.phaseSeason {
  font-size: 13px;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.phaseName {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 720;
  letter-spacing: 0.2px;
  position: relative;
  z-index: 1;
}

.phaseMantra {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  font-size: 13px;
  position: relative;
  z-index: 1;
  width: fit-content;
}

.strategyCard,
.metricsCard {
  margin-top: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 16px;
}

.cardTitle {
  font-weight: 650;
  letter-spacing: 0.1px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.strategyText {
  margin-top: 10px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.reasons {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reasonChip {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.metricsGrid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 14px;
  padding: 12px;
}

.metricLabel {
  font-size: 12px;
  color: var(--muted);
}

.metricValue {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 720;
  letter-spacing: 0.1px;
}

.note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.fourGrid {
  margin-top: 18px;
}

.gridTitle {
  font-weight: 650;
  margin: 6px 2px 10px;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.phaseCard {
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.phaseCard::before {
  content: "";
  position: absolute;
  inset: -40% -40%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.16), transparent 55%);
  opacity: 0.45;
}

.phaseCardTitle {
  position: relative;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.phaseCardDesc {
  position: relative;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.phaseCardMantra {
  position: relative;
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.phaseCard.spring {
  box-shadow: 0 18px 55px rgba(74, 222, 128, 0.08);
}
.phaseCard.summer {
  box-shadow: 0 18px 55px rgba(249, 115, 22, 0.09);
}
.phaseCard.autumn {
  box-shadow: 0 18px 55px rgba(250, 204, 21, 0.09);
}
.phaseCard.winter {
  box-shadow: 0 18px 55px rgba(56, 189, 248, 0.09);
}

.muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.footer {
  padding: 18px 22px;
  border-top: 1px solid var(--border);
  background: rgba(10, 16, 32, 0.45);
  backdrop-filter: blur(14px);
}

.errors {
  margin-top: 14px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}

.winterAlert {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(239, 68, 68, 0.5);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.06));
  padding: 14px 16px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
  animation: alertPulse 2s ease-in-out infinite;
}

@keyframes alertPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.2); }
  50% { box-shadow: 0 0 40px rgba(239, 68, 68, 0.45); }
}

.winterAlertIcon {
  font-size: 28px;
  flex-shrink: 0;
}

.winterAlertText {
  font-size: 14px;
}

.winterAlertText strong {
  color: #fca5a5;
}

.metricValue.danger {
  color: #ef4444;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
}

.table th,
.table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.table th {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 650;
  background: rgba(0, 0, 0, 0.18);
}

.table tr:last-child td {
  border-bottom: none;
}

.btnDel {
  appearance: none;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: background 120ms ease, color 120ms ease;
}

.btnDel:hover {
  background: rgba(239, 68, 68, 0.28);
  color: #fecaca;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 2px 10px;
  flex-wrap: wrap;
}

.pager {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pill {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.select {
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.9);
  padding: 9px 12px;
  border-radius: 12px;
}

.phase-spring {
  color: var(--spring);
}
.phase-summer {
  color: var(--summer);
}
.phase-autumn {
  color: var(--autumn);
}
.phase-winter {
  color: var(--winter);
}

