/* ══════════════════════════════════════════
   VNPS PARENT PWA — STYLESHEET
   ══════════════════════════════════════════ */
:root {
  --navy: #0a1628;
  --gold: #c9a84c;
  --gold-light: #f0d080;
  --crimson: #8b1a2e;
  --cream: #faf8f3;
  --warm-white: #fff9ee;
  --slate: #3d4f6b;
  --text: #1a2340;
  --text-light: #5a6a88;
  --border: #e0d8c8;
  --success: #2d7a47;
  --danger: #c0392b;
  --card-bg: #ffffff;
  --bg: #f0f2f8;
  --topbar-h: 62px;
  --bottom-nav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── DARK MODE ── */
.dark-mode {
  --navy: #e8edf5;
  --cream: #1a1e2a;
  --warm-white: #1e2330;
  --text: #e0e6f0;
  --text-light: #8a9ab5;
  --border: #2a3248;
  --card-bg: #1e2330;
  --bg: #141824;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100dvh;
  position: fixed;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

/* ── SCREENS ── */
.screen { display: none; position: fixed; inset: 0; overflow-y: auto; background: var(--bg); z-index: 10; }
.screen.active { display: block; }

/* ── OVERLAY / POPUP ── */
.overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10,22,40,0.85); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.3s ease;
}
.notif-popup {
  background: var(--card-bg); border-radius: 24px 24px 0 0;
  padding: 32px 28px 40px; width: 100%; max-width: 480px;
  animation: slideUp 0.4s cubic-bezier(0.34,1.56,0.64,1);
  text-align: center;
}
.notif-popup-icon { font-size: 3rem; margin-bottom: 16px; animation: bell-ring 2s infinite; }
@keyframes bell-ring {
  0%,100%{transform:rotate(0)} 10%,30%,50%{transform:rotate(-12deg)} 20%,40%{transform:rotate(12deg)}
}
.notif-popup h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--navy); margin-bottom: 10px; }
.notif-popup p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 16px; }
.notif-list { list-style: none; text-align: left; margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.notif-list li { background: var(--cream); border-radius: 8px; padding: 10px 14px; font-size: 0.85rem; color: var(--text); }
.btn-allow {
  width: 100%; padding: 15px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, var(--gold), #e8b84b);
  color: var(--navy); font-family: 'DM Sans', sans-serif;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 8px 24px rgba(201,168,76,0.35); transition: all 0.2s;
  margin-bottom: 12px;
}
.btn-allow:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(201,168,76,0.45); }
.btn-skip { background: none; border: none; color: var(--text-light); font-size: 0.88rem; cursor: pointer; padding: 8px; font-family: 'DM Sans', sans-serif; }
.notif-note { font-size: 0.75rem; color: var(--text-light); margin-top: 12px; }

