/* ============================================================
   Family Hub — Design System
   Inspired by Prism: glassmorphism, rich theming, polished UX
   ============================================================ */

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

:root {
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Glass effect */
  --glass-light: rgba(255,255,255,0.12);
  --glass-border-light: rgba(255,255,255,0.22);
  --glass-dark: rgba(0,0,0,0.25);
  --glass-border-dark: rgba(255,255,255,0.08);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.18);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.28);
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
body.theme-login {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  min-height: 100vh;
  padding: 48px 20px 32px;
}

.login-wrap {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
}

.login-logo {
  font-size: 56px;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}

.login-title {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.login-subtitle {
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  margin-bottom: 32px;
  font-weight: 400;
}

/* User selection buttons */
.user-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  transition: transform var(--transition), opacity var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border-light);
  cursor: pointer;
}

.user-btn:active { transform: scale(0.97); }
.user-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

.user-btn.theme-parent {
  background: rgba(37, 99, 235, 0.35);
  color: #fff;
  border-color: rgba(99, 150, 255, 0.4);
}
.user-btn.theme-cal {
  background: rgba(124, 58, 237, 0.35);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.4);
}
.user-btn.theme-silas {
  background: rgba(245, 158, 11, 0.3);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.4);
}

.user-avatar { font-size: 30px; line-height: 1; }

/* PIN entry */
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 32px;
}

.dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.4);
  transition: background var(--transition), transform var(--transition);
}
.dot.filled {
  background: #fff;
  transform: scale(1.15);
  border-color: #fff;
}

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 280px;
  margin: 0 auto 24px;
}

.num-btn {
  padding: 18px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  font-family: var(--font);
}
.num-btn:hover { background: rgba(255,255,255,0.16); }
.num-btn:active { transform: scale(0.94); background: rgba(255,255,255,0.22); }
.num-empty { background: transparent !important; border: none !important; cursor: default; }

.pin-error {
  color: #fca5a5;
  font-size: 14px;
  margin-bottom: 16px;
  padding: 8px 16px;
  background: rgba(239,68,68,0.15);
  border-radius: var(--radius-xs);
}
.back-link {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition);
}
.back-link:hover { color: rgba(255,255,255,0.8); }

/* ============================================================
   TOPBAR (shared)
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.topbar-parent { background: rgba(30, 64, 175, 0.85); border-bottom: 1px solid rgba(99,150,255,0.2); }
.topbar-cal    { background: rgba(9, 9, 11, 0.9); border-bottom: 1px solid rgba(167,139,250,0.2); }
.topbar-silas  { background: rgba(180, 83, 9, 0.85); border-bottom: 1px solid rgba(251,191,36,0.3); }

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}
.topbar-right { display: flex; gap: 16px; align-items: center; }
.topbar-link {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition);
}
.topbar-link:hover { color: #fff; }

/* ============================================================
   PARENT DASHBOARD
   ============================================================ */
body.theme-parent {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
  min-height: 100vh;
  color: #e2e8f0;
}

