:root {
  --bg: #F5F2ED;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --muted: #6B6B6B;
  --light: #A8A4A0;
  --red: #D94F3B;
  --red-bg: #FDF0EE;
  --amber: #E89B0C;
  --amber-bg: #FFF8E7;
  --green: #3A7D44;
  --green-bg: #EBF5EC;
  --blue: #2B7DE9;
  --blue-bg: #EBF3FD;
  --purple: #7C3AED;
  --purple-bg: #F3EEFE;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --card: #1E1C1A;
    --text: #E8E4DF;
    --muted: #8A8580;
    --light: #5A5550;
    --red-bg: #2A1A17;
    --amber-bg: #2A2517;
    --green-bg: #172A1A;
    --blue-bg: #172030;
    --purple-bg: #1E172A;
    --shadow: 0 2px 12px rgba(0,0,0,0.3);
  }
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: 0 0 40px;
  max-width: 480px;
  margin: 0 auto;
}
@media (min-width: 768px) { body { max-width: 720px; } }

/* Header */
.header {
  padding: 48px 20px 24px;
  text-align: left;
}
.header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.header .subtitle {
  font-size: 15px;
  color: var(--muted);
  font-weight: 400;
}
.header .weather {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.header .weather .temp {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

/* KPI Row */
.kpi-row {
  display: flex;
  gap: 10px;
  padding: 0 20px;
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.kpi-row::-webkit-scrollbar { display: none; }
.kpi {
  flex: 0 0 auto;
  min-width: 100px;
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: fadeUp 0.4s ease both;
}
.kpi .num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}
.kpi .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-top: 4px;
}
.kpi.red .num { color: var(--red); }
.kpi.amber .num { color: var(--amber); }
.kpi.green .num { color: var(--green); }
.kpi.blue .num { color: var(--blue); }
.kpi.purple .num { color: var(--purple); }

/* Sections */
.section {
  padding: 0 20px;
  margin-bottom: 28px;
}
.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  animation: fadeUp 0.5s ease both;
}
.card.urgent {
  border-left: 4px solid var(--red);
  background: var(--red-bg);
}
.card .card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.card .card-meta {
  font-size: 13px;
  color: var(--muted);
}
.card .card-meta.overdue { color: var(--red); font-weight: 500; }
.card .card-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: var(--blue-bg);
  color: var(--blue);
  border: none;
  cursor: pointer;
  min-height: 44px;
}
.card .card-action:active { opacity: 0.7; }

/* Status chips */
.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.chip.in-progress { background: var(--amber-bg); color: var(--amber); }
.chip.not-started { background: var(--blue-bg); color: var(--blue); }
.chip.complete { background: var(--green-bg); color: var(--green); }
.chip.blocked { background: var(--red-bg); color: var(--red); }

/* Progress bar */
.progress-wrap {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.progress-track {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}
.progress-fill.green { background: var(--green); }
.progress-fill.amber { background: var(--amber); }
.progress-fill.blue { background: var(--blue); }
.progress-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  min-width: 36px;
  text-align: right;
}

/* Countdown */
.countdown {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}
.countdown .big {
  font-size: 48px;
  font-weight: 800;
  color: var(--purple);
  line-height: 1;
}
.countdown .unit {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}

/* Checklist */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--bg);
}
.checklist-item:last-child { border: none; }
.check { font-size: 16px; }
.check.done { color: var(--green); }
.check.pending { color: var(--red); }

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--light);
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.kpi:nth-child(1) { animation-delay: 0.05s; }
.kpi:nth-child(2) { animation-delay: 0.1s; }
.kpi:nth-child(3) { animation-delay: 0.15s; }
.kpi:nth-child(4) { animation-delay: 0.2s; }
