:root {
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --dark: #1C1F26;
  --dark-2: #2A2E36;
  --border: #ECE8E0;
  --border-strong: #D9D4C9;
  --text: #1C1F26;
  --text-muted: #6B7280;
  --text-faint: #9AA0AA;
  --accent: #E8590C;
  --accent-bg: #FFF4EC;
  --accent-text: #B5480A;
  --blue: #3B5169;
  --blue-bg: #EEF2F6;
  --green: #2A7A3B;
  --green-bg: #EAF6EC;
  --amber-text: #9A7B12;
  --amber-bg: #FFF9E8;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
input, textarea { font-family: inherit; }

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
}

.header {
  padding: 20px 20px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.header.dark { background: var(--dark); color: #FFF; border-bottom: none; }

.back-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}
.header.dark .back-btn { background: var(--dark-2); border: none; color: #FFF; }

.title { font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1.2; }
.title-lg { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.subtitle { font-size: 12px; color: var(--text-muted); }
.header.dark .subtitle { color: #B7BAC0; }

.content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 100px; /* leave room for bottom nav */
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.card-dark {
  background: var(--dark);
  color: #FFF;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.eyebrow { font-size: 13px; color: var(--text-muted); }

.price { font-family: var(--font-display); font-weight: 700; }

.btn {
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background: var(--accent); color: #FFF; }
.btn-dark { background: var(--dark); color: #FFF; }
.btn-outline { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }

.chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
}
.chip-accent { background: var(--accent-bg); color: var(--accent-text); }
.chip-blue { background: var(--blue-bg); color: var(--blue); }
.chip-green { background: var(--green-bg); color: var(--green); }
.chip-amber { background: var(--amber-bg); color: var(--amber-text); }

.status-badge { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 20px; }
.status-done { background: var(--green-bg); color: var(--green); }
.status-progress { background: var(--accent-bg); color: var(--accent-text); }
.status-waiting { background: var(--amber-bg); color: var(--amber-text); }
.status-accepted { background: var(--blue-bg); color: var(--blue); }

.timeline-step { display: flex; gap: 12px; }
.timeline-dot-wrap { display: flex; flex-direction: column; align-items: center; }
.timeline-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.timeline-dot.done { background: #2F9E44; }
.timeline-dot.current { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.timeline-dot.pending { background: transparent; border: 2px solid var(--border-strong); }
.timeline-line { width: 2px; flex: 1; background: var(--border-strong); margin-top: 2px; min-height: 20px; }
.timeline-line.done { background: #2F9E44; }
.timeline-body { padding-bottom: 18px; }
.timeline-title { font-size: 14px; font-weight: 600; }
.timeline-title.current { color: var(--accent); font-weight: 700; }
.timeline-title.pending { color: var(--text-faint); }
.timeline-time { font-size: 12px; color: var(--text-muted); }

.list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: 480px; margin: 0 auto;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.nav-item {
  flex: 1; padding: 12px 0 14px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--text-faint); font-size: 11px;
}
.nav-item.active { color: var(--accent); font-weight: 600; }
.nav-item svg { width: 20px; height: 20px; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 12px; color: var(--text-muted); }
.form-field input, .form-field textarea {
  padding: 12px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 14px; color: var(--text);
}

.tag-select {
  font-size: 13px; padding: 8px 14px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
}
.tag-select.selected { background: var(--dark); color: #FFF; border-color: var(--dark); }

.checklist-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border);
}
.checklist-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.checklist-label { font-size: 14px; flex: 1; }
.checklist-label.done { text-decoration: line-through; color: var(--text-faint); }
.checklist-badge { font-size: 11px; font-weight: 600; }
.checklist-badge.done { color: var(--green); }
.checklist-badge.pending { color: var(--accent-text); }

.stat-box { flex: 1; background: var(--dark-2); border-radius: var(--radius-md); padding: 10px 12px; }
.stat-box .num { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.stat-box .label { font-size: 11px; color: #9AA0AA; }

.empty-hint { text-align: center; font-size: 12px; color: var(--text-faint); padding: 10px; }

.toggle-switch {
  width: 52px; height: 30px; border-radius: 16px; border: none;
  position: relative; flex-shrink: 0; background: var(--border-strong);
}
.toggle-switch.on { background: var(--accent); }
.toggle-switch .knob {
  position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #FFF; box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  transition: left 0.15s;
}
.toggle-switch.on .knob { left: 25px; }