.parent-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Glass card base */
.glass-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* Date banner */
.date-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
}
.date-label { color: rgba(255,255,255,0.5); font-size: 13px; font-weight: 500; }
.mode-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.mode-active   { background: rgba(34,197,94,0.2); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.mode-surf     { background: rgba(59,130,246,0.2); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.mode-dads     { background: rgba(234,179,8,0.2); color: #fde047; border: 1px solid rgba(234,179,8,0.3); }
.mode-camp     { background: rgba(168,85,247,0.2); color: #d8b4fe; border: 1px solid rgba(168,85,247,0.3); }
.mode-vacation { background: rgba(249,115,22,0.2); color: #fdba74; border: 1px solid rgba(249,115,22,0.3); }

/* Kid cards */
.kid-card {
  overflow: hidden;
}
.kid-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
}
.kid-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.card-cal  .kid-name { color: #a78bfa; }
.card-silas .kid-name { color: #fbbf24; }
.task-count { font-size: 13px; color: rgba(255,255,255,0.4); font-weight: 500; }

.progress-bar-wrap {
  height: 6px;
  background: rgba(255,255,255,0.08);
  margin: 0 18px 14px;
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}
.card-cal   .progress-bar { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.card-silas .progress-bar { background: linear-gradient(90deg, #d97706, #fbbf24); }
.progress-bar { background: linear-gradient(90deg, #2563eb, #60a5fa); }

.task-list-parent { padding: 0 18px 10px; }
.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 14px;
}
.task-row:last-child { border-bottom: none; }
.task-check { width: 16px; text-align: center; font-size: 13px; }
.task-done .task-check { color: #86efac; }
.task-done .task-name-small { color: rgba(255,255,255,0.3); text-decoration: line-through; }
.task-name-small { flex: 1; color: rgba(255,255,255,0.75); }
.task-cat-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cat-am_chore  { background: rgba(234,179,8,0.2); color: #fde047; }
.cat-pm_chore  { background: rgba(168,85,247,0.2); color: #d8b4fe; }
.cat-learning  { background: rgba(34,197,94,0.2); color: #86efac; }
.cat-ondemand  { background: rgba(249,115,22,0.2); color: #fdba74; }
.no-tasks { color: rgba(255,255,255,0.3); font-size: 13px; padding: 8px 0; }

.approve-section { padding: 10px 18px 16px; }
.approve-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 15px rgba(37,99,235,0.4);
  font-family: var(--font);
}
.approve-btn:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.5); }
.approve-btn:active { transform: scale(0.98); }
.approved-badge {
  text-align: center;
  padding: 10px 14px;
  background: rgba(34,197,94,0.12);
  color: #86efac;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(34,197,94,0.2);
}
.waiting-badge {
  text-align: center;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.mode-note { color: rgba(255,255,255,0.35); font-size: 13px; padding: 12px 18px 16px; }

/* Harmony card */
.harmony-card { padding: 18px; }
.harmony-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.harmony-title { font-size: 16px; font-weight: 700; color: #e2e8f0; }
.harmony-total {
  font-size: 26px;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251,191,36,0.4);
}

.reward-track { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.reward-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background var(--transition);
}
.reward-reached {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.25);
}
.reward-pts {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,0.35);
  width: 28px;
  text-align: right;
}
.reward-reached .reward-pts { color: #86efac; }
.reward-label { flex: 1; font-size: 14px; color: rgba(255,255,255,0.65); }
.reward-reached .reward-label { color: #e2e8f0; }
.reward-check { color: #86efac; font-size: 15px; }

.rate-section { border-top: 1px solid rgba(255,255,255,0.07); padding-top: 16px; }
.rate-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.rate-btns { display: flex; flex-direction: column; gap: 8px; }
.rate-btn {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: all var(--transition);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.6);
  font-family: var(--font);
}
.rate-good:hover, .rate-good.rate-selected    { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.35); color: #86efac; }
.rate-okay:hover, .rate-okay.rate-selected    { background: rgba(234,179,8,0.15); border-color: rgba(234,179,8,0.35); color: #fde047; }
.rate-incident:hover, .rate-incident.rate-selected { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.35); color: #fca5a5; }
.incident-textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  margin-top: 10px;
  font-family: var(--font);
  font-size: 14px;
  resize: vertical;
  min-height: 70px;
  color: #e2e8f0;
}
.save-note-btn {
  margin-top: 8px;
  padding: 8px 16px;
  background: rgba(239,68,68,0.2);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-xs);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
}
.reset-pts-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}
.reset-pts-btn:hover { color: #fca5a5; border-color: rgba(239,68,68,0.3); }

.rate-feedback {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(59,130,246,0.1);
  color: #93c5fd;
  border-radius: var(--radius-xs);
  font-size: 13px;
  border: 1px solid rgba(59,130,246,0.2);
  display: none;
}

/* ============================================================
   CAL DASHBOARD (dark purple)
   ============================================================ */
body.theme-cal {
  background: linear-gradient(160deg, #09090b 0%, #130d2a 50%, #09090b 100%);
  min-height: 100vh;
  color: #e4e4e7;
}

.kid-main {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kid-header { padding: 6px 0 2px; }
.kid-greeting {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
body.theme-cal .kid-greeting { color: #a78bfa; }
body.theme-silas .kid-greeting { color: #fbbf24; }
.kid-date { font-size: 13px; color: rgba(255,255,255,0.35); margin-top: 4px; }
.kid-mode-note { font-size: 13px; color: #60a5fa; margin-top: 3px; }

/* Cal glass card */
.cal-card {
  background: rgba(124,58,237,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(167,139,250,0.15);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.away-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
}

/* Progress section */
.progress-section { padding: 16px 18px; }
.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.screen-time-note {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  margin-top: 10px;
  text-align: center;
}
.screen-time-unlocked { color: #86efac; font-weight: 600; }
.screen-time-pending  { color: #fde047; font-weight: 600; }

/* Cal task section */
.task-section { padding: 14px 18px; }
.task-section-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.task-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 20px);
  margin-left: 10px;
  margin-right: 10px;
  padding: 13px 14px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
  color: #d4d4d8;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  font-family: var(--font);
}
.task-btn:last-child { margin-bottom: 0; }
.task-btn:hover { background: rgba(255,255,255,0.08); transform: translateX(2px); }
.task-btn:active { transform: scale(0.99); }
.task-btn-done {
  background: rgba(34,197,94,0.1) !important;
  border-color: rgba(34,197,94,0.2) !important;
  color: #86efac !important;
}
.task-btn-pending {
  background: rgba(234,179,8,0.1) !important;
  border-color: rgba(234,179,8,0.25) !important;
  color: #fde047 !important;
}

/* Hold-to-complete animation */
.task-btn { position: relative; overflow: hidden; }
.hold-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: rgba(255,255,255,0.12);
  border-radius: inherit;
  transition: none;
  pointer-events: none;
}
.task-btn.holding .hold-bar {
  width: 100%;
  transition: width 700ms linear;
}

.task-check-icon { font-size: 17px; width: 20px; text-align: center; line-height: 1; }
.task-text { flex: 1; }
.no-tasks-card {
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-size: 14px;
}

/* Cal stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stat-box {
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(167,139,250,0.12);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.stat-num { font-size: 26px; font-weight: 800; color: #a78bfa; line-height: 1; }
.stat-label { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 4px; }
.stat-note { font-size: 10px; color: rgba(255,255,255,0.25); margin-top: 3px; }

/* ============================================================
   SILAS DASHBOARD (warm amber)
   ============================================================ */
body.theme-silas {
  background: linear-gradient(160deg, #1a0e00 0%, #2d1a00 50%, #1a0e00 100%);
  min-height: 100vh;
  color: #fef3c7;
}

/* Silas glass card */
.silas-card {
  background: rgba(245,158,11,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.away-card-silas {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: #fde68a;
}

/* Silas progress card */
.silas-progress-card { padding: 18px; }
.big-progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.big-progress-track {
  flex: 1;
  height: 20px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(251,191,36,0.15);
}
.big-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d97706, #fbbf24, #fde68a);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 12px rgba(251,191,36,0.4);
}
.big-progress-emoji { font-size: 30px; line-height: 1; }
.big-progress-label { font-size: 14px; color: #fde68a; font-weight: 600; margin-bottom: 12px; }

.unlock-banner {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.2px;
}
.unlock-yes     { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.25); }
.unlock-pending { background: rgba(234,179,8,0.15); color: #fde047; border: 1px solid rgba(234,179,8,0.25); }
.unlock-no      { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.45); border: 1px solid rgba(255,255,255,0.08); }

/* Silas task section */
.silas-task-section { padding: 14px 18px; }
.silas-section-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.silas-task-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: calc(100% - 20px);
  margin-left: 10px;
  margin-right: 10px;
  padding: 16px 14px;
  margin-bottom: 10px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  color: #fde68a;
  transition: all var(--transition);
  font-family: var(--font);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.silas-task-btn:hover { background: rgba(245,158,11,0.14); transform: translateX(2px); }
.silas-task-btn:active { transform: scale(0.99); }
.silas-task-done {
  background: rgba(34,197,94,0.12) !important;
  border-color: rgba(34,197,94,0.25) !important;
  color: #86efac !important;
}
.silas-task-pending {
  background: rgba(234,179,8,0.1) !important;
  border-color: rgba(234,179,8,0.25) !important;
  color: #fde047 !important;
}

/* Hold animation for Silas buttons */
.silas-task-btn { position: relative; overflow: hidden; }
.silas-hold-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: rgba(255,255,255,0.12);
  border-radius: inherit;
  transition: none;
  pointer-events: none;
}
.silas-task-btn.holding .silas-hold-bar {
  width: 100%;
  transition: width 700ms linear;
}

.silas-check { font-size: 24px; line-height: 1; }
.silas-task-text { flex: 1; }
.silas-free-card {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #86efac;
}

/* Silas stats */
.silas-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.silas-stat-box {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.silas-stat-num { font-size: 34px; font-weight: 800; color: #fbbf24; line-height: 1; text-shadow: 0 0 20px rgba(251,191,36,0.4); }
.silas-stat-label { font-size: 12px; color: rgba(255,255,255,0.45); font-weight: 600; margin-top: 4px; }
.silas-stat-sub { font-size: 11px; color: rgba(255,255,255,0.25); margin-top: 2px; }
.silas-milestone { font-size: 12px; color: #86efac; font-weight: 700; margin-top: 6px; }

/* ============================================================
   ASSIGN EXTRA TASKS CARD
   ============================================================ */
.assign-card { padding: 16px 18px; }
.assign-title { font-size: 15px; font-weight: 700; color: #e2e8f0; }
.assign-section-label {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.35);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px;
}
.assigned-today { margin-bottom: 4px; }
.assigned-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
}
.assigned-row:last-child { border-bottom: none; }
.assigned-kid-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.dot-cal   { background: #a78bfa; }
.dot-silas { background: #fbbf24; }
.assigned-task-name { flex: 1; color: rgba(255,255,255,0.7); }
.assigned-status { font-size: 11px; color: rgba(255,255,255,0.35); }
.status-done { color: #86efac !important; }
.remove-btn {
  background: none; border: none; color: rgba(255,255,255,0.25);
  cursor: pointer; font-size: 13px; padding: 2px 4px;
  transition: color var(--transition);
}
.remove-btn:hover { color: #fca5a5; }

.chore-pool { display: flex; flex-direction: column; gap: 6px; }
.chore-pool-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-xs);
}
.chore-pool-name { font-size: 14px; color: rgba(255,255,255,0.7); flex: 1; }
.pay-tag {
  font-size: 11px; font-weight: 700; color: #fbbf24;
  background: rgba(251,191,36,0.15); padding: 2px 6px; border-radius: 8px; margin-left: 6px;
}
.chore-assign-btns { display: flex; gap: 6px; }
.mini-assign-btn {
  padding: 5px 10px; border-radius: 8px; border: none;
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  font-family: var(--font);
}
.mini-assign-btn:active { transform: scale(0.95); }
.mini-assign-btn:disabled { opacity: 0.5; }
.btn-cal   { background: rgba(124,58,237,0.3); color: #c4b5fd; }
.btn-silas { background: rgba(245,158,11,0.3); color: #fde68a; }
.btn-both  { background: rgba(99,102,241,0.3); color: #a5b4fc; }

.task-pay-badge {
  font-size: 12px; font-weight: 700; color: #fbbf24;
  background: rgba(251,191,36,0.15); padding: 2px 8px; border-radius: 8px;
}

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-card {
  max-width: 480px;
  margin: 24px auto;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  color: #e2e8f0;
}
.settings-card h2 { font-size: 20px; margin-bottom: 8px; }
.settings-note { font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 20px; }
.settings-success {
  color: #86efac;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 16px;
  font-size: 14px;
}
.settings-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.settings-label { width: 100px; font-weight: 600; font-size: 15px; }
.settings-pin-input {
  flex: 1;
  padding: 10px 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  font-size: 18px;
  letter-spacing: 6px;
  color: #e2e8f0;
  font-family: var(--font);
}
.settings-save-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  font-family: var(--font);
  transition: opacity var(--transition), transform var(--transition);
}
.settings-save-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.danger-btn {
  padding: 10px 16px;
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}

/* ============================================================
   READING MAP
   ============================================================ */
.reading-map-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.map-space {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.25);
  cursor: default;
}
.map-space-filled {
  background: rgba(245,158,11,0.18);
  border-color: rgba(251,191,36,0.3);
  color: #fde047;
}

/* ============================================================
   CAL BOOK LOGGING
   ============================================================ */
.reading-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.reading-stat {
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-xs);
  padding: 10px 8px;
  text-align: center;
}
.reading-stat-num { display: block; font-size: 20px; font-weight: 700; color: #e2e8f0; }
.reading-stat-label { display: block; font-size: 11px; opacity: 0.5; margin: 2px 0; }
.reading-stat-sub { display: block; font-size: 10px; opacity: 0.35; }

.book-input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  color: #e2e8f0;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  width: 100%;
}
.book-input:focus { border-color: rgba(255,255,255,0.25); }
.book-input::placeholder { color: rgba(255,255,255,0.25); }

.log-book-btn {
  padding: 9px 14px;
  border-radius: var(--radius-xs);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  flex: 1;
}
.log-book-regular {
  background: rgba(99,102,241,0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.3);
}
.log-book-paid {
  background: rgba(245,158,11,0.2);
  color: #fde047;
  border: 1px solid rgba(245,158,11,0.3);
}

.pending-book-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 14px;
}
.pending-book-icon { font-size: 16px; }
.pending-book-title { flex: 1; color: #e2e8f0; }
.pending-book-badge { font-size: 11px; color: #fde047; opacity: 0.7; }

/* ============================================================
   PARENT — BOOK APPROVALS
   ============================================================ */
.book-approval-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.book-approval-row:last-child { border-bottom: none; }
.book-approval-info { display: flex; align-items: flex-start; gap: 10px; flex: 1; }
.book-approval-icon { font-size: 18px; margin-top: 2px; }
.book-approval-title { display: block; font-size: 14px; font-weight: 600; color: #e2e8f0; }
.book-approval-kid { display: block; font-size: 12px; opacity: 0.45; }
.book-approval-warn { display: block; font-size: 11px; color: #fbbf24; margin-top: 3px; }
.book-approval-btns { display: flex; gap: 6px; flex-shrink: 0; }
.book-approve-btn {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.25);
  color: #86efac;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.book-reject-btn {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  color: #fca5a5;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
}

/* ============================================================
   BEHAVIOR LOG (kid views)
   ============================================================ */
.behavior-log-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
}
.behavior-log-row:last-child { border-bottom: none; }
.behavior-date { font-size: 11px; opacity: 0.4; min-width: 80px; }
.behavior-icon { font-weight: 600; }
.behavior-good .behavior-icon { color: #86efac; }
.behavior-okay .behavior-icon { color: #fde047; }
.behavior-incident .behavior-icon { color: #fca5a5; }
.behavior-note {
  width: 100%;
  font-size: 12px;
  opacity: 0.55;
  padding-left: 88px;
  font-style: italic;
  line-height: 1.4;
}

/* ============================================================
   SILAS BOOK BRACKET
   ============================================================ */
.bracket-book-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bracket-book-row:last-of-type { border-bottom: none; }
.bracket-done { opacity: 0.75; }
.bracket-book-title { display: block; font-size: 14px; font-weight: 600; color: #e2e8f0; }
.bracket-stars { display: block; font-size: 12px; margin-top: 2px; }
.bracket-rate-btns { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.bracket-star-btn {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font);
  color: #e2e8f0;
  white-space: nowrap;
}
.bracket-star-btn:active { background: rgba(245,158,11,0.25); }

/* ============================================================
   ENRICHMENT PROMPTS
   ============================================================ */
.enrichment-card {
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-xs);
  padding: 12px;
  margin-bottom: 8px;
}
.enrichment-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.45;
  margin-bottom: 6px;
}
.enrichment-text {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

/* ============================================================
   $50 CHALLENGE BOOK PICKER (Cal)
   ============================================================ */
.challenge-book-row {
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.03);
}
.challenge-book-row:last-child { margin-bottom: 0; }
.challenge-done {
  background: rgba(34,197,94,0.07) !important;
  border-color: rgba(34,197,94,0.15) !important;
}
.challenge-pending {
  background: rgba(234,179,8,0.07) !important;
  border-color: rgba(234,179,8,0.15) !important;
}
.challenge-book-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.challenge-done .challenge-book-header,
.challenge-pending .challenge-book-header { cursor: default; }
.challenge-book-title { display: block; font-size: 14px; font-weight: 600; color: #e2e8f0; }
.challenge-book-author { display: block; font-size: 12px; opacity: 0.4; margin-top: 2px; }
.challenge-status-badge { font-size: 12px; font-weight: 600; flex-shrink: 0; margin-left: 8px; }
.challenge-badge-avail { color: rgba(255,255,255,0.3); }
.challenge-badge-pending { color: #fde047; }
.challenge-badge-done { color: #86efac; }
.challenge-answer { margin-top: 4px; }

/* ============================================================
   HARMONY SHOP (kid views)
   ============================================================ */
.harmony-shop-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 14px;
}
.harmony-shop-row:last-child { border-bottom: none; }
.shop-pts {
  min-width: 28px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  font-size: 13px;
}
.shop-label { flex: 1; color: rgba(255,255,255,0.6); }
.shop-reached .shop-pts { color: #fde047; }
.shop-reached .shop-label { color: #e2e8f0; font-weight: 600; }
.danger-btn:hover { background: rgba(239,68,68,0.25); }
