/* ===========================================================
   NB Indian Education — Design Tokens
   Direction: "Varsity Ledger" — a coaching institute that feels
   earned, not templated. Midnight navy + chalk white + brass
   gold seal (the classic university crest palette), slab serif
   headings, mono ledger numbers for fees, warm micro-motion on
   every interactive surface.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root{
  --board-green: #13294A;
  --board-green-dark: #0B1B30;
  --chalk: #F5F3E7;
  --chalk-dim: #D9D6C6;
  --brass: #C9A227;
  --brass-bright: #E4C452;
  --stamp-red: #B8433A;
  --ink: #17140F;
  --line: rgba(245,243,231,0.18);
  --radius: 6px;
}

*{ box-sizing: border-box; }

html,body{
  margin:0; padding:0;
  background: var(--board-green);
  color: var(--chalk);
  font-family: 'Work Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body{
  background-image:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(245,243,231,0.035) 39px 40px);
}

h1,h2,h3{
  font-family: 'Fraunces', serif;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.mono{ font-family: 'IBM Plex Mono', monospace; }

a{ color: inherit; }

.wrap{
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Seal ---------- */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.brand{
  display:flex; align-items:center; gap:12px;
  font-family:'Fraunces', serif; font-weight:600; font-size:1.05rem;
  text-decoration:none; color: var(--chalk);
}
.seal{
  width:40px; height:40px; border-radius:50%;
  border:2px solid var(--brass);
  display:flex; align-items:center; justify-content:center;
  font-family:'Fraunces', serif; font-weight:700; font-size:0.85rem;
  color: var(--brass-bright);
  flex-shrink:0;
}
.navlink{
  font-size:0.9rem; text-decoration:none; color: var(--chalk-dim);
  border-bottom:1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.navlink:hover{ color: var(--chalk); border-color: var(--brass); }

/* ---------- Hero ---------- */
.hero{
  padding: 64px 0 48px;
  text-align:center;
  position:relative;
}
.hero .stamp{
  width:132px; height:132px;
  margin: 0 auto 28px;
  border-radius:50%;
  border: 3px solid var(--brass);
  display:flex; align-items:center; justify-content:center;
  transform: rotate(-6deg);
  position:relative;
}
.hero .stamp::before{
  content:'';
  position:absolute; inset:8px;
  border:1px dashed var(--brass);
  border-radius:50%;
}
.hero .stamp span{
  font-family:'Fraunces', serif;
  font-weight:700;
  font-size:1.9rem;
  color: var(--brass-bright);
}
.hero h1{
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height:1.08;
}
.hero .eyebrow{
  font-family:'Fraunces', serif;
  font-style: italic;
  font-size:1rem;
  color: var(--brass-bright);
  margin-bottom:10px;
  display:inline-block;
}
.hero p.lede{
  max-width:520px; margin: 18px auto 0;
  color: var(--chalk-dim);
  font-size:1.02rem; line-height:1.6;
}

/* ---------- Section labels ---------- */
.section{ padding: 44px 0; border-top: 1px solid var(--line); }
/* Brief highlight flash — used by scrollToFeePayment() in student.html
   to draw the eye to the Fee Summary & Balance payment options right
   after an Extra Discount is approved. */
.fx-fee-highlight{ animation: fx-fee-flash 2.2s ease-out; border-radius:10px; }
@keyframes fx-fee-flash{
  0%{ box-shadow: 0 0 0 3px var(--brass-bright); background: rgba(230,198,92,0.08); }
  100%{ box-shadow: 0 0 0 0 rgba(230,198,92,0); background: transparent; }
}
.section-head{
  display:flex; align-items:baseline; gap:14px; margin-bottom:26px;
}
.section-head .num{
  font-family:'IBM Plex Mono', monospace;
  color: var(--brass);
  font-size:0.85rem;
}
.section-head h2{ font-size:1.5rem; }

/* ---------- Ledger / fee table (report-card style) ---------- */
.ledger{
  width:100%;
  border-collapse: collapse;
}
.ledger thead th{
  text-align:left;
  font-family:'IBM Plex Mono', monospace;
  font-size:0.7rem;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color: var(--chalk-dim);
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}
.ledger tbody td{
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
  font-size:0.98rem;
}
.ledger tbody tr:last-child td{ border-bottom:none; }
.ledger td.amount{
  font-family:'IBM Plex Mono', monospace;
  color: var(--brass-bright);
  text-align:right;
  font-size:1.05rem;
}
.ledger td.tag{
  font-family:'IBM Plex Mono', monospace;
  font-size:0.72rem;
  color: var(--chalk-dim);
}
.ledger tr.highlight td{ color: var(--stamp-red); }
.ledger tr.highlight td.amount{ color: var(--stamp-red); }

.cta-row{
  text-align:right;
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: none;
  font-family:'Work Sans', sans-serif;
  font-weight:600;
  font-size:0.92rem;
  cursor:pointer;
  text-decoration:none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-brass{
  background: var(--brass-bright);
  color: var(--board-green-dark);
}
.btn-brass:hover{ transform: translateY(-1px); box-shadow: 0 6px 18px rgba(228,196,82,0.25); }
.btn-outline{
  background:transparent;
  border:1px solid var(--line);
  color: var(--chalk);
}
.btn-outline:hover{ border-color: var(--brass); color: var(--brass-bright); }
.btn:disabled{ opacity:0.5; cursor:not-allowed; transform:none; }
.btn-block{ width:100%; justify-content:center; }

/* ---------- Forms ---------- */
.field{ margin-bottom:18px; }
.field label{
  display:block;
  font-family:'IBM Plex Mono', monospace;
  font-size:0.72rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color: var(--chalk-dim);
  margin-bottom:8px;
}
.field input, .field select{
  width:100%;
  padding: 12px 14px;
  background: rgba(245,243,231,0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--chalk);
  font-family:'Work Sans', sans-serif;
  font-size:0.95rem;
}
.field input:focus, .field select:focus{
  outline: 2px solid var(--brass);
  outline-offset: 1px;
  border-color: var(--brass);
}
.field select option{ background: var(--board-green-dark); color: var(--chalk); }

.card{
  background: rgba(245,243,231,0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
}

.fee-preview{
  display:flex; align-items:center; justify-content:space-between;
  padding: 16px 18px;
  background: rgba(201,162,39,0.08);
  border: 1px dashed var(--brass);
  border-radius: var(--radius);
  margin: 22px 0;
}
.fee-preview .label{ font-size:0.85rem; color: var(--chalk-dim); }
.fee-preview .amount{
  font-family:'IBM Plex Mono', monospace;
  font-size:1.4rem;
  color: var(--brass-bright);
}

.msg{
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size:0.88rem;
  margin-bottom:16px;
}
.msg-error{ background: rgba(184,67,58,0.12); border:1px solid var(--stamp-red); color:#F0B4AE; }
.msg-success{ background: rgba(201,162,39,0.12); border:1px solid var(--brass); color: var(--brass-bright); }

/* ---------- Footer ---------- */
footer{
  padding: 30px 0 60px;
  text-align:center;
  color: var(--chalk-dim);
  font-size:0.8rem;
  border-top: 1px solid var(--line);
  margin-top:20px;
}

/* ---------- Admin table ---------- */
.data-table{
  width:100%;
  border-collapse: collapse;
  font-size:0.86rem;
}
.data-table th{
  text-align:left;
  font-family:'IBM Plex Mono', monospace;
  font-size:0.68rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color: var(--chalk-dim);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  position: sticky; top:0; background: var(--board-green);
}
.data-table td{
  padding: 10px 12px;
  border-bottom: 1px dashed var(--line);
}
.status-pill{
  display:inline-block;
  padding: 3px 9px;
  border-radius: 100px;
  font-family:'IBM Plex Mono', monospace;
  font-size:0.68rem;
  text-transform:uppercase;
}
.status-paid{ background: rgba(201,162,39,0.18); color: var(--brass-bright); }
.status-reported{ background: rgba(180,140,220,0.18); color: #c9a8f0; }
.status-visit{ background: rgba(245,243,231,0.08); color: var(--chalk-dim); }

/* Notification cards on the student dashboard (renewal due, exam fee
   due, etc.) — left-border accent shows urgency at a glance. */
.notif-card{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  flex-wrap:wrap; padding:12px 14px; margin-bottom:10px; border-radius:8px;
  background: rgba(245,243,231,0.06); border-left: 4px solid var(--brass);
}
.notif-card.notif-urgent{ border-left-color:#c94b3f; background: rgba(184,67,58,0.10); }
.notif-card.notif-info{ border-left-color:#7fc4e0; background: rgba(127,196,224,0.08); }
.notif-card .notif-text{ font-size:0.88rem; }
.notif-card .notif-text b{ color: var(--brass-bright); }

.stat-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(140px,1fr));
  gap:14px;
  margin-bottom:28px;
}
.stat{
  background: rgba(245,243,231,0.04);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.stat .n{ font-family:'IBM Plex Mono', monospace; font-size:1.6rem; color:var(--brass-bright); }
.stat .l{ font-size:0.75rem; color: var(--chalk-dim); margin-top:4px; }

.table-scroll{ overflow-x:auto; border:1px solid var(--line); border-radius:8px; }

@media (max-width: 600px){
  .wrap{ padding:0 16px; }
  .hero{ padding: 44px 0 32px; }
  .fee-preview{ flex-direction:column; align-items:flex-start; gap:8px; }
}

/* ===========================================================
   TEACHER + STUDENT PORTAL — added later, on top of everything
   above. Nothing above this line was touched.
   =========================================================== */

/* ---- Social / phone sign-in (Google + OTP) ---- */
.oauth-row{ display:flex; flex-direction:column; gap:10px; margin-bottom:18px; }
.oauth-btn{
  display:flex; align-items:center; justify-content:center; gap:10px;
  width:100%; padding:11px 14px;
  background: rgba(245,243,231,0.06);
  border:1px solid var(--line);
  border-radius: var(--radius);
  color: var(--chalk);
  font-family:'Work Sans', sans-serif; font-weight:600; font-size:0.9rem;
  cursor:pointer; transition: border-color .2s, background .2s;
}
.oauth-btn:hover{ border-color: var(--brass); background: rgba(245,243,231,0.1); }
.oauth-btn:disabled{ opacity:0.55; cursor:not-allowed; }
.oauth-btn img{ width:18px; height:18px; }
.oauth-divider{ display:flex; align-items:center; gap:10px; margin: 4px 0 16px; color: var(--chalk-dim); font-size:0.78rem; }
.oauth-divider::before, .oauth-divider::after{ content:''; flex:1; height:1px; background: var(--line); }
.otp-box{ display:none; margin-top:10px; }

.tab-row{ display:flex; gap:8px; margin-bottom:24px; }
.tab-btn{
  flex:1; padding:12px; text-align:center; cursor:pointer;
  border:1px solid var(--line); border-radius: var(--radius);
  background: rgba(245,243,231,0.03); color: var(--chalk-dim);
  font-family:'Work Sans', sans-serif; font-weight:600; font-size:0.92rem;
}
.tab-btn.active{ background: rgba(201,162,39,0.14); border-color: var(--brass); color: var(--brass-bright); }

.check-grid, .radio-grid{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.check-pill, .radio-pill{
  display:flex; align-items:center; gap:7px;
  border:1px solid var(--line); border-radius: 999px;
  padding:8px 14px; font-size:0.88rem; cursor:pointer;
  background: rgba(245,243,231,0.03);
}
.check-pill input, .radio-pill input{ accent-color: var(--brass); }
.check-pill.checked, .radio-pill.checked{ border-color: var(--brass); color: var(--brass-bright); }

.info-box{
  background: rgba(245,243,231,0.05); border:1px solid var(--line);
  border-radius: var(--radius); padding:14px 16px; font-size:0.85rem;
  color: var(--chalk-dim); margin-bottom:18px;
}
.badge{
  display:inline-block; font-family:'IBM Plex Mono', monospace; font-size:0.68rem;
  text-transform:uppercase; padding:3px 9px; border-radius:999px;
  background: rgba(201,162,39,0.18); color: var(--brass-bright); margin-left:8px;
}
.fee-line{ display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--line); font-size:0.92rem; }
.fee-line:last-child{ border-bottom:none; }

/* ---------- Admin: real edit modal (replaces prompt()-based editing) ---------- */
.edit-modal-overlay{
  display:none; position:fixed; inset:0; z-index:200;
  background: rgba(10,14,13,0.72); backdrop-filter: blur(3px);
  align-items:center; justify-content:center; padding:20px;
}
.edit-modal-overlay.open{ display:flex; }
.edit-modal{
  background: var(--ink); border:1px solid var(--line); border-radius: var(--radius);
  max-width: 460px; width:100%; max-height: 88vh; overflow-y:auto;
  padding: 26px 24px; box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.edit-modal h3{ color: var(--brass-bright); font-family:'Fraunces', serif; font-size:1.3rem; margin-bottom:4px; }
.edit-modal .sub{ color: var(--chalk-dim); font-size:0.82rem; margin-bottom:18px; }
.edit-modal .field{ margin-bottom:14px; }
.edit-modal label{ display:block; font-size:0.78rem; color: var(--chalk-dim); margin-bottom:5px; }
.edit-modal input[type="text"],
.edit-modal input[type="email"],
.edit-modal input[type="tel"],
.edit-modal input[type="number"],
.edit-modal select{
  width:100%; padding:10px 12px; border-radius:8px;
  border:1px solid var(--line); background: rgba(245,243,231,0.04); color: var(--chalk);
  font-family: inherit; font-size:0.92rem;
}
.edit-modal .check-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:6px 10px; }
.edit-modal .check-grid label{ display:flex; align-items:center; gap:7px; font-size:0.8rem; color: var(--chalk); margin-bottom:0; }
.edit-modal .modal-actions{ display:flex; gap:10px; margin-top:20px; }
.edit-modal .modal-actions .btn{ flex:1; text-align:center; }
.edit-modal-err{ color:#f0b4ae; font-size:0.8rem; margin-bottom:10px; min-height:0; }

/* ===========================================================
   VISUAL POLISH PASS — navy/brass rebrand + micro-interactions.
   Additive only: nothing above this line was restructured, so
   every existing class keeps working exactly as before; these
   rules layer richer depth, motion and focus states on top.
   =========================================================== */

html{ scroll-behavior: smooth; }

body{
  background-image:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(245,243,231,0.035) 39px 40px),
    radial-gradient(1100px 620px at 12% -8%, rgba(228,196,82,0.10), transparent 60%),
    radial-gradient(900px 700px at 108% 12%, rgba(201,162,39,0.08), transparent 55%),
    linear-gradient(180deg, var(--board-green) 0%, var(--board-green-dark) 100%);
  background-attachment: fixed;
}

/* thin brass scrollbar — small touch, reads as premium */
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background: var(--board-green-dark); }
::-webkit-scrollbar-thumb{ background: rgba(201,162,39,0.45); border-radius:99px; }
::-webkit-scrollbar-thumb:hover{ background: rgba(228,196,82,0.7); }
*{ scrollbar-color: rgba(201,162,39,0.45) var(--board-green-dark); scrollbar-width: thin; }

::selection{ background: var(--brass); color: var(--board-green-dark); }

a, button, input, select, .btn, .card, .stat, .check-pill, .radio-pill, .tab-btn, .status-pill, .navlink{
  transition: transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

/* Header gets a soft glass/shadow feel once the page scrolls under it */
.topbar{
  position: sticky; top:0; z-index:50;
  background: linear-gradient(180deg, rgba(19,41,74,0.92), rgba(19,41,74,0.75));
  backdrop-filter: blur(8px);
}
.seal{
  box-shadow: 0 0 0 3px rgba(201,162,39,0.12), 0 6px 16px rgba(0,0,0,0.25);
}
.brand:hover .seal{ box-shadow: 0 0 0 5px rgba(228,196,82,0.18), 0 6px 20px rgba(0,0,0,0.3); }

.navlink{ position:relative; }
.navlink::after{
  content:''; position:absolute; left:0; right:0; bottom:-3px; height:2px;
  background: var(--brass-bright); transform: scaleX(0); transform-origin:left;
  transition: transform .2s ease;
}
.navlink:hover::after{ transform: scaleX(1); }

/* Cards + stats lift gently on hover instead of sitting static */
.card, .stat{
  background: linear-gradient(160deg, rgba(245,243,231,0.055), rgba(245,243,231,0.02));
}
.card:hover{ transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,0.28); border-color: rgba(201,162,39,0.35); }
.stat:hover{ transform: translateY(-2px); border-color: rgba(201,162,39,0.4); box-shadow: 0 10px 24px rgba(0,0,0,0.22); }

/* Buttons: gold gradient + confident press feedback */
.btn-brass{
  background: linear-gradient(135deg, var(--brass-bright), var(--brass));
  box-shadow: 0 4px 14px rgba(201,162,39,0.22);
}
.btn-brass:hover{ transform: translateY(-2px); box-shadow: 0 10px 26px rgba(228,196,82,0.35); }
.btn-brass:active{ transform: translateY(0); box-shadow: 0 4px 10px rgba(201,162,39,0.25); }
.btn-outline:hover{ transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.18); }

.field input:focus, .field select:focus{
  box-shadow: 0 0 0 4px rgba(201,162,39,0.16);
}

.data-table tbody tr{ transition: background .15s ease; }
.data-table tbody tr:hover{ background: rgba(245,243,231,0.04); }

.status-pill{ transition: transform .15s ease; }
.status-pill:hover{ transform: translateY(-1px); }

.hero .stamp{ animation: seal-in .6s cubic-bezier(.22,1,.36,1); }
@keyframes seal-in{ from{ opacity:0; transform: rotate(-6deg) scale(.85);} to{ opacity:1; transform: rotate(-6deg) scale(1);} }

.fade-up{ animation: fade-up .5s cubic-bezier(.22,1,.36,1) both; }
@keyframes fade-up{ from{ opacity:0; transform: translateY(10px);} to{ opacity:1; transform: translateY(0);} }

/* ===========================================================
   EXTRA-DISCOUNT REQUEST / APPROVAL — shared UI (student +
   admin). Purely additive classes; nothing above is affected.
   =========================================================== */
.discount-box{
  background: linear-gradient(160deg, rgba(201,162,39,0.10), rgba(201,162,39,0.03));
  border: 1px dashed var(--brass);
  border-radius: 10px;
  padding: 20px;
  margin: 18px 0;
}
.discount-box h4{ font-family:'Fraunces', serif; color: var(--brass-bright); font-size:1.05rem; margin-bottom:10px; }
.discount-type-row{ display:flex; gap:10px; margin-bottom:14px; }
.discount-type-row .radio-pill{ flex:1; justify-content:center; }
.discount-request-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 0; border-bottom:1px dashed var(--line); font-size:0.88rem;
}
.discount-request-row:last-child{ border-bottom:none; }
.status-discount-pending{ background: rgba(180,140,220,0.18); color:#c9a8f0; }
.status-discount-approved{ background: rgba(201,162,39,0.18); color: var(--brass-bright); }
.status-discount-rejected{ background: rgba(184,67,58,0.16); color:#F0B4AE; }
.fee-line.discount-line{ color: var(--brass-bright); }
.fee-line.discount-line .amt::before{ content:'\2212 '; }

/* ===========================================================
   PAGE-TO-PAGE "MAGIC" TRANSITION — native browser cross-document
   view transitions (Chrome/Edge 126+; any other browser just does
   a normal instant navigation — nothing breaks, nothing to test
   per-browser, pure progressive enhancement, zero JS needed).
   One line turns it on site-wide for every internal link/redirect.
   =========================================================== */
@view-transition{
  navigation: auto;
}
::view-transition-old(root){
  animation: nb-page-out .32s cubic-bezier(.4,0,.2,1) both;
}
::view-transition-new(root){
  animation: nb-page-in .42s cubic-bezier(.16,1,.3,1) both;
}
@keyframes nb-page-out{
  from{ opacity:1; transform: scale(1); filter: blur(0); }
  to{ opacity:0; transform: scale(.985); filter: blur(2px); }
}
@keyframes nb-page-in{
  from{ opacity:0; transform: translateY(14px) scale(1.01); filter: blur(3px); }
  to{ opacity:1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Sections quietly rise into place as they scroll into view — CSS-only
   (no JS/IntersectionObserver needed), supported wherever animation-
   timeline works and a plain, static section everywhere else. */
@supports (animation-timeline: view()){
  .section{
    animation: nb-section-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 25%;
  }
  @keyframes nb-section-reveal{
    from{ opacity:0; transform: translateY(18px); }
    to{ opacity:1; transform: translateY(0); }
  }
}

/* ===========================================================
   FUN STEP REVEALS — a small library of DIFFERENT entrance
   animations for multi-step forms (Create Account, Complete
   Profile). Each step of a form (class → stream → skills →
   payment, etc.) gets a DIFFERENT one of these, so filling the
   form feels like a little surprise each time instead of the
   same fade repeating over and over. Pure CSS, one class each —
   JS just swaps which class is on the element right before it
   un-hides it. Respects reduced-motion.
   =========================================================== */
.fx-pop{ animation: fx-pop .45s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes fx-pop{
  0%{ opacity:0; transform: scale(.7) rotate(-2deg); }
  60%{ opacity:1; transform: scale(1.04) rotate(1deg); }
  100%{ opacity:1; transform: scale(1) rotate(0); }
}
.fx-bounce{ animation: fx-bounce .55s cubic-bezier(.22,1.4,.36,1) both; }
@keyframes fx-bounce{
  0%{ opacity:0; transform: translateY(26px) scale(.96); }
  55%{ opacity:1; transform: translateY(-6px) scale(1.01); }
  100%{ opacity:1; transform: translateY(0) scale(1); }
}
.fx-flip{ animation: fx-flip .5s cubic-bezier(.22,1,.36,1) both; transform-style: preserve-3d; perspective: 600px; }
@keyframes fx-flip{
  0%{ opacity:0; transform: rotateX(-35deg) translateY(10px); }
  100%{ opacity:1; transform: rotateX(0) translateY(0); }
}
.fx-zoom{ animation: fx-zoom .4s cubic-bezier(.22,1,.36,1) both; }
@keyframes fx-zoom{
  0%{ opacity:0; transform: scale(1.18); filter: blur(4px); }
  100%{ opacity:1; transform: scale(1); filter: blur(0); }
}
.fx-slideL{ animation: fx-slideL .45s cubic-bezier(.22,1,.36,1) both; }
@keyframes fx-slideL{
  0%{ opacity:0; transform: translateX(-30px); }
  100%{ opacity:1; transform: translateX(0); }
}
.fx-slideR{ animation: fx-slideR .45s cubic-bezier(.22,1,.36,1) both; }
@keyframes fx-slideR{
  0%{ opacity:0; transform: translateX(30px); }
  100%{ opacity:1; transform: translateX(0); }
}
.fx-wiggle{ animation: fx-wiggle .55s cubic-bezier(.22,1,.36,1) both; }
@keyframes fx-wiggle{
  0%{ opacity:0; transform: translateY(14px) rotate(-3deg); }
  40%{ opacity:1; transform: translateY(0) rotate(2deg); }
  70%{ transform: rotate(-1deg); }
  100%{ transform: rotate(0); }
}
@media (prefers-reduced-motion: reduce){
  .fx-pop,.fx-bounce,.fx-flip,.fx-zoom,.fx-slideL,.fx-slideR,.fx-wiggle{ animation-duration: .01s !important; }
}

/* Every pill (class/subject/course choice) gives a little happy
   "pop" the instant it's picked — small, cheap, applies site-wide
   automatically since .checked is already toggled by existing JS. */
.check-pill.checked, .radio-pill.checked{ animation: fx-pill-pop .28s cubic-bezier(.34,1.56,.64,1); }
@keyframes fx-pill-pop{
  0%{ transform: scale(1); } 45%{ transform: scale(1.07); } 100%{ transform: scale(1); }
}

/* A running total (fee counter) gets a friendly little "tick" any
   time the number itself changes, instead of silently snapping —
   makes the live fee calculator feel alive. Triggered by JS adding/
   removing the .fx-tick class on the total element. */
.fx-tick{ animation: fx-tick-pulse .3s ease; color: var(--brass-bright) !important; }
@keyframes fx-tick-pulse{
  0%{ transform: scale(1.15); } 100%{ transform: scale(1); }
}

/* Confetti burst canvas — sits fixed over everything, ignores clicks,
   removes itself when the JS-driven burst finishes. */
.fx-confetti-canvas{ position: fixed; inset: 0; pointer-events: none; z-index: 9999; }

/* ===========================================================
   magic.js support styles — registration-field micro-interactions,
   course-unlock badge, scratch-reveal, coin drop, entry preloader.
   All effects degrade to "just show the content" if this CSS or
   magic.js ever fails to load — nothing here is load-bearing for
   basic usability.
   =========================================================== */

/* ---- name field letter burst ---- */
.fx-letter-host{ position:absolute; inset:0; pointer-events:none; overflow:visible; }
.fx-letter{
  position:absolute; bottom:38px; font-weight:800; font-size:1rem;
  animation: fx-letter-rise .9s ease-out forwards;
}
@keyframes fx-letter-rise{
  0%{ transform: translateY(0) translateX(0) rotate(0deg); opacity:1; }
  100%{ transform: translateY(-46px) translateX(var(--drift)) rotate(20deg); opacity:0; }
}

/* ---- email pigeon ---- */
.fx-pigeon{
  position:absolute; top:-6px; right:10px; opacity:0; pointer-events:none;
  transition: opacity .25s ease, transform .25s ease;
  transform: translateY(6px);
}
.fx-pigeon-in{ opacity:1; transform: translateY(0); }
.fx-pigeon-fly-off{ opacity:0; transform: translate(60px,-40px) rotate(-15deg); transition: all .6s ease-in; }
.fx-pigeon-wing{ transform-origin: 14px 14px; animation: fx-wing-flap .35s ease-in-out infinite alternate; }
@keyframes fx-wing-flap{ 0%{ transform: rotate(0deg); } 100%{ transform: rotate(-18deg); } }

/* ---- mobile dial glow ring ---- */
.fx-dial-field input{
  transition: box-shadow .2s ease;
  box-shadow: 0 0 0 calc(2px + 2px * var(--dial-fill, 0)) rgba(201,162,39, var(--dial-fill, 0));
}
.fx-dial-field.fx-dial-complete input{ box-shadow: 0 0 0 3px var(--brass-bright); }

/* ---- course-selection floaters ---- */
.fx-floater-host{ position:absolute; inset:0; pointer-events:none; overflow:visible; z-index:1; }
.fx-floater{
  position:absolute; bottom:0; font-weight:700; font-size:1.1rem;
  animation: fx-floater-rise 1.3s ease-out forwards;
}
@keyframes fx-floater-rise{
  0%{ transform: translateY(0) scale(0.6); opacity:0; }
  20%{ opacity:0.9; }
  100%{ transform: translateY(-70px) scale(1.1); opacity:0; }
}

/* ---- course-unlock badge ---- */
.fx-levelup-badge{
  position: fixed; top: 18%; left: 50%; transform: translate(-50%,-20px) scale(0.7);
  background: var(--board-green-dark); border:2px solid var(--accent, var(--brass));
  color: var(--chalk); padding: 14px 22px; border-radius: 999px; z-index: 9999;
  display:flex; align-items:center; gap:10px; font-weight:700; font-size:0.95rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  animation: fx-badge-in .5s cubic-bezier(.22,1.4,.36,1) both;
  pointer-events:none;
}
.fx-levelup-badge.fx-levelup-out{ animation: fx-badge-out .5s ease-in both; }
.fx-levelup-badge.fx-badge-variant-slide{ animation: fx-badge-in-slide .5s cubic-bezier(.22,1.4,.36,1) both; }
.fx-levelup-badge.fx-badge-variant-wobble{ animation: fx-badge-in-wobble .6s ease-out both; }
@keyframes fx-badge-in-slide{
  0%{ transform: translate(-50%, 60px) scale(0.9); opacity:0; }
  100%{ transform: translate(-50%, -20px) scale(1); opacity:1; }
}
@keyframes fx-badge-in-wobble{
  0%{ transform: translate(-50%,-20px) scale(0.5) rotate(-10deg); opacity:0; }
  50%{ transform: translate(-50%,-20px) scale(1.08) rotate(6deg); opacity:1; }
  75%{ transform: translate(-50%,-20px) scale(0.97) rotate(-3deg); }
  100%{ transform: translate(-50%,-20px) scale(1) rotate(0deg); opacity:1; }
}
.fx-levelup-ring{
  width:14px; height:14px; border-radius:50%; border:3px solid var(--accent, var(--brass));
  border-top-color: transparent; animation: fx-ring-spin .8s linear infinite;
}
@keyframes fx-badge-in{ 0%{ transform: translate(-50%,-20px) scale(0.6) rotate(-10deg); opacity:0; } 100%{ transform: translate(-50%,0) scale(1) rotate(0deg); opacity:1; } }
@keyframes fx-badge-out{ 0%{ opacity:1; } 100%{ opacity:0; transform: translate(-50%,-10px) scale(0.9); } }
@keyframes fx-ring-spin{ to{ transform: rotate(360deg); } }

/* ---- admin "official stamp" — its own distinct visual language,
   separate from the student/teacher celebration effects ---- */
.fx-stamp{
  position: fixed; top: 30%; left: 50%; z-index: 9999; pointer-events:none;
  transform: translate(-50%,-50%) rotate(var(--angle,0deg)) scale(2.6);
  opacity: 0;
  width: 190px; height: 190px; border-radius: 50%;
  border: 6px double var(--ink, #8a2b2b);
  display:flex; align-items:center; justify-content:center; text-align:center;
  animation: fx-stamp-slam .32s cubic-bezier(.2,.9,.3,1.2) forwards;
}
.fx-stamp-ring{
  position:absolute; inset:10px; border-radius:50%; border:1.5px solid var(--ink, #8a2b2b); opacity:0.6;
}
.fx-stamp-text{
  font-family: 'Fraunces', serif; font-weight:800; letter-spacing:1.5px;
  font-size:1.05rem; color: var(--ink, #8a2b2b); text-transform:uppercase; padding:0 14px;
}
.fx-stamp.fx-stamp-out{ animation: fx-stamp-fade .4s ease-in forwards; }
@keyframes fx-stamp-slam{
  0%{ transform: translate(-50%,-50%) rotate(var(--angle,0deg)) scale(2.6); opacity:0; }
  55%{ opacity:1; }
  70%{ transform: translate(-50%,-50%) rotate(var(--angle,0deg)) scale(0.94); }
  100%{ transform: translate(-50%,-50%) rotate(var(--angle,0deg)) scale(1); opacity:1; }
}
@keyframes fx-stamp-fade{ 0%{ opacity:1; } 100%{ opacity:0; transform: translate(-50%,-50%) rotate(var(--angle,0deg)) scale(1.08); } }

/* ---- star sparkle / ribbon celebration variants ---- */
.fx-star-wrap{ position:fixed; inset:0; pointer-events:none; z-index:9999; }
.fx-star{
  position:absolute; color: var(--brass-bright); font-size:1.4rem;
  animation: fx-star-fly 1.1s ease-out forwards;
}
@keyframes fx-star-fly{
  0%{ transform: translate(0,0) scale(0.4) rotate(0deg); opacity:1; }
  100%{ transform: translate(var(--dx), var(--dy)) scale(1.3) rotate(180deg); opacity:0; }
}
.fx-ribbon-wrap{ position:fixed; inset:0; pointer-events:none; z-index:9999; overflow:hidden; }
.fx-ribbon{ position:absolute; top:-10px; width:14px; height:120vh; opacity:0.85; }
.fx-ribbon-a{ left:38%; background: linear-gradient(var(--brass), transparent); animation: fx-ribbon-fall 1.1s ease-in forwards; }
.fx-ribbon-b{ left:58%; background: linear-gradient(#5da8f5, transparent); animation: fx-ribbon-fall 1.1s ease-in .1s forwards; }
@keyframes fx-ribbon-fall{ 0%{ transform: translateY(-100%) rotate(0deg); } 100%{ transform: translateY(20%) rotate(25deg); } }

/* ---- balloon-rise celebration variant ---- */
.fx-balloon-wrap{ position:fixed; inset:0; z-index:9998; pointer-events:none; overflow:hidden; }
.fx-balloon{
  position:absolute; bottom:-60px; width:34px; height:42px; border-radius:50% 50% 50% 50% / 55% 55% 45% 45%;
  background: var(--balloon-color, #c9a227); opacity:0.92;
  animation: fx-balloon-up 2s ease-out forwards;
}
.fx-balloon::after{ content:''; position:absolute; left:50%; bottom:-14px; width:1px; height:14px; background: rgba(232,226,208,0.5); }
@keyframes fx-balloon-up{
  0%{ transform: translateY(0) translateX(0); opacity:0.95; }
  100%{ transform: translateY(-110vh) translateX(var(--sway, 20px)); opacity:0; }
}

/* ---- lantern-rise celebration variant (warm, slow, glowing —
   deliberately unlike the quick sparkle/burst variants) ---- */
.fx-lantern-wrap{ position:fixed; inset:0; z-index:9998; pointer-events:none; overflow:hidden; }
.fx-lantern{
  position:absolute; bottom:-50px; width:26px; height:32px; border-radius:6px;
  background: radial-gradient(circle, #ffdd8a 0%, #e6c65c 55%, #c9a227 100%);
  box-shadow: 0 0 14px 4px rgba(230,198,92,0.55);
  animation: fx-lantern-up 2.5s ease-in-out forwards;
}
@keyframes fx-lantern-up{
  0%{ transform: translateY(0) translateX(0); opacity:0.95; }
  100%{ transform: translateY(-105vh) translateX(var(--sway, 15px)); opacity:0; }
}

/* ---- butterfly-flutter celebration variant (wobbly zigzag rise +
   wing-flap via scaleX, deliberately organic/uneven vs. every
   straight-line variant above) ---- */
.fx-butterfly-wrap{ position:fixed; inset:0; z-index:9998; pointer-events:none; overflow:hidden; }
.fx-butterfly{
  position:absolute; font-size:1.6rem; line-height:1;
  animation: fx-butterfly-fly var(--wiggle, 1s) ease-in-out forwards;
}
@keyframes fx-butterfly-fly{
  0%{ transform: translate(0,0) scaleX(1); opacity:1; }
  20%{ transform: translate(calc(var(--dx) * 0.2 + 14px), calc(var(--dy) * 0.2)) scaleX(0.55); }
  40%{ transform: translate(calc(var(--dx) * 0.4 - 14px), calc(var(--dy) * 0.4)) scaleX(1); }
  60%{ transform: translate(calc(var(--dx) * 0.6 + 12px), calc(var(--dy) * 0.6)) scaleX(0.55); opacity:1; }
  80%{ transform: translate(calc(var(--dx) * 0.8 - 12px), calc(var(--dy) * 0.8)) scaleX(1); }
  100%{ transform: translate(var(--dx), var(--dy)) scaleX(0.55); opacity:0; }
}

/* ---- flower-rain celebration variant (a soft shower across the
   FULL screen width, unlike the centre-only bursts above — slow
   fall + lazy sway + spin) ---- */
.fx-flower-wrap{ position:fixed; inset:0; z-index:9998; pointer-events:none; overflow:hidden; }
.fx-flower{
  position:absolute; top:-8vh; font-size:1.3rem; line-height:1;
  animation-name: fx-flower-fall; animation-timing-function: ease-in; animation-fill-mode: forwards;
}
@keyframes fx-flower-fall{
  0%{ transform: translateY(0) translateX(0) rotate(0deg); opacity:0.95; }
  100%{ transform: translateY(115vh) translateX(var(--sway, 40px)) rotate(var(--spin, 260deg)); opacity:0.75; }
}

/* ---- heart-float celebration variant (rises + pulses, never falls or
   bursts outward like the variants above — its own distinct silhouette) ---- */
.fx-heart-wrap{ position:fixed; inset:0; z-index:9998; pointer-events:none; overflow:hidden; }
.fx-heart{
  position:absolute; bottom:20%; line-height:1;
  animation-name: fx-heart-rise; animation-timing-function: ease-out; animation-fill-mode: forwards;
}
@keyframes fx-heart-rise{
  0%{ transform: translate(0,0) scale(0.6); opacity:0; }
  15%{ opacity:1; transform: translate(calc(var(--dx) * 0.15), calc(var(--dy) * 0.15)) scale(1.15); }
  50%{ transform: translate(calc(var(--dx) * 0.5), calc(var(--dy) * 0.5)) scale(0.95); }
  75%{ transform: translate(calc(var(--dx) * 0.75), calc(var(--dy) * 0.75)) scale(1.1); }
  100%{ transform: translate(var(--dx), var(--dy)) scale(0.85); opacity:0; }
}

/* ---- moon-rise celebration variant (ONE calm glowing object, not a
   shower of particles — deliberately the slowest/quietest of the
   set) ---- */
.fx-moon-wrap{ position:fixed; inset:0; z-index:9998; pointer-events:none; display:flex; justify-content:center; }
.fx-moon{
  position:absolute; bottom:-70px; width:64px; height:64px; border-radius:50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #cfd9ea 45%, #8fa3c2 100%);
  box-shadow: 0 0 22px 8px rgba(207,217,234,0.55);
  animation: fx-moon-up 2.6s ease-out forwards;
}
@keyframes fx-moon-up{
  0%{ transform: translateY(0) scale(0.7); opacity:0; }
  25%{ opacity:1; }
  70%{ transform: translateY(-46vh) scale(1); opacity:1; }
  100%{ transform: translateY(-52vh) scale(1); opacity:0; }
}

/* ---- paper-airplane celebration variant (pure left-to-right glide,
   unlike every rising/falling/radial variant above) ---- */
.fx-plane-wrap{ position:fixed; inset:0; z-index:9998; pointer-events:none; overflow:hidden; }
.fx-plane{
  position:absolute; left:-10%; font-size:1.7rem; line-height:1;
  animation-name: fx-plane-glide; animation-timing-function: ease-in-out; animation-fill-mode: forwards;
}
@keyframes fx-plane-glide{
  0%{ transform: translateX(0) translateY(0) rotate(-6deg); opacity:0; }
  10%{ opacity:1; }
  50%{ transform: translateX(60vw) translateY(-40px) rotate(4deg); }
  90%{ opacity:1; }
  100%{ transform: translateX(120vw) translateY(10px) rotate(-4deg); opacity:0; }
}

/* ---- bubble-rise celebration variant (plain translucent circles,
   calmest/slowest motion of the whole set) ---- */
.fx-bubble-wrap{ position:fixed; inset:0; z-index:9998; pointer-events:none; overflow:hidden; }
.fx-bubble{
  position:absolute; bottom:-40px; border-radius:50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.85), rgba(93,168,245,0.25) 70%, rgba(93,168,245,0.08) 100%);
  border: 1px solid rgba(245,243,231,0.35);
  animation-name: fx-bubble-up; animation-timing-function: ease-out; animation-fill-mode: forwards;
}
@keyframes fx-bubble-up{
  0%{ transform: translateY(0) translateX(0); opacity:0.9; }
  100%{ transform: translateY(-105vh) translateX(var(--sway, 30px)); opacity:0; }
}

/* ---- scratch-to-reveal ---- */
.fx-scratch-canvas{
  position:absolute; inset:0; border-radius:8px; cursor:grab; touch-action:none;
  transition: opacity .4s ease;
}
.fx-scratch-canvas.fx-scratch-fade{ opacity:0; }

/* ---- fee coin drop ---- */
.fx-coin-canvas{ display:block; margin-top:8px; }

/* ---- attendance chalk marks + active button states ---- */
.fx-chalk-mark{
  position:absolute; transform: translate(-50%,-100%) scale(0.7); font-weight:800; font-size:1.3rem;
  pointer-events:none; animation: fx-chalk-pop .7s ease-out forwards;
}
@keyframes fx-chalk-pop{
  0%{ opacity:0; transform: translate(-50%,-100%) scale(0.4) rotate(-8deg); }
  30%{ opacity:1; transform: translate(-50%,-130%) scale(1.15) rotate(4deg); }
  100%{ opacity:0; transform: translate(-50%,-170%) scale(1) rotate(0deg); }
}
.att-btn.att-active-present{ background: rgba(61,220,151,0.18); border-color:#3ddc97; color:#3ddc97; }
.att-btn.att-active-absent{ background: rgba(224,104,95,0.18); border-color:#e0685f; color:#e0685f; }
.att-btn.att-active-leave{ background: rgba(230,198,92,0.18); border-color:#e6c65c; color:#e6c65c; }

/* ---- attendance calendar-dot strip (student dashboard) ---- */
.fx-att-dot{ display:inline-block; width:11px; height:11px; border-radius:50%; margin-right:4px; }
.fx-att-dot-present{ background:#3ddc97; }
.fx-att-dot-absent{ background:#e0685f; }
.fx-att-dot-leave{ background:#e6c65c; }

/* ---- entry preloader ---- */
.fx-preloader{
  position: fixed; inset:0; z-index: 10000; background: var(--board-green-dark);
  display:flex; align-items:center; justify-content:center;
  transition: opacity .1s;
}
.fx-preloader-board{
  font-family: 'Fraunces', serif; color: var(--chalk); font-size: clamp(1.1rem, 3vw, 1.6rem);
  border: 2px dashed rgba(245,243,231,0.25); padding: 22px 34px; border-radius: 10px;
  background: var(--board-green); min-width: 260px; text-align:center;
}
.fx-preloader-cursor{ animation: fx-cursor-blink 0.8s steps(1) infinite; color: var(--brass-bright); }
@keyframes fx-cursor-blink{ 50%{ opacity:0; } }
.fx-preloader.fx-preloader-fold{
  animation: fx-preloader-fold .75s cubic-bezier(.55,0,.85,.35) forwards;
}
@keyframes fx-preloader-fold{
  0%{ transform: perspective(1200px) rotateX(0deg) translateY(0); opacity:1; clip-path: inset(0 0 0 0); }
  60%{ transform: perspective(1200px) rotateX(35deg) translateY(-6%); opacity:1; }
  100%{ transform: perspective(1200px) rotateX(90deg) translateY(-40%) scale(0.85); opacity:0; clip-path: inset(0 0 60% 0); }
}
