/* Reading Club — soft blue & yellow, friendly hero style */
:root {
  --blue-50: #f2f9ff;
  --blue-100: #e4f2ff;
  --blue-200: #c9e4ff;
  --blue-300: #9dcbfa;
  --blue-400: #6bb0ee;
  --blue-500: #4a97df;
  --blue-600: #3a80c6;
  --blue-800: #24548c;
  --yellow-50: #fffcf2;
  --yellow-100: #fff4d6;
  --yellow-200: #ffe9a8;
  --yellow-300: #ffd978;
  --yellow-400: #f8c454;
  --yellow-500: #efb23c;
  --ink: #25456a;
  --muted: #7b93ad;
  --white: #ffffff;
  --border: #dcecfb;
  --shadow: 0 8px 26px rgba(58, 128, 198, .12);
  --shadow-soft: 0 3px 12px rgba(58, 128, 198, .09);
  --radius: 22px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: linear-gradient(165deg, #eef7ff 0%, #f8fcff 42%, #fffaf0 100%);
  min-height: 100vh;
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(155, 203, 250, .22) 0 90px, transparent 92px),
    radial-gradient(circle at 88% 12%, rgba(255, 217, 120, .18) 0 120px, transparent 122px),
    radial-gradient(circle at 78% 88%, rgba(155, 203, 250, .16) 0 100px, transparent 102px);
  z-index: 0;
}
#app { position: relative; z-index: 1; }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .2s ease; }
button:active { transform: translateY(2px); }