/* ── INSTALL BANNER ── */
.install-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  background: var(--navy); padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.install-content { display: flex; align-items: center; gap: 12px; color: #fff; }
.install-icon { font-size: 1.8rem; }
.install-content strong { display: block; font-size: 0.9rem; }
.install-content span { font-size: 0.78rem; color: rgba(255,255,255,0.6); }
.install-actions { display: flex; align-items: center; gap: 8px; }
.btn-install { background: var(--gold); border: none; color: var(--navy); padding: 8px 18px; border-radius: 8px; font-weight: 700; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.btn-install-skip { background: none; border: none; color: rgba(255,255,255,0.5); font-size: 1.2rem; cursor: pointer; padding: 4px; }

/* ── OFFLINE BANNER ── */
.offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: #c0392b; color: #fff; text-align: center;
  padding: 8px; font-size: 0.82rem; font-weight: 600;
}

/* ══ LOGIN SCREEN ══ */
.login-bg {
  position: fixed; inset: 0; background: var(--navy); overflow: hidden;
}
.login-circles { position: absolute; inset: 0; }
.circle { position: absolute; border-radius: 50%; opacity: 0.15; }
.c1 { width: 300px; height: 300px; background: var(--gold); top: -80px; right: -80px; }
.c2 { width: 200px; height: 200px; background: var(--crimson); bottom: 100px; left: -60px; }
.c3 { width: 150px; height: 150px; background: var(--slate); top: 40%; right: -30px; }
.login-container { position: relative; z-index: 2; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 20px 40px; }
.login-logo { text-align: center; margin-bottom: 28px; }
.logo-mark {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 900;
  color: var(--navy); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px rgba(201,168,76,0.25), 0 12px 30px rgba(0,0,0,0.4);
}
.login-logo h1 { color: #fff; font-family: 'Playfair Display', serif; font-size: 1.5rem; }
.login-logo p { color: rgba(255,255,255,0.55); font-size: 0.82rem; margin-top: 4px; letter-spacing: 0.08em; text-transform: uppercase; }
.login-card {
  background: rgba(255,255,255,0.08); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 20px;
  padding: 28px 24px; width: 100%; max-width: 400px;
}
.login-card h2 { color: #fff; font-size: 1.3rem; margin-bottom: 4px; font-family: 'Playfair Display', serif; }
.login-sub { color: rgba(255,255,255,0.5); font-size: 0.83rem; margin-bottom: 22px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.6); margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.05em; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px; border-radius: 10px;
  background: rgba(255,255,255,0.1); border: 1.5px solid rgba(255,255,255,0.15);
  color: #fff; font-family: 'DM Sans', sans-serif; font-size: 0.95rem;
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--gold); background: rgba(255,255,255,0.15); }
.form-group input::placeholder { color: rgba(255,255,255,0.3); }
.form-group select option { background: var(--navy); color: #fff; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.eye-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1rem; color: rgba(255,255,255,0.5); padding: 4px; }
.login-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: rgba(255,255,255,0.6); cursor: pointer; }
.login-options a { font-size: 0.82rem; color: var(--gold); text-decoration: none; }
.btn-login {
  width: 100%; padding: 14px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, var(--gold), #e8b84b);
  color: var(--navy); font-family: 'DM Sans', sans-serif; font-size: 0.97rem;
  font-weight: 700; cursor: pointer; transition: all 0.25s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,168,76,0.4); }
