/* ==========================================================
   APlusMinds — family account pages (adds to styles.css)
   Register, sign in, reset password and the family dashboard.
   ========================================================== */

body.account { background: var(--tint); }
.account input[type="password"], .account input[type="month"] {
  width: 100%; min-height: 48px; padding: 11px 14px;
  background: var(--card); border: 1.5px solid #aab6c8; border-radius: var(--radius-sm);
  font-size: 1rem;
}
.account input[readonly] { background: var(--tint); color: var(--ink-soft); }

.demo-banner {
  margin: 0; padding: 12px 20px; text-align: center;
  background: #fff4d6; border-bottom: 1px solid #f0d58a; color: #5b4300; font-weight: 500;
}

.header-actions { display: flex; gap: 10px; align-items: center; }
.header-email { color: var(--ink-soft); font-size: .95rem; }

.screen { padding: 40px 0 72px; }
.narrow { width: min(640px, 100% - 32px); margin-inline: auto; }
.narrow-sm { width: min(440px, 100% - 32px); margin-inline: auto; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.card h2 { font-size: 1.35rem; margin-bottom: 6px; }
.page-title { font-size: 2rem; }
.muted { color: var(--ink-soft); }
.intro { margin-top: 8px; }
.step-pill { display: inline-block; background: var(--soft); color: var(--primary); font-weight: 700; font-size: .85rem; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; }
.stack { display: grid; gap: 16px; }
.account-form { margin-top: 18px; gap: 0; }
.account-form .card + .card, .account-form > .card + .form-end { margin-top: 18px; }
.form-end { display: grid; gap: 12px; margin-top: 18px; }

.student-box { border: 1.5px dashed #aab6c8; border-radius: 14px; padding: 18px; display: grid; gap: 14px; }
.student-box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.student-box-head h3 { font-size: 1.05rem; }
.more-details summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.more-details[open] summary { margin-bottom: 14px; }
.more-details > div { display: grid; gap: 14px; }
.add-link { background: none; border: 0; color: var(--primary); font-weight: 700; cursor: pointer; padding: 0; text-align: left; font-size: 1rem; }
.add-link:hover { text-decoration: underline; }
.add-link.danger { color: var(--error); }
.choice-wrap { flex-wrap: wrap; }
.choice-wrap .choice { flex: 1 1 180px; }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.center-card { text-align: center; padding: 44px 28px; }
.center-card h1 { font-size: 1.8rem; margin: 10px 0; }
.big-icon { font-size: 3rem; }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); background: #e6f4ea; color: #17663a; font-weight: 600; }
.notice.warn { background: #fff4d6; color: #5b4300; }
.form-status.ok { color: #17663a; }
.small { font-size: .92rem; }
.text-center { text-align: center; }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 22px; align-items: start; }
.dash-col { display: grid; gap: 18px; }
.dash-col .card + .card { margin-top: 0; }
.dash-title { font-size: 2.1rem; margin-top: 6px; }
.next-card { background: var(--ink); color: #fff; border: 0; }
.next-card .muted { color: #c9d4ea; }
.next-card h2 { color: #fff; }
.timeline { display: grid; gap: 10px; margin-top: 14px; }
.timeline li { display: flex; gap: 10px; align-items: flex-start; }
.dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #6b7fa6; margin-top: 2px; }
.dot.done { background: var(--accent); border-color: var(--accent); }
.student { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.student:first-child { border-top: 0; }
.student-info { flex: 1; min-width: 0; }
.student-actions { display: flex; gap: 14px; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--soft); color: var(--primary); display: grid; place-items: center; font: 800 1.1rem var(--display); }
.tag { display: inline-block; background: var(--tint); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .85rem; margin: 4px 4px 0 0; }
.empty-state { text-align: center; padding: 18px 8px; color: var(--ink-soft); }
.code { font: 800 1.5rem var(--display); letter-spacing: .04em; color: var(--primary); background: var(--soft); border-radius: 12px; padding: 10px 14px; text-align: center; margin: 12px 0; overflow-wrap: anywhere; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch { width: 46px; height: 26px; border-radius: 999px; background: #aab6c8; position: relative; flex: none; border: 0; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { left: 23px; }
.switch[disabled] { opacity: .6; cursor: progress; }
.inline-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); gap: 14px; }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-actions .btn { min-height: 44px; padding: 8px 18px; }

.account-footer { padding: 24px 0 40px; text-align: center; font-size: .9rem; color: var(--ink-soft); }
.account-footer a { color: var(--ink-soft); margin: 0 8px; }

@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .header-email, .header-actions .btn-primary { display: none; }
  .header-actions .btn { min-height: 40px; padding: 6px 12px; font-size: .9rem; }
  .card { padding: 22px 18px; }
  .page-title, .dash-title { font-size: 1.7rem; }
  .choice-row { flex-direction: column; }
  /* Stacked: the 180px "width" below would otherwise become each box's height. */
  .choice-wrap .choice { flex-basis: auto; }
}

/* ---------- Class notes and referrals (dashboard) ---------- */
.note-student { margin-top: 16px; }
.note-student h3 { font-size: 1.05rem; margin-bottom: 4px; }
.note { padding: 12px 0; border-top: 1px solid var(--line); }
.note-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.note-head b { font-weight: 700; }
.note p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note .homework { color: var(--ink-soft); }
.progress { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .82rem; font-weight: 600; }
.progress-needs_practice { background: #fff4d6; color: #5b4300; }
.progress-getting_there { background: var(--soft); color: var(--primary); }
.progress-confident { background: #e6f6ec; color: #17663a; }
.more-notes { margin-top: 8px; }
.refer-summary { margin: 0 0 12px; text-align: center; }

/* ---------- Upcoming classes and group timetable (dashboard) ---------- */
.class-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.class-item b { font-weight: 700; }
.class-item.cancelled b { text-decoration: line-through; color: var(--ink-soft); }
.class-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.btn-small { min-height: 38px; padding: 6px 14px; font-size: .9rem; }

/* ---------- Teacher page ---------- */
.after-item { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.after-item b { font-weight: 700; }
.roll-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 8px; }
.roll-row legend { padding: 0 4px; }
.roll-choices { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.roll-choices .check { grid-template-columns: 20px auto; align-items: center; }
.roll-detail { display: grid; grid-template-columns: minmax(150px, 200px) 1fr; gap: 8px; }
.roll-detail select, .roll-detail input { min-height: 40px; padding: 6px 10px; }
.rules-list { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 8px; color: var(--ink-soft); }
.sent-heading { margin-top: 18px; }
@media (max-width: 560px) { .roll-detail { grid-template-columns: 1fr; } }

/* ---------- Your plan and checkout (dashboard) ---------- */
.plan-options { display: grid; gap: 10px; }
/* "label.plan-option" so the general ".field label { padding: 0 }" rule doesn't remove the inner padding. */
label.plan-option { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border: 1.5px solid #aab6c8; border-radius: var(--radius-sm); background: var(--card); cursor: pointer; font-weight: 500 !important; }
.plan-option:has(input:checked) { border-color: var(--primary); background: var(--soft); }
.plan-option input { margin: 0; }
.plan-option .plan-price { font-weight: 700; text-align: right; }
.plan-option .muted { grid-column: 2 / 4; }
.agreement { margin: 0; border-top: 1px solid var(--line); }
.agreement div { display: grid; grid-template-columns: minmax(120px, 30%) 1fr; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.agreement dt { font-weight: 700; color: var(--ink-soft); font-size: .92rem; }
.agreement dd { margin: 0; font-size: .95rem; overflow-wrap: anywhere; }
.agreement-total { font-size: 1.1rem; font-weight: 700; margin: 4px 0 10px; }
@media (max-width: 560px) { .agreement div { grid-template-columns: 1fr; } }
