/* styles.css - dark, discreet, teal-accented theme matching the approved design */

:root {
  --bg: #0B1F1B;
  --bg-card: #0F241F;
  --bg-card-alt: #132E28;
  --border: #1E4A3E;
  --accent: #1D9E75;
  --accent-dark: #04342C;
  --text-primary: #EAF6F1;
  --text-secondary: #7FBFA8;
  --text-muted: #5C8C7C;
  --danger: #C97A7A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
}

.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px;
  max-width: 420px;
  margin: 0 auto;
}
.screen.active { display: flex; }

h1 { font-size: 18px; font-weight: 500; margin: 0 0 4px; }
p.subtitle { font-size: 13px; color: var(--text-secondary); margin: 0 0 20px; }

label { font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 6px; }
input, select {
  width: 100%;
  height: 40px;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 0 12px;
  font-size: 14px;
  margin-bottom: 16px;
}

button {
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.btn-primary {
  height: 44px;
  background: var(--accent);
  color: var(--accent-dark);
  border-radius: 8px;
  width: 100%;
}
.btn-secondary {
  height: 44px;
  background: transparent;
  color: var(--text-primary);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  width: 100%;
}
.btn-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg-card-alt);
  border: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary);
}

.spacer { flex: 1; }

/* Workout screen */
.workout-top-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 12px; color: var(--text-secondary);
}
.toggle-row { display: flex; align-items: center; gap: 6px; }
.toggle {
  width: 32px; height: 18px; border-radius: 9px; position: relative; cursor: pointer;
  background: var(--border); transition: background 0.15s;
}
.toggle.on { background: var(--accent); }
.toggle .knob {
  width: 14px; height: 14px; border-radius: 50%; background: var(--text-primary);
  position: absolute; top: 2px; left: 2px; transition: left 0.15s;
}
.toggle.on .knob { left: 16px; }

.progress-bar {
  height: 4px; background: rgba(255,255,255,0.12); border-radius: 2px;
  margin-bottom: 24px; overflow: hidden;
}
.progress-bar-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.3s; }

.timer-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.timer-ring {
  width: 220px; height: 220px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  background: conic-gradient(var(--accent) 0deg, var(--border) 0deg);
}
.timer-ring-inner {
  width: 182px; height: 182px; border-radius: 50%; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.timer-number { font-size: 48px; font-weight: 500; }
.timer-phase-label { font-size: 13px; color: var(--text-secondary); }
.timer-cue { font-size: 12px; color: var(--text-muted); }

.pause-row { display: flex; justify-content: center; margin-top: 10px; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat-card { background: var(--bg-card); border-radius: 10px; padding: 12px; }
.stat-label { font-size: 10px; color: var(--text-secondary); margin: 0 0 6px; }
.stat-value { font-size: 20px; font-weight: 500; margin: 0; }

.goal-pips { display: flex; gap: 6px; margin-bottom: 6px; }
.goal-pip { flex: 1; height: 8px; border-radius: 4px; background: var(--border); }
.goal-pip.done { background: var(--accent); }

.week-chart { display: flex; align-items: flex-end; gap: 6px; height: 70px; margin-bottom: 14px; }
.week-bar { flex: 1; background: rgba(255,255,255,0.12); border-radius: 3px; }
.week-bar.done { background: var(--accent); }

/* Settings rows */
.settings-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 0.5px solid var(--border);
  font-size: 13px;
}
.settings-row .value { color: var(--text-secondary); font-size: 12px; }
.settings-row.danger { color: var(--danger); border-bottom: none; }

/* Nav bar */
.nav-bar {
  display: flex; justify-content: space-around; padding: 12px 0;
  border-top: 0.5px solid var(--border); margin-top: auto;
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; color: var(--text-muted); cursor: pointer; }
.nav-item.active { color: var(--accent); }

.icon-badge {
  width: 52px; height: 52px; border-radius: 14px; background: var(--bg-card-alt);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
  font-size: 24px;
}

.feature-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.feature-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.feature-check { color: var(--accent); }

.price-card {
  border: 0.5px solid var(--border); border-radius: 10px; padding: 12px;
  margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
}
.price-card.selected { border: 2px solid var(--accent); background: var(--bg-card); position: relative; }
.price-badge {
  position: absolute; top: -9px; left: 10px; background: var(--accent); color: var(--accent-dark);
  font-size: 10px; padding: 2px 7px; border-radius: 4px; font-weight: 500;
}
.price-name { font-size: 13px; margin: 0 0 2px; }
.price-sub { font-size: 11px; color: var(--text-muted); margin: 0; }
.price-amount { font-size: 14px; font-weight: 500; }

.legal-row { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
.legal-row span { font-size: 10px; color: var(--text-muted); }

.error-banner {
  background: var(--bg-card); border: 0.5px solid var(--danger); border-radius: 8px;
  padding: 10px; font-size: 12px; color: var(--danger); margin-bottom: 16px; display: none;
}