/* ---------- buttons ---------- */
.btn {
  border: none; border-radius: 14px; padding: 12px 20px; font-weight: 800; font-size: 14px;
  background: linear-gradient(180deg, var(--blue-400), var(--blue-600)); color: white;
  box-shadow: 0 4px 0 #2b679f, 0 8px 18px rgba(58, 128, 198, .18);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.04); }
.btn:active:not(:disabled) { box-shadow: 0 2px 0 #2b679f; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-yellow {
  background: linear-gradient(180deg, var(--yellow-300), var(--yellow-500)); color: #674600;
  box-shadow: 0 4px 0 #cf9325, 0 8px 18px rgba(239, 178, 60, .24);
}
.btn-yellow:active:not(:disabled) { box-shadow: 0 2px 0 #cf9325; }
.btn-ghost { background: white; color: var(--blue-600); border: 1.5px solid var(--border); box-shadow: var(--shadow-soft); }
.btn-ghost:active { box-shadow: none; }
.btn-small { padding: 8px 13px; font-size: 12px; border-radius: 11px; }
.btn-danger { background: #fff1f1; color: #c25656; box-shadow: none; border: 1.5px solid #ffd9d9; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(460px, 100%); background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-radius: 30px; box-shadow: 0 26px 70px rgba(58, 128, 198, .18);
  padding: 42px 40px 36px; border: 2px solid white;
}
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.brand-mark {
  width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue-400), var(--yellow-300)); color: white;
  font-size: 28px; box-shadow: 0 5px 14px rgba(58,128,198,.22); flex: none;
}
.brand h1 { font-size: 27px; margin: 0; letter-spacing: -.5px; color: var(--blue-800); }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.login-card h2 { margin: 30px 0 4px; font-size: 21px; color: var(--blue-800); }
.login-card .sub { color: var(--muted); margin: 0 0 26px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 7px; color: var(--blue-800); }
.field input, .field textarea, .field select {
  width: 100%; border: 2px solid var(--border); border-radius: 14px; padding: 13px 15px;
  background: var(--blue-50); color: var(--ink); font-size: 14px; outline: none; transition: .2s;
}
.field input:focus, .field textarea:focus { border-color: var(--blue-400); background: white; box-shadow: 0 0 0 4px var(--blue-100); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 20px; line-height: 1.75; }
.error { color: #c25656; font-size: 13px; font-weight: 800; margin: 10px 0 0; min-height: 18px; }

/* ---------- shell ---------- */
.shell { max-width: 1200px; margin: 0 auto; padding: 26px 24px 48px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(255,255,255,.95); border: 2px solid white; border-radius: var(--radius);
  padding: 16px 22px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.topbar .brand h1 { font-size: 21px; }
.user-chip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.avatar {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 900; font-size: 18px; color: white; background: var(--blue-400);
  box-shadow: 0 3px 0 rgba(0,0,0,.08);
}
.avatar.teacher { background: linear-gradient(135deg, #ffd978, #f0a92e); }
.avatar.isabella { background: linear-gradient(135deg, #c3b1f5, #9b8ce8); }
.avatar.tata { background: linear-gradient(135deg, #8fe0d0, #4cbfae); }
.user-meta { line-height: 1.25; text-align: left; }
.user-meta strong { font-size: 15px; display: block; }
.user-meta span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; font-weight: 800; }

/* ---------- sunday reminder ---------- */
.sunday-banner {
  border-radius: var(--radius); padding: 17px 21px; margin-bottom: 20px; display: flex;
  align-items: center; gap: 16px; background: linear-gradient(100deg, var(--yellow-100), var(--blue-100));
  border: 2px solid var(--yellow-300); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.sunday-banner::after {
  content: '⭐'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 52px; opacity: .18;
}
.sunday-banner.done { background: linear-gradient(100deg, #e5f9ee, var(--blue-100)); border-color: #a8e6c0; }
.sunday-banner .icon { font-size: 30px; flex: none; }
.sunday-banner strong { display: block; font-size: 16px; color: var(--blue-800); }
.sunday-banner p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink); opacity: .85; max-width: 80%; }

/* ---------- student tabs ---------- */
.tabs { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.tab {
  flex: 1; min-width: 210px; text-align: left; border: 2px solid var(--border); background: rgba(255,255,255,.92);
  border-radius: var(--radius); padding: 17px 19px; transition: .2s; box-shadow: var(--shadow-soft);
}
.tab:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tab.active {
  border-color: var(--blue-400); background: linear-gradient(125deg, var(--blue-50), var(--yellow-50));
  box-shadow: 0 8px 22px rgba(58,128,198,.18);
}
.tab .tab-name { font-weight: 900; font-size: 17px; display: flex; align-items: center; gap: 9px; color: var(--blue-800); }
.tab .tab-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; font-weight: 700; }
.tab .mini-progress { height: 8px; border-radius: 999px; background: var(--blue-100); margin-top: 12px; overflow: hidden; }
.tab .mini-progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue-400), var(--yellow-400)); transition: width .5s; }

/* ---------- cards & grid ---------- */
.grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } .shell { padding: 18px 14px 40px; } }
.card {
  background: rgba(255,255,255,.96); border: 2px solid white; border-radius: var(--radius);
  padding: 22px 23px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.card h3 { margin: 0 0 5px; font-size: 18px; color: var(--blue-800); }
.card .desc { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ---------- progress ---------- */
.progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.progress-head .big { font-size: 36px; font-weight: 900; color: var(--blue-600); line-height: 1; }
.progress-head .big span { font-size: 15px; color: var(--muted); font-weight: 700; }
.week-dots { display: flex; gap: 8px; margin: 18px 0 12px; }
.week-dots .dot {
  flex: 1; height: 40px; border-radius: 12px; background: var(--blue-50); border: 2px dashed var(--blue-200);
  display: grid; place-items: center; font-size: 12px; font-weight: 900; color: var(--muted);
}
.week-dots .dot.done {
  background: linear-gradient(135deg, var(--blue-100), var(--yellow-100));
  border: 2px solid var(--yellow-300); color: var(--blue-800); box-shadow: 0 3px 8px rgba(239,178,60,.16);
}
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.stat { flex: 1; min-width: 88px; background: var(--blue-50); border-radius: 14px; padding: 12px 10px; text-align: center; }
.stat b { display: block; font-size: 21px; color: var(--blue-800); font-weight: 900; }
.stat span { font-size: 11px; color: var(--muted); font-weight: 700; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge {
  background: var(--yellow-100); border: 1.5px solid var(--yellow-300); border-radius: 999px;
  padding: 6px 13px; font-size: 12px; font-weight: 800; color: #7a5600;
}

/* ---------- recorder ---------- */
.recorder {
  border: 2px solid var(--blue-200); border-radius: 19px; padding: 22px;
  background: linear-gradient(150deg, var(--blue-50), var(--yellow-50)); text-align: center;
}
.timer {
  font-size: 52px; font-weight: 900; letter-spacing: 2px; color: var(--blue-800);
  margin: 8px 0 3px; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 white;
}
.timer-label { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.rec-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #e46a6a; margin-right: 6px; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(1.3); } }
.rec-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.rec-actions .btn { min-width: 130px; }
.wave { height: 40px; display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 12px; }
.wave i { width: 4px; height: 9px; background: var(--blue-300); border-radius: 4px; transition: height .2s; }
.wave.live i:nth-child(odd) { animation: bar .8s ease-in-out infinite; }
.wave.live i:nth-child(even) { animation: bar .6s ease-in-out infinite reverse; }
@keyframes bar { 50% { height: 30px; background: var(--yellow-400); } }
.notice {
  display: inline-block; margin-top: 14px; font-size: 12.5px; font-weight: 800; color: #a57216;
  background: var(--yellow-100); border: 1.5px solid var(--yellow-200); border-radius: 999px; padding: 7px 14px;
}
.notice.ok { color: #2f8a5d; background: #e7f8ef; border-color: #a9e3c3; }

/* ---------- records & feedback ---------- */
.record {
  border: 2px solid var(--border); border-radius: 18px; padding: 17px; margin-bottom: 15px;
  background: var(--white); box-shadow: var(--shadow-soft);
}
.record-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.record-title { font-weight: 900; font-size: 15.5px; color: var(--blue-800); }
.record-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pill { background: var(--blue-100); color: var(--blue-800); border-radius: 999px; padding: 6px 11px; font-size: 11px; font-weight: 900; }
.pill.yellow { background: var(--yellow-100); color: #8a6100; border: 1px solid var(--yellow-300); }
audio { width: 100%; margin-top: 12px; height: 42px; }
.feedbacks { margin-top: 14px; border-top: 2px dashed var(--border); padding-top: 12px; }
.feedback {
  background: var(--yellow-50); border: 1.5px solid var(--yellow-100); border-radius: 14px;
  padding: 13px; margin-top: 10px;
}
.feedback .who { font-size: 12px; font-weight: 900; color: var(--blue-800); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.feedback .stars { color: var(--yellow-500); font-size: 16px; letter-spacing: 2px; }
.feedback p { margin: 7px 0 0; font-size: 13.5px; line-height: 1.6; }
.feedback .badges { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.feedback .badges span {
  background: white; border: 1.5px solid var(--yellow-300); border-radius: 999px;
  padding: 4px 10px; font-size: 11px; font-weight: 800; color: #7a5600;
}
.empty {
  text-align: center; color: var(--muted); padding: 30px 12px; font-size: 13.5px;
  background: var(--blue-50); border-radius: 15px; border: 2px dashed var(--blue-200); font-weight: 700;
}
.star-picker { display: flex; gap: 3px; }
.star-picker button { background: none; border: none; font-size: 29px; color: var(--blue-200); padding: 0 2px; box-shadow: none; }
.star-picker button:hover { transform: scale(1.15); }
.star-picker button.on { color: var(--yellow-400); }
.badge-picker { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.badge-picker button {
  border: 1.5px solid var(--border); background: white; color: var(--muted);
  border-radius: 999px; padding: 7px 12px; font-size: 11.5px; font-weight: 800;
}
.badge-picker button.on { background: var(--yellow-100); border-color: var(--yellow-400); color: #7a5600; }
.feedback-form { background: var(--blue-50); border-radius: 14px; padding: 14px; margin-top: 12px; }
.feedback-form .field textarea { background: white; }

/* ---------- toast & celebration ---------- */
.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 50; background: var(--blue-800); color: white;
  padding: 13px 19px; border-radius: 14px; font-size: 13.5px; font-weight: 800; box-shadow: var(--shadow);
  animation: toastIn .3s ease;
}
.toast.error { background: #b84d4d; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.confetti {
  position: fixed; top: -30px; z-index: 100; pointer-events: none; font-size: 26px;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .9; } }
.hidden { display: none !important; }
