* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange: #FF4F00;
  --orange-light: #FF6A2B;
  --orange-faint: #fff3ee;
  --dark: #1a1a1a;
  --mid: #555;
  --border: #e8e8e8;
  --bg: #f6f6f6;
  --white: #ffffff;
  --green: #16a34a;
  --green-faint: #f0fdf4;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--dark);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ─── LOGIN ─── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 24px;
}
.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-logo {
  font-size: 40px;
  margin-bottom: 8px;
}
.login-card h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 4px;
}
.login-card .sub {
  color: var(--mid);
  font-size: 14px;
  margin-bottom: 32px;
}
.login-card input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s;
}
.login-card input:focus { border-color: var(--orange); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-orange {
  background: var(--orange);
  color: white;
  width: 100%;
}
.btn-orange:hover { background: var(--orange-light); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.error-msg { color: #dc2626; font-size: 13px; margin-top: 10px; }

/* ─── LAYOUT ─── */
.app-header {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-logo {
  font-weight: 900;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-logo span { color: var(--orange); }
.header-right { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--mid); }
.logout-btn { background: none; border: none; cursor: pointer; color: var(--mid); font-size: 13px; }
.logout-btn:hover { color: var(--orange); }

.page { max-width: 860px; margin: 0 auto; padding: 32px 24px; }

/* ─── PROGRESS BAR ─── */
.progress-row {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
}
.progress-label { font-size: 13px; color: var(--mid); white-space: nowrap; }
.progress-bar-wrap { flex: 1; background: var(--border); border-radius: 99px; height: 10px; overflow: hidden; }
.progress-bar-fill { background: var(--orange); height: 100%; border-radius: 99px; transition: width 0.5s; }
.streak-badge {
  background: var(--orange-faint);
  color: var(--orange);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 99px;
  white-space: nowrap;
}

/* ─── LESSON CARD ─── */
.lesson-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow: hidden;
}
.lesson-header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
  padding: 28px 32px;
}
.lesson-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.lesson-header h2 {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 6px;
  line-height: 1.2;
}
.lesson-header .meta { font-size: 13px; color: rgba(255,255,255,0.6); }

.lesson-body { padding: 32px; }
.section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 12px;
}
.concept-text {
  font-size: 15px;
  line-height: 1.75;
  color: #333;
  white-space: pre-line;
}

.divider { border: none; border-top: 2px solid var(--border); margin: 28px 0; }

/* ─── PROMPT BLOCKS ─── */
.prompt-block {
  background: #1a1a1a;
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
}
.prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #2d2d2d;
}
.prompt-label { color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 600; }
.copy-btn {
  background: var(--orange);
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.copy-btn:hover { background: var(--orange-light); }
.copy-btn.copied { background: var(--green); }
.prompt-text {
  color: #e8e8e8;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 13px;
  line-height: 1.65;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ─── LOG HOUR ─── */
.log-section {
  background: var(--orange-faint);
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 8px;
}
.log-section h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.log-section .log-prompt { color: var(--mid); font-size: 14px; margin-bottom: 16px; }
.log-section textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid rgba(255,79,0,0.3);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  min-height: 90px;
  outline: none;
  font-family: inherit;
  background: white;
  transition: border-color 0.2s;
  margin-bottom: 14px;
}
.log-section textarea:focus { border-color: var(--orange); }
.success-msg { color: var(--green); font-weight: 700; font-size: 14px; margin-top: 10px; }
.already-logged {
  background: var(--green-faint);
  border: 2px solid #86efac;
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  color: var(--green);
  font-weight: 700;
  font-size: 16px;
}

/* ─── COMPLETED LESSONS ─── */
.completed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.completed-pill {
  background: var(--green-faint);
  border: 1.5px solid #86efac;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
}
.completed-pill .pill-num { font-weight: 800; color: var(--green); font-size: 12px; }
.completed-pill .pill-title { font-weight: 600; color: var(--dark); margin-top: 2px; }
.completed-pill .pill-date { font-size: 11px; color: var(--mid); margin-top: 2px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--mid); }

/* ─── RUSSELL DASHBOARD ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat-card .stat-val { font-size: 32px; font-weight: 900; color: var(--orange); line-height: 1; }
.stat-card .stat-label { font-size: 13px; color: var(--mid); margin-top: 6px; }

.week-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.week-header h3 { font-size: 16px; font-weight: 800; }
.week-badge {
  font-size: 13px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
}
.week-badge.unpaid { background: #fef3c7; color: #92400e; }
.week-badge.paid { background: var(--green-faint); color: var(--green); }
.week-log-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  gap: 20px;
}
.week-log-row:last-child { border-bottom: none; }
.log-date { font-size: 13px; font-weight: 700; min-width: 100px; }
.log-note { font-size: 13px; color: var(--mid); flex: 1; }
.log-lesson { font-size: 12px; color: var(--orange); font-weight: 600; white-space: nowrap; }
.week-footer {
  background: #fafafa;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.week-earnings { font-size: 18px; font-weight: 900; }
.week-earnings .label { font-size: 12px; font-weight: 400; color: var(--mid); }

.section-heading {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 16px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .lesson-header { padding: 22px 20px; }
  .lesson-body { padding: 20px; }
  .page { padding: 16px; }
  .login-card { padding: 32px 24px; }
}