.login-divider { text-align: center; margin: 16px 0; position: relative; }
.login-divider::before { content:''; position:absolute; top:50%; left:0; right:0; height:1px; background:rgba(255,255,255,0.12); }
.login-divider span { background: transparent; padding: 0 12px; font-size: 0.78rem; color: rgba(255,255,255,0.35); position: relative; }
.btn-otp { width: 100%; padding: 13px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,0.2); background: transparent; color: rgba(255,255,255,0.8); font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-otp:hover { border-color: var(--gold); color: var(--gold); }
.login-footer { text-align: center; margin-top: 16px; font-size: 0.83rem; color: rgba(255,255,255,0.45); }
.login-footer a { color: var(--gold); text-decoration: none; font-weight: 600; }
.demo-hint { margin-top: 20px; font-size: 0.75rem; color: rgba(255,255,255,0.25); text-align: center; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(10,22,40,0.3); border-top-color: var(--navy); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ SCREEN HEADER (for sub-screens) ══ */
.screen-header {
  background: var(--navy); color: #fff; padding: 16px 16px 16px;
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 50;
  padding-top: max(16px, env(safe-area-inset-top));
}
.back-btn { background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; padding: 4px; line-height: 1; }
.screen-header h2 { font-size: 1.1rem; font-weight: 600; }
.simple-container { padding: 28px 20px; max-width: 480px; margin: auto; text-align: center; }
.simple-container h3 { font-size: 1.2rem; color: var(--navy); margin-bottom: 8px; font-family: 'Playfair Display', serif; }
.simple-container p { color: var(--text-light); font-size: 0.88rem; margin-bottom: 24px; line-height: 1.6; }
.otp-icon { font-size: 3rem; margin-bottom: 16px; }
.simple-container .form-group label { color: var(--text); }
.simple-container .form-group input, .simple-container .form-group select {
  background: var(--cream); border-color: var(--border); color: var(--text);
}
.simple-container .form-group input::placeholder { color: var(--text-light); }
.simple-container .form-group input:focus { border-color: var(--gold); background: #fff; }
.simple-container .btn-login { background: linear-gradient(135deg,var(--navy),var(--slate)); color: #fff; }
.otp-inputs { display: flex; gap: 10px; justify-content: center; }
.otp-digit { width: 46px; height: 54px; border-radius: 10px; border: 2px solid var(--border); text-align: center; font-size: 1.4rem; font-weight: 700; color: var(--navy); background: #fff; outline: none; }
.otp-digit:focus { border-color: var(--gold); }

/* ══ APP SCREEN ══ */
#appScreen { background: var(--bg); overflow: hidden; }

/* ── APP TOPBAR ── */
.app-topbar {
  background: var(--navy); height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.app-logo-small {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg,var(--gold),var(--gold-light));
  color: var(--navy); font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.app-school-name { color: #fff; font-size: 0.9rem; font-weight: 700; line-height: 1.2; }
.app-parent-name { color: rgba(255,255,255,0.5); font-size: 0.72rem; }
.topbar-right { display: flex; gap: 4px; }
.icon-btn { background: rgba(255,255,255,0.1); border: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1rem; position: relative; transition: background 0.2s; }
.icon-btn:hover { background: rgba(255,255,255,0.18); }
.notif-badge, .bnav-badge {
  position: absolute; top: -4px; right: -4px;
  background: #c0392b; color: #fff; border-radius: 50%; font-size: 0.6rem;
  width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; border: 2px solid var(--navy);
}
.bnav-badge { top: -6px; right: -8px; }

/* ── TAB CONTENT ── */
.tab-content {
  position: fixed;
  top: var(--topbar-h);
  bottom: var(--bottom-nav-h);
  left: 0; right: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-panel { display: none; padding-bottom: 24px; min-height: 100%; }
.tab-panel.active { display: block; }
.tab-header { padding: 20px 16px 12px; display: flex; align-items: center; justify-content: space-between; }
.tab-header h2 { font-size: 1.2rem; color: var(--navy); }

/* ── STUDENT HERO CARD ── */
.student-hero-card {
  margin: 12px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--slate));
  position: relative; padding: 24px 20px;
}
.shc-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.2), transparent),
              radial-gradient(ellipse at 10% 80%, rgba(139,26,46,0.2), transparent);
}
.shc-content { position: relative; display: flex; align-items: center; gap: 16px; }
.shc-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,var(--gold),var(--gold-light));
  color: var(--navy); font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 900; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.3);
}
.shc-info { flex: 1; }
.shc-name { color: #fff; font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.shc-meta { color: rgba(255,255,255,0.55); font-size: 0.78rem; }
.shc-attendance { text-align: center; }
.att-svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.att-bg { fill: none; stroke: rgba(255,255,255,0.15); stroke-width: 3; }
.att-fill { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray 1s ease; }
.att-pct { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: #fff; font-size: 0.72rem; font-weight: 700; }
.attendance-ring { position: relative; display: inline-block; }
.att-label { color: rgba(255,255,255,0.55); font-size: 0.7rem; margin-top: 2px; }

/* ── SECTION TITLE ROW ── */
.section-title-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 10px; }
.section-title-row h3 { font-size: 1rem; color: var(--navy); }
.section-title-row a { font-size: 0.82rem; color: var(--gold); font-weight: 600; cursor: pointer; }

/* ── QUICK ACTIONS ── */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0 12px 8px; }
.qa-btn {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.qa-btn:active { transform: scale(0.95); }
.qa-btn span { font-size: 1.6rem; line-height: 1; }
.qa-btn label { font-size: 0.7rem; font-weight: 600; color: var(--text); cursor: pointer; text-align: center; }

/* ── ANNOUNCEMENT CARDS ── */
.card-list { display: flex; flex-direction: column; gap: 10px; padding: 0 12px; }
.announcement-card {
  background: var(--card-bg); border-radius: 14px; padding: 14px;
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--border); box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  border-left: 4px solid var(--border);
}
.announcement-card.urgent { border-left-color: var(--crimson); }
.ann-icon { font-size: 1.6rem; flex-shrink: 0; }
.ann-title { font-size: 0.9rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.ann-desc { font-size: 0.8rem; color: var(--text-light); line-height: 1.5; margin-bottom: 6px; }
.ann-time { font-size: 0.72rem; color: var(--text-light); }

/* ── EVENTS SCROLL ── */
.events-scroll { display: flex; gap: 12px; padding: 0 12px 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.events-scroll::-webkit-scrollbar { display: none; }
.event-mini-card {
  flex-shrink: 0; background: var(--card-bg); border-radius: 14px;
  padding: 14px; display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--border); min-width: 200px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.emc-date { text-align: center; color: var(--crimson); }
.emc-date span { display: block; font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 900; line-height: 1; }
.emc-date small { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.emc-info strong { display: block; font-size: 0.88rem; color: var(--navy); margin-bottom: 3px; }
.emc-info span { font-size: 0.75rem; color: var(--text-light); }

/* ── RESULTS ── */
.exam-selector { padding: 0 12px 12px; }
.full-select {
  width: 100%; padding: 12px 16px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--card-bg);
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; color: var(--text);
  outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6a88' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.result-card { margin: 0 12px; background: var(--card-bg); border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.result-student-bar { background: var(--navy); padding: 16px; display: flex; align-items: center; gap: 14px; }
.rsb-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg,var(--gold),var(--gold-light)); color: var(--navy); font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 900; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rsb-name { color: #fff; font-size: 0.95rem; font-weight: 700; }
.rsb-meta { color: rgba(255,255,255,0.5); font-size: 0.75rem; margin-top: 2px; }
.marks-grid { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.mark-row { display: flex; align-items: center; gap: 10px; }
.subject { font-size: 0.82rem; color: var(--text); width: 90px; flex-shrink: 0; font-weight: 500; }
.mark-bar-wrap { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.mark-bar { height: 100%; background: linear-gradient(90deg,var(--navy),var(--slate)); border-radius: 4px; transition: width 1s ease; }
.marks { font-size: 0.78rem; color: var(--text-light); width: 60px; text-align: right; flex-shrink: 0; }
.grade { padding: 2px 8px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; }
.g-a1 { background: #d4edda; color: var(--success); }
.g-a2 { background: #d4edda; color: #1e6b3d; }
.g-b1 { background: #d1ecf1; color: #0c5460; }
.result-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border); border-top: 1px solid var(--border); }
.rs-item { background: var(--card-bg); padding: 12px 10px; text-align: center; }
.rs-item span { display: block; font-size: 0.68rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.rs-item strong { font-size: 0.88rem; color: var(--navy); }
.rs-item .pass { color: var(--success); }
.btn-download-result { width: 100%; padding: 14px; background: var(--navy); color: #fff; border: none; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.btn-download-result:hover { background: var(--crimson); }

/* ── ATTENDANCE ── */
.attendance-summary-card { margin: 12px; background: var(--card-bg); border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 20px; border: 1px solid var(--border); }
.asc-ring { flex-shrink: 0; }
.asc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; }
.asc-stat span { display: block; font-size: 0.72rem; color: var(--text-light); text-transform: uppercase; }
.asc-stat strong { font-size: 1.2rem; font-weight: 700; }
.month-calendar { margin: 12px; background: var(--card-bg); border-radius: 16px; padding: 16px; border: 1px solid var(--border); }
.absent-list { margin: 12px; background: var(--card-bg); border-radius: 16px; padding: 16px; border: 1px solid var(--border); }
.absent-list h4 { font-size: 0.9rem; color: var(--navy); margin-bottom: 12px; }
.absent-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.absent-item:last-child { border-bottom: none; }
.absent-date { color: var(--text); font-weight: 600; }
.absent-reason { color: var(--crimson); font-size: 0.78rem; }

/* ── FEES ── */
.fee-summary-card { margin: 12px; background: var(--navy); border-radius: 16px; padding: 20px; color: #fff; }
.fsc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 0.85rem; color: rgba(255,255,255,0.65); }
.fee-status-badge { padding: 4px 12px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }
.fee-status-badge.paid { background: rgba(45,122,71,0.3); color: #7de8a0; }
.fee-total { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.ft-item span { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.5); margin-bottom: 4px; text-transform: uppercase; }
.ft-item strong { font-size: 1.2rem; font-weight: 700; }
.fee-quarters { display: flex; flex-direction: column; gap: 10px; padding: 0 12px; }
.fq-card { background: var(--card-bg); border-radius: 14px; padding: 16px; border: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 12px; }
.paid-fq { border-left: 4px solid var(--success); }
.due-fq { border-left: 4px solid var(--danger); }
.fq-quarter { font-size: 0.82rem; font-weight: 700; color: var(--navy); }
.fq-amount { font-size: 0.95rem; font-weight: 700; color: var(--navy); }
.fq-status { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.badge-paid { font-size: 0.7rem; font-weight: 700; color: var(--success); }
.badge-due { font-size: 0.7rem; font-weight: 700; color: var(--danger); }
.fq-date { font-size: 0.68rem; color: var(--text-light); }
.btn-receipt, .btn-pay { padding: 6px 14px; border-radius: 8px; border: none; font-size: 0.75rem; font-weight: 700; cursor: pointer; font-family: 'DM Sans', sans-serif; white-space: nowrap; }
.btn-receipt { background: var(--cream); color: var(--navy); border: 1px solid var(--border); }
.btn-pay { background: linear-gradient(135deg,var(--gold),#e8b84b); color: var(--navy); }
/* Payment Modal */
.modal { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,0.6); display: flex; align-items: flex-end; justify-content: center; }
.modal-card { background: var(--card-bg); border-radius: 20px 20px 0 0; width: 100%; max-width: 480px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 1rem; color: var(--navy); }
.modal-header button { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-light); }
.pay-amount { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 900; color: var(--navy); text-align: center; margin-bottom: 4px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.pay-method { padding: 14px 8px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--cream); cursor: pointer; font-size: 0.8rem; font-weight: 600; color: var(--navy); font-family: 'DM Sans', sans-serif; transition: all 0.2s; }
.pay-method:hover { border-color: var(--gold); background: #fff; }

/* ── HOMEWORK ── */
.hw-date-row { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 12px 16px; background: var(--card-bg); border-bottom: 1px solid var(--border); }
.hw-date-btn { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--navy); padding: 4px 8px; }
#hwDateDisplay { font-size: 0.9rem; font-weight: 700; color: var(--navy); }
.hw-list { display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; }
.hw-card { background: var(--card-bg); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); display: flex; }
.hw-subject { width: 8px; flex-shrink: 0; }
.hw-body { flex: 1; padding: 14px; }
.hw-task { font-size: 0.88rem; color: var(--navy); font-weight: 600; margin-bottom: 5px; line-height: 1.4; }
.hw-sub { font-size: 0.75rem; color: var(--text-light); }
.hw-status { padding: 8px 12px; display: flex; align-items: center; font-size: 0.72rem; font-weight: 700; }
.pending-hw { color: var(--danger); }
.done-hw { color: var(--success); }

/* ── TIMETABLE ── */
.day-selector { display: flex; gap: 8px; padding: 12px 12px; overflow-x: auto; scrollbar-width: none; }
.day-selector::-webkit-scrollbar { display: none; }
.day-btn { flex-shrink: 0; padding: 8px 16px; border-radius: 30px; border: 1.5px solid var(--border); background: var(--card-bg); font-size: 0.82rem; font-weight: 700; cursor: pointer; color: var(--text-light); font-family: 'DM Sans', sans-serif; transition: all 0.2s; }
.day-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.timetable-list { padding: 0 12px; display: flex; flex-direction: column; gap: 8px; }
.tt-card { background: var(--card-bg); border-radius: 12px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; border: 1px solid var(--border); }
.tt-time { font-size: 0.72rem; font-weight: 700; color: var(--text-light); width: 70px; flex-shrink: 0; text-align: center; }
.tt-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.tt-subject { font-size: 0.9rem; font-weight: 700; color: var(--navy); }
.tt-teacher { font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }

/* ── GALLERY ── */
.gallery-cats { display: flex; gap: 8px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; }
.gallery-cats::-webkit-scrollbar { display: none; }
.gcat { flex-shrink: 0; padding: 7px 16px; border-radius: 30px; border: 1.5px solid var(--border); background: var(--card-bg); font-size: 0.8rem; font-weight: 600; cursor: pointer; color: var(--text-light); font-family: 'DM Sans', sans-serif; transition: all 0.2s; }
.gcat.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.gal-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 8px 12px; }
.gal-item { border-radius: 12px; overflow: hidden; aspect-ratio: 1; cursor: pointer; position: relative; background: var(--border); }
.gal-thumb { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; background: linear-gradient(135deg,var(--cream),#e8e0d0); }
.gal-item span { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(10,22,40,0.7); color: #fff; font-size: 0.65rem; font-weight: 600; padding: 4px 6px; text-align: center; }
.gal-lightbox { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.95); display: none; align-items: center; justify-content: center; }
.gal-lightbox.open { display: flex; }
.glb-inner { max-width: 320px; width: 90%; text-align: center; }
.glb-img { font-size: 8rem; margin-bottom: 16px; }
.glb-cap { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.glb-close { position: fixed; top: 20px; right: 20px; background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 1.2rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }

/* ── NOTIFICATIONS LIST ── */
.mark-all-read { background: none; border: none; color: var(--gold); font-size: 0.78rem; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.notif-list-full { display: flex; flex-direction: column; }
.notif-item { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); align-items: flex-start; background: var(--card-bg); }
.notif-item.unread { background: rgba(201,168,76,0.06); border-left: 3px solid var(--gold); }
.ni-icon { font-size: 1.6rem; flex-shrink: 0; }
.ni-title { font-size: 0.88rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.ni-desc { font-size: 0.8rem; color: var(--text-light); line-height: 1.5; margin-bottom: 6px; }
.ni-time { font-size: 0.7rem; color: var(--text-light); }

/* ── CONTACT ── */
.contact-cards { display: flex; flex-direction: column; gap: 0; margin: 12px; background: var(--card-bg); border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.contact-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); cursor: pointer; }
.contact-card:last-child { border-bottom: none; }
.cc-icon { font-size: 1.5rem; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--cream); flex-shrink: 0; }
.contact-card div:nth-child(2) { flex: 1; }
.contact-card strong { display: block; font-size: 0.88rem; font-weight: 700; color: var(--navy); }
.contact-card span { font-size: 0.78rem; color: var(--text-light); }
.cc-arrow { color: var(--text-light); font-size: 1.2rem; }
.contact-form-section { margin: 12px; background: var(--card-bg); border-radius: 16px; padding: 16px; border: 1px solid var(--border); }
.contact-form-section h4 { font-size: 0.95rem; color: var(--navy); margin-bottom: 16px; }
.contact-form-section .form-group label { color: var(--text); }
.contact-form-section .form-group input, .contact-form-section .form-group select, .contact-form-section .form-group textarea {
  background: var(--cream); border-color: var(--border); color: var(--text);
}
.contact-form-section .btn-login { background: linear-gradient(135deg,var(--navy),var(--slate)); color: #fff; }

/* ── PROFILE ── */
.profile-header { background: var(--navy); padding: 32px 20px; text-align: center; }
.profile-avatar { font-size: 3.5rem; margin-bottom: 12px; width: 80px; height: 80px; background: linear-gradient(135deg,var(--gold),var(--gold-light)); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 2rem; }
.profile-name { color: #fff; font-size: 1.2rem; font-weight: 700; font-family: 'Playfair Display', serif; margin-bottom: 4px; }
.profile-sub { color: rgba(255,255,255,0.5); font-size: 0.82rem; margin-bottom: 16px; }
.btn-edit-profile { background: rgba(201,168,76,0.2); border: 1px solid rgba(201,168,76,0.4); color: var(--gold); padding: 8px 20px; border-radius: 30px; font-size: 0.82rem; font-weight: 700; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.profile-section { margin: 12px; background: var(--card-bg); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.profile-section h4 { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.profile-info-list { }
.pil-item { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.pil-item:last-child { border-bottom: none; }
.pil-item span { font-size: 0.85rem; color: var(--text-light); }
.pil-item strong { font-size: 0.88rem; color: var(--navy); }
.notif-settings { }
.ns-item { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.ns-item:last-child { border-bottom: none; }
.ns-item span { font-size: 0.85rem; color: var(--text); }
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--border); border-radius: 24px; transition: 0.3s; }
.slider:before { position: absolute; content: ''; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s; }
.toggle input:checked + .slider { background: var(--navy); }
.toggle input:checked + .slider:before { transform: translateX(20px); }
.btn-logout { width: calc(100% - 24px); margin: 0 12px 24px; padding: 14px; background: #fff0f0; color: var(--danger); border: 1.5px solid #ffd0d0; border-radius: 12px; font-family: 'DM Sans', sans-serif; font-size: 0.92rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.btn-logout:hover { background: #ffe4e4; }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-h);
  background: var(--card-bg); border-top: 1px solid var(--border);
  display: flex; align-items: center;
  padding-bottom: var(--safe-bottom);
  z-index: 100; box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
}
.bnav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer; padding: 8px 0;
  transition: transform 0.15s;
}
.bnav-btn:active { transform: scale(0.92); }
.bnav-btn span { font-size: 1.3rem; line-height: 1; position: relative; display: inline-block; }
.bnav-btn label { font-size: 0.62rem; font-weight: 600; color: var(--text-light); cursor: pointer; }
.bnav-btn.active label { color: var(--navy); }
.bnav-btn.active span { filter: drop-shadow(0 2px 4px rgba(10,22,40,0.2)); }
.bnav-icon-wrap { position: relative; display: inline-block; }

/* ── CALENDAR ── */
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-header h4 { font-size: 0.9rem; color: var(--navy); }
.cal-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; text-align: center; }
.cal-day-label { font-size: 0.65rem; color: var(--text-light); font-weight: 700; padding: 4px 0; }
.cal-day { font-size: 0.72rem; padding: 5px 0; border-radius: 6px; color: var(--text); }
.cal-day.present { background: rgba(45,122,71,0.15); color: var(--success); font-weight: 700; }
.cal-day.absent { background: rgba(192,57,43,0.15); color: var(--danger); font-weight: 700; }
.cal-day.today { background: var(--navy); color: #fff; font-weight: 700; border-radius: 50%; }
.cal-day.empty { opacity: 0; }

/* ── TOAST ── */
.toast-container { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: calc(100% - 32px); max-width: 380px; }
.toast-msg { background: var(--navy); color: #fff; padding: 13px 18px; border-radius: 12px; font-size: 0.85rem; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,0.25); border-left: 4px solid var(--gold); animation: toastIn 0.3s ease; }
.toast-msg.error { border-left-color: var(--danger); }
.toast-msg.success { border-left-color: var(--success); }
@keyframes toastIn { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }
@keyframes toastOut { to{opacity:0;transform:translateY(-10px)} }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
