/* site.css — jodi hui file (ek hi request mein saari aam CSS). Ise seedha mat badliye:
   fonts.css, app.css, menu.css, appfeel.css, profile.css badalkar ye file dobara jodiye:
   cat fonts.css app.css menu.css appfeel.css profile.css (har hisse se pehle uska naam) aur layout mein ?v= badhaiye. */

/* ===== fonts.css ===== */
/* Hind (SIL Open Font License 1.1) — self-hosted. Source: Google Fonts. */
@font-face {
  font-family: 'Hind';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/hind-devanagari-400.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}
@font-face {
  font-family: 'Hind';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/hind-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hind';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/hind-devanagari-600.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}
@font-face {
  font-family: 'Hind';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/hind-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== app.css ===== */
:root {
  --ink: #1b1b2f;
  --muted: #5d6075;
  --line: #e4e6ef;
  --bg: #f6f7fb;
  --card: #ffffff;
  --brand: #0b7f5f;      /* hara: safed text ke saath saaf (contrast 5:1) */
  --brand-dark: #064d3a;
  --brand-soft: #e4f5ee; /* halka hara background */
  --brand-ring: #9bd9c1; /* focus ring */
  --accent: #fea622;
  --ok: #17803d;
  --ok-bg: #e6f6ec;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --radius: 12px;
}

* { box-sizing: border-box; }

/* Hind ke akshar thode chhote dikhte hain, isliye rem-aadharit sab text ~6% bada (17px). */
html { -webkit-text-size-adjust: 100%; font-size: 106.25%; }

body {
  margin: 0;
  /* Hind: Hindi aur English/ank ek hi design mein. Agar load na ho to Devanagari ke achhe system fonts. */
  font-family: "Hind", "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1rem;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* ---------- Top bar ---------- */
.topbar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: 0 1px 10px rgba(27, 27, 47, .05); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { color: var(--ink); font-weight: 700; display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand img { height: 36px; width: auto; display: block; }
.brand-sub { font-size: .85rem; font-weight: 600; color: var(--muted); border-left: 2px solid var(--line); padding-left: 12px; line-height: 1.25; }
@media (max-width: 560px) { .brand-sub { display: none; } }
.topbar nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topbar nav a, .topbar nav button.linklike { color: var(--ink); font-size: .95rem; font-weight: 600; }
.topbar nav a:hover, .topbar nav button.linklike:hover { color: var(--brand); text-decoration: none; }
button.linklike { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }

/* ---------- Admin sub nav ---------- */
.subnav { background: #fff; border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.subnav a { padding: 6px 12px; border-radius: 999px; color: var(--muted); font-size: .92rem; }
.subnav a:hover { background: var(--bg); text-decoration: none; }
.subnav a.on { background: var(--brand); color: #fff; }

main { padding: 24px 0 56px; }

h1 { font-size: 1.65rem; margin: 0 0 6px; line-height: 1.45; } /* Hindi ki matraein katein nahi, isliye khuli line-height */
h2 { font-size: 1.22rem; margin: 0 0 10px; line-height: 1.5; }
h3 { line-height: 1.5; }
b, strong { font-weight: 600; }
.lead { color: var(--muted); margin: 0 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }

/* ---------- Cards / grid ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { text-align: center; }
.stat b { display: block; font-size: 1.9rem; color: var(--brand); line-height: 1.2; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; border-radius: 16px; padding: 32px 22px; margin-bottom: 22px; }
.hero h1 { color: #fff; font-size: 1.8rem; }
.hero p { color: #d6f2e6; max-width: 560px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn.accent { background: var(--accent); color: #2a1c00; }
.btn.accent:hover { background: #e39a12; color: #2a1c00; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn.ghost:hover { background: var(--brand); color: #fff; }
.btn.danger { background: var(--bad); }
.btn.danger:hover { background: #8f1c12; }
.btn.small { padding: 5px 11px; font-size: .86rem; border-radius: 8px; }
.hero .btn.ghost { color: #fff; border-color: #fff; }
.hero .btn.ghost:hover { background: #fff; color: var(--brand); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: .95rem; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #c9ccdc; border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-ring); border-color: var(--brand); }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 12px 0; }
.check input { width: 18px; height: 18px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-narrow { max-width: 460px; margin: 0 auto; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 3px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }

/* ---------- Alerts ---------- */
.alert { border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: .95rem; }
.alert.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #b8e3c8; }
.alert.bad { background: var(--bad-bg); color: var(--bad); border: 1px solid #f3c1bb; }
.alert ul { margin: 0; padding-left: 18px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; white-space: nowrap; }
td form.inline { display: inline; }
td .inline-edit { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
td .inline-edit input, td .inline-edit select { width: auto; padding: 6px 8px; font-size: .9rem; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-dark); }
.badge.free { background: var(--ok-bg); color: var(--ok); }
.badge.paid { background: #fff2d6; color: #8a5a00; }
.badge.off { background: #eee; color: #666; }

/* ---------- Test list / question cards ---------- */
.test-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.test-item:last-child { border-bottom: 0; }
.test-item h3 { margin: 0; font-size: 1.02rem; }
.q-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; background: #fff; }
.q-card .q-body { font-weight: 600; margin-bottom: 8px; white-space: pre-line; }
.q-card ol { margin: 0 0 8px; padding-left: 0; list-style: none; }
.q-card li { padding: 4px 8px; border-radius: 8px; }
.q-card li.right { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.q-card .expl { color: var(--muted); font-size: .9rem; margin-top: 6px; white-space: pre-line; }

.pagination { display: flex; gap: 10px; list-style: none; padding: 0; margin: 14px 0 0; justify-content: space-between; }
.pagination li span { color: var(--muted); }

footer { color: var(--muted); font-size: .85rem; text-align: center; padding: 22px 0 36px; }

@media (max-width: 560px) {
  h1 { font-size: 1.4rem; }
  .hero { padding: 24px 16px; }
  .hero h1 { font-size: 1.5rem; }
}

/* ===== menu.css ===== */
/* ============================================================
   Mobile menu (drawer) — sirf chhote screen par (<= 820px)
   Rang: hara (site ke saath ek jaisa). Header ka rang safed hi rehta hai.
   ============================================================ */

:root {
  --m: #0b7f5f;          /* mukhya hara */
  --m-light: #17a077;
  --m-dark: #064d3a;
  --m-soft: #e8f7f1;     /* icon ka halka background */
  --m-soft2: #d8f0e5;    /* chuna hua page */
  --m-hover: #f2faf6;
  --m-line: #bfe5d6;
  --m-ring: #8fd3b9;
  --m-shadow: rgba(11, 127, 95, .5);
  --m-night: 5, 30, 23;  /* gehra hara-kaala (backdrop/shadow ke liye rgb) */
}

/* ---------- Hamburger button (header ka hissa: rang waisa hi) ---------- */
.menu-btn {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(27, 27, 47, .06);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, border-color .2s ease, background .2s ease;
}
.menu-btn:active { transform: scale(.93); }
.menu-btn:focus-visible { outline: 3px solid var(--m-ring); outline-offset: 2px; }
.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .36s cubic-bezier(.22, 1, .36, 1), opacity .2s ease, width .3s ease, background .2s ease;
}
.menu-btn span:nth-child(2) { width: 13px; align-self: flex-end; margin-right: 13px; }
/* Menu khulne par button laal ho jaata hai */
.menu-btn[aria-expanded="true"] { border-color: var(--m-line); background: var(--m-soft); }
.menu-btn[aria-expanded="true"] span { background: var(--m); }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; width: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Backdrop ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(var(--m-night), .52);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .38s ease, visibility 0s linear .38s;
}

/* ---------- Drawer ---------- */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  width: min(88vw, 380px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 26px 0 0 26px;
  box-shadow: -28px 0 70px rgba(var(--m-night), .32);
  transform: translateX(104%);
  visibility: hidden;
  overscroll-behavior: contain;
  will-change: transform;
  padding-top: env(safe-area-inset-top);
  transition: transform .46s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .46s;
}

html.menu-open, html.menu-open body { overflow: hidden; }
html.menu-open .drawer-backdrop { opacity: 1; visibility: visible; transition: opacity .38s ease; }
html.menu-open .drawer { transform: none; visibility: visible; transition: transform .46s cubic-bezier(.22, 1, .36, 1); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 6px;
}
.drawer-brand img { display: block; height: 30px; width: auto; }
.drawer-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: var(--m-soft);
  color: var(--m-dark);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, background .2s ease;
}
.drawer-close:active { transform: scale(.92); background: var(--m-soft2); }
.drawer-close:focus-visible { outline: 3px solid var(--m-ring); outline-offset: 2px; }

.drawer-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 12px;
  scrollbar-width: none;
}
.drawer-scroll::-webkit-scrollbar { display: none; }

/* ---------- User card ---------- */
.drawer-user {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 16px 10px;
  padding: 16px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--m-light) 0%, var(--m) 45%, var(--m-dark) 100%);
  box-shadow: 0 14px 30px -14px var(--m-shadow);
}
.drawer-user::before,
.drawer-user::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  pointer-events: none;
}
.drawer-user::before { width: 150px; height: 150px; right: -50px; top: -70px; }
.drawer-user::after { width: 90px; height: 90px; right: 36px; bottom: -52px; background: rgba(255, 196, 110, .28); }
.drawer-user .avatar {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .42);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}
.drawer-user .who { position: relative; min-width: 0; line-height: 1.35; }
.drawer-user .who b { display: block; font-size: 1.1rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-user .who span { display: block; font-size: .88rem; opacity: .9; }
.role-pill {
  position: relative;
  margin-left: auto;
  align-self: flex-start;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fff;
  color: var(--m-dark);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .06em;
}

/* ---------- Guest card ---------- */
.drawer-guest {
  margin: 6px 16px 10px;
  padding: 18px 16px 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, #eefaf4 0%, #fff7ea 100%);
  border: 1px solid var(--m-line);
}
.drawer-guest b { display: block; font-size: 1.12rem; font-weight: 600; line-height: 1.45; }
.drawer-guest > span { display: block; margin-top: 4px; font-size: .9rem; color: var(--muted); line-height: 1.55; }
.drawer-guest .cta { display: grid; gap: 10px; margin-top: 14px; }
.drawer-guest .btn { text-align: center; padding: 13px 18px; border-radius: 14px; font-size: 1rem; }
.drawer-guest .btn.accent { background: var(--m); color: #fff; box-shadow: 0 10px 22px -12px var(--m-shadow); }
.drawer-guest .btn.accent:hover { background: var(--m-dark); color: #fff; }
.drawer-guest .btn.ghost { background: #fff; color: var(--m); border: 1.5px solid var(--m); }
.drawer-guest .btn.ghost:hover { background: var(--m); color: #fff; }

/* ---------- Links ---------- */
.drawer-nav { padding: 2px 10px 8px; }
.drawer-label {
  margin: 10px 14px 2px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--muted);
}

.drawer-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  margin: 1px 0;
  padding: 6px 12px;
  border-radius: 18px;
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
html.menu-open .drawer-link {
  opacity: 1;
  transform: none;
  transition: opacity .4s ease, transform .5s cubic-bezier(.22, 1, .36, 1), background .2s ease;
  transition-delay: calc(var(--i, 0) * 38ms + 140ms), calc(var(--i, 0) * 38ms + 140ms), 0s;
}
.drawer-link:hover { text-decoration: none; background: var(--m-hover); }
.drawer-link:active { background: var(--m-soft2); }
.drawer-link:focus-visible { outline: 3px solid var(--m-ring); outline-offset: -1px; }

.drawer-link .ico {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--m-soft);
  color: var(--m);
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.drawer-link .txt { flex: 1; min-width: 0; line-height: 1.35; padding-top: 3px; } /* Hind ka Hindi text icon ke beech mein baithe */
.drawer-link .chev { color: #b4bdb9; display: grid; place-items: center; transition: transform .25s ease, color .25s ease; }
.drawer-link:active .chev { transform: translateX(3px); }

.drawer-link.is-active { background: var(--m-soft2); color: var(--m-dark); }
.drawer-link.is-active .ico { background: var(--m); color: #fff; box-shadow: 0 8px 16px -8px var(--m-shadow); }
.drawer-link.is-active .chev { color: var(--m); }
.drawer-link.is-active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--m);
}

/* ---------- Footer ---------- */
.drawer-foot {
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--m-line);
  background: #fff;
}
/* Logout: seedha, shaant button (poora menu laal hai isliye ye alag dikhe) */
.drawer-logout {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.5px solid var(--m);
  border-radius: 18px;
  background: #fff;
  color: var(--m-dark);
  font: inherit;
  font-weight: 600;
  font-size: 1.02rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.drawer-logout:hover, .drawer-logout:active { background: var(--m); color: #fff; }
.drawer-logout:active { transform: scale(.98); }
.drawer-logout:focus-visible { outline: 3px solid var(--m-ring); outline-offset: 2px; }
.drawer-copy { margin: 10px 0 0; text-align: center; font-size: .78rem; color: #9aa39f; }

/* ============================================================
   Chhota screen: sticky glass top bar, hamburger dikhe, desktop nav chhupe
   ============================================================ */
@media (max-width: 820px) {
  .nav-desktop { display: none !important; }
  .menu-btn { display: flex; }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    padding-top: env(safe-area-inset-top);
  }
  .topbar .wrap { flex-wrap: nowrap; padding-top: 8px; padding-bottom: 8px; }

  /* Admin ki pill-wali list ek line mein, ungli se sarkaane layak */
  .subnav .wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .subnav .wrap::-webkit-scrollbar { display: none; }
  .subnav a { white-space: nowrap; flex: 0 0 auto; }
}

/* Bade screen par drawer bilkul nahi */
@media (min-width: 821px) {
  .drawer, .drawer-backdrop { display: none; }
}

/* Test ke dauran top bar chipka hua nahi (test ka apna sticky header hai) */
.focus-mode .topbar { position: static; background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* Jinhe animation pasand nahi (device setting) */
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer-backdrop, .drawer-link, .menu-btn span, .drawer-link .ico, .drawer-link .chev {
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

/* ===== appfeel.css ===== */
/* ============================================================
   App jaisa ehsaas: neeche tab-bar, upar app-bar (back + title),
   page badalne ka animation, loading patti, install suchna, dashboard.
   ============================================================ */

:root { --tab-h: 64px; }

/* ---------- Page badalne ka halka animation ---------- */
@view-transition { navigation: auto; }
.topbar { view-transition-name: topbar; }
.tabbar { view-transition-name: tabbar; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
/* 'backwards': animation khatm hote hi transform hat jaata hai. 'both' rakhne par andar ke
   position: fixed bar (jaise test page ka neeche wala bar) screen se chipakne ki jagah page ke saath sarakte the. */
main > .wrap { animation: pageIn .32s cubic-bezier(.22, 1, .36, 1) backwards; }
body.focus-mode main > .wrap { animation: none; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Upar loading patti ---------- */
.navprog { position: fixed; top: 0; left: 0; z-index: 1000; width: 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 0 3px 3px 0; opacity: 0; pointer-events: none; }
.navprog.is-loading { opacity: 1; animation: navLoad 14s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes navLoad { 0% { width: 0; } 20% { width: 42%; } 60% { width: 76%; } 100% { width: 93%; } }

/* ---------- Tab-bar (sirf phone) ---------- */
.tabbar, .install { display: none; }
.app-back, .app-title { display: none; }

@media (max-width: 820px) {
  html { -webkit-tap-highlight-color: transparent; }
  a, button, .btn, .tab, .badge, .test-item, .ap-row { touch-action: manipulation; }
  .tabbar, .topbar, .btn, .badge, .tab { -webkit-user-select: none; user-select: none; }

  .tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--line);
  }
  .tab {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: .74rem;
    font-weight: 600;
    line-height: 1.2;
    color: #78827f;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color .2s ease;
  }
  .tab:hover { text-decoration: none; }
  .tab .ti { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 15px; transition: background .25s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
  .tab:active .ti { transform: scale(.88); }
  .tab.is-active { color: var(--brand-dark); }
  .tab.is-active .ti { background: var(--brand-soft); color: var(--brand); transform: translateY(-1px); }
  .tab:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: -4px; border-radius: 14px; }

  /* Hamburger ki jagah tab-bar ka "खाता / अधिक" tab drawer kholta hai */
  .menu-btn { display: none !important; }
  .subnav { display: none; }
  footer { display: none; }
  main { padding-bottom: calc(var(--tab-h) + 30px + env(safe-area-inset-bottom)); }

  /* Andar ke pages: upar back button + page ka naam */
  body.is-inner .brand { display: none; }
  body.is-inner .app-back { display: grid; place-items: center; flex: none; width: 42px; height: 42px; margin: 0 -4px 0 -10px; border: 0; border-radius: 14px; background: none; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s ease; }
  body.is-inner .app-back:active { background: var(--brand-soft); }
  body.is-inner .app-title { display: block; flex: 1; min-width: 0; font-size: 1.1rem; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* App-bar mein back button hai, isliye page ke andar ka purana "← wapas" link nahi */
  body.is-inner .back-link { display: none; }

  /* Admin ki tables phone par kaardon (cards) mein */
  .card:has(.table-wrap.stack) { padding: 0; background: none; border: 0; }
  .table-wrap.stack { overflow: visible; }
  .stack table, .stack tbody, .stack tr, .stack td { display: block; width: 100%; }
  .stack thead { display: none; }
  .stack tr { margin-bottom: 12px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
  .stack td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 0; border: 0; text-align: right; line-height: 1.5; }
  .stack td[data-label]::before { content: attr(data-label); flex: none; color: var(--muted); font-size: .84rem; font-weight: 600; text-align: left; }
  .stack td.title { display: block; padding: 2px 0 8px; font-size: 1.05rem; text-align: left; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  .stack td.acts { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); white-space: normal !important; }
  .stack td.acts .btn.small { padding: 8px 14px; font-size: .9rem; }
  .stack td[colspan] { display: block; text-align: center; }

  /* Test parichay page ka neeche chipka button tab-bar ke upar rahe */
  body .ti-cta { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }

  /* Install suchna: tab-bar ke theek upar */
  .install {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom));
    z-index: 70;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 18px 40px -16px rgba(6, 50, 38, .45);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .3s ease, transform .4s cubic-bezier(.22, 1, .36, 1);
  }
  .install[hidden] { display: none; }
  .install.is-show { opacity: 1; transform: none; }
  .install img { flex: none; width: 44px; height: 44px; border-radius: 12px; }
  .install .msg { flex: 1; min-width: 0; font-size: .88rem; line-height: 1.5; color: #3a3d52; }
  .install .acts { display: flex; flex-direction: column; gap: 6px; }
  .install .acts button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 10px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
  .install .acts [data-act="install"] { background: var(--brand); color: #fff; }
  .install .acts [data-act="later"] { background: transparent; color: var(--muted); }
}

/* Ghar-screen se app ki tarah khulne par (bina browser bar ke) */
@media (display-mode: standalone) {
  body { overscroll-behavior-y: none; }
  .install { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  main > .wrap, .navprog.is-loading { animation: none; }
  .tab .ti, .install { transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: .01ms !important; }
}

/* ============================================================
   Student dashboard (app jaisa)
   ============================================================ */
.ap-hello {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, #12906c 0%, var(--brand) 45%, var(--brand-dark) 100%);
  box-shadow: 0 22px 44px -26px rgba(6, 77, 58, .85);
}
.ap-hello::before, .ap-hello::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.ap-hello::before { width: 190px; height: 190px; right: -60px; top: -90px; background: rgba(255, 255, 255, .09); }
.ap-hello::after { width: 110px; height: 110px; right: 50px; bottom: -64px; background: rgba(254, 166, 34, .26); }
.ap-hello .av { position: relative; flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 19px; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .4); font-size: 1.6rem; font-weight: 700; line-height: 1; }
.ap-hello .who { position: relative; min-width: 0; line-height: 1.4; }
.ap-hello small { display: block; opacity: .85; font-size: .86rem; }
.ap-hello b { display: block; font-size: 1.25rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-hello span { display: block; font-size: .9rem; opacity: .92; }

.ap-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 6px; }
.ap-stat { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px 6px; text-align: center; line-height: 1.3; }
.ap-stat b { display: block; font-size: 1.4rem; font-weight: 700; color: var(--brand-dark); }
.ap-stat span { font-size: .78rem; color: var(--muted); }

.ap-sub { margin: 20px 0 0; }
.ap-sub > header { display: flex; align-items: center; gap: 10px; margin: 0 2px 8px; }
.ap-sub h2 { flex: 1; margin: 0; font-size: 1.1rem; }
.ap-sub header small { color: var(--muted); font-size: .84rem; }
.ap-ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }

.ap-list { background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.ap-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); -webkit-tap-highlight-color: transparent; transition: background .15s ease; }
.ap-row:first-child { border-top: 0; }
.ap-row:hover { text-decoration: none; background: #fafdfb; }
.ap-row:active { background: #eff7f3; }
.ap-row .t { flex: 1; min-width: 0; line-height: 1.45; }
.ap-row .t b { display: block; font-weight: 600; }
.ap-row .t small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; color: var(--muted); font-size: .84rem; }
.ap-row .chev { flex: none; color: #b4bdb9; display: grid; }
.ap-empty { margin: 0; padding: 14px 16px; color: var(--muted); font-size: .92rem; }

.ap-row.split { padding: 0; }
.ap-row.split > a.main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px 6px 14px 16px; color: inherit; text-decoration: none; }
.ap-row.split > a.chip { flex: none; margin-right: 12px; padding: 7px 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); font-size: .84rem; font-weight: 600; text-decoration: none; }

.ap-score { position: relative; flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p, 0) * 1%), #e5eeea 0); font-weight: 700; font-size: .85rem; color: var(--brand-dark); }
.ap-score::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.ap-score span { position: relative; }

/* ============================================================
   Vishay ke andar hisse: PYQ (saal ke button) aur adhyay-war list
   ============================================================ */
.hm-tests > h2 { margin: 6px 2px 4px; }
.ap-sub h3 { flex: 1; margin: 0; font-size: 1.1rem; }

.ap-grp { margin: 0 0 10px; }
.ap-grp-h { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.ap-grp-h small { color: #8a948f; font-size: .8rem; font-weight: 500; }
details.ap-grp > summary.ap-grp-h { list-style: none; align-items: center; margin: 0; padding: 13px 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); font-size: .98rem; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
details.ap-grp > summary.ap-grp-h::-webkit-details-marker { display: none; }
details.ap-grp > summary.ap-grp-h span { flex: 1; min-width: 0; }
details.ap-grp > summary.ap-grp-h::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 4px; border-right: 2px solid #9aa5a1; border-bottom: 2px solid #9aa5a1; transform: rotate(45deg); transition: transform .2s ease; }
details.ap-grp[open] > summary.ap-grp-h { border-color: var(--brand-ring); }
details.ap-grp[open] > summary.ap-grp-h::after { margin: 4px 4px 0; transform: rotate(-135deg); }
details.ap-grp > .ap-list { margin-top: 8px; }
details.ap-grp > summary:focus-visible, .yr-chip:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }

.yr-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; max-width: 560px; }
.yr-chips form { display: flex; margin: 0; }
.yr-chip { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 6px; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color .15s ease, background .15s ease; }
.yr-chip b { font-size: 1.15rem; font-weight: 700; line-height: 1.3; color: var(--brand-dark); }
.yr-chip small { font-size: .74rem; color: var(--muted); }
.yr-chip:hover { border-color: var(--brand); text-decoration: none; }
.yr-chip:active { background: var(--brand-soft); }

/* Bina login wali list: naam ek link, saath mein "ट्राई करें" */
.ap-row .t b a { color: inherit; }
.ap-row form.try { flex: none; margin: 0; }

/* ============================================================
   Student dashboard: ek baar mein ek vishay
   ============================================================ */
.st-resume { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 14px 16px; border: 1.5px solid #f1d9a6; border-radius: 20px; background: #fff8ea; color: var(--ink); text-decoration: none; }
.st-resume:hover { text-decoration: none; border-color: #e3b75c; }
.st-resume .t { flex: 1; min-width: 0; line-height: 1.4; }
.st-resume .t b { display: block; font-size: 1.02rem; font-weight: 600; }
.st-resume .t small { display: block; color: #8a6a2a; font-size: .84rem; }
.st-resume .btn { flex: none; background: var(--accent); color: #2a1c00; }

.st-h { margin: 24px 2px 10px; font-size: 1.1rem; }
.st-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 6px; scrollbar-width: none; }
.st-chips::-webkit-scrollbar { display: none; }
.st-chips button { flex: none; padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: .95rem; font-weight: 600; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s ease, border-color .15s ease; }
.st-chips button small { font-size: .78rem; color: var(--muted); }
.st-chips button:hover { border-color: var(--brand); }
.st-chips button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.st-chips button[aria-selected="true"] small { color: rgba(255, 255, 255, .85); }
.st-chips button:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }

.st-panel[hidden] { display: none; }
.st-prog { margin: 0 2px 16px; color: var(--muted); font-size: .9rem; }
.st-prog b { color: var(--ink); font-weight: 600; }
.st-prog i { display: block; height: 6px; margin-top: 6px; border-radius: 99px; background: #e5eeea; overflow: hidden; }
.st-prog em { display: block; height: 100%; border-radius: 99px; background: var(--brand); }

.st-sec { margin: 0 0 20px; }
.st-sec > h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; color: var(--muted); font-size: .95rem; font-weight: 600; }
.st-sec > h3 small { color: #8a948f; font-size: .8rem; font-weight: 500; }

.st-done { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.st-done.warn { background: #fff2d6; color: #8a5a00; }
.st-done.bad { background: var(--bad-bg); color: var(--bad); }
.yr-chip.done { border-color: #b8e3c8; background: #f3fbf6; }
.yr-chip.done small { color: var(--ok); font-weight: 600; }
.st-empty .ap-empty { padding: 22px 16px; text-align: center; line-height: 1.6; }
.st-empty .btn { margin-top: 10px; }

/* ============================================================
   Home: pehle teen bade card (कक्षा 10 / कक्षा 12 / प्रतियोगी), phir andar ke page
   ============================================================ */
.hm-hero { position: relative; overflow: hidden; padding: 26px 22px; }
.hm-hero::before, .hm-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hm-hero::before { width: 220px; height: 220px; right: -70px; top: -110px; background: rgba(255, 255, 255, .08); }
.hm-hero::after { width: 130px; height: 130px; right: 60px; bottom: -80px; background: rgba(254, 166, 34, .22); }
.hm-hero > * { position: relative; }
.hm-hero h1 { margin-bottom: 4px; }
.hm-hero p { margin: 0; }

.hm-pick > h2, .hm-steps > h2 { margin: 6px 2px 12px; font-size: 1.2rem; }

.hm-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hm-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 24px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 10px 28px -22px rgba(27, 27, 47, .5); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; -webkit-tap-highlight-color: transparent; }
.hm-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 18px 34px -22px rgba(27, 27, 47, .55); }
.hm-card:active { transform: scale(.99); }
.hm-card:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }
.hm-card.c10:hover { border-color: #9bd9c1; }
.hm-card.c12:hover { border-color: #b7c6f5; }
.hm-card.cother:hover { border-color: #f5a3a3; }

.hm-art { position: relative; overflow: hidden; flex: none; width: 74px; height: 74px; display: grid; place-items: center; border-radius: 22px; color: #fff; }
.hm-art::after { content: ""; position: absolute; width: 60px; height: 60px; right: -22px; top: -22px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.hm-art b { position: relative; font-size: 2rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.hm-art b.sm { font-size: 1.15rem; letter-spacing: .02em; }
.hm-art i { position: absolute; right: 8px; bottom: 7px; display: grid; opacity: .85; }
.hm-art svg { position: relative; }
.c10 .hm-art { background: linear-gradient(135deg, #17a077 0%, #0b7f5f 55%, #064d3a 100%); box-shadow: 0 12px 22px -12px rgba(11, 127, 95, .8); }
.c12 .hm-art { background: linear-gradient(135deg, #5b84ff 0%, #2f5bd3 55%, #1e3a8a 100%); box-shadow: 0 12px 22px -12px rgba(47, 91, 211, .8); }
.cother .hm-art { background: linear-gradient(135deg, #ff6b6b 0%, #e03131 55%, #a51d1d 100%); box-shadow: 0 12px 22px -12px rgba(224, 49, 49, .8); }

.hm-txt { flex: 1; min-width: 0; line-height: 1.4; }
.hm-txt > b { display: block; font-size: 1.3rem; font-weight: 700; }
.hm-txt > small { display: block; margin-top: 2px; color: var(--muted); font-size: .9rem; }
.hm-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hm-meta span { padding: 3px 10px; border-radius: 999px; background: #f1f3f7; color: #474b60; font-size: .8rem; font-weight: 600; }
.c10 .hm-meta span { background: var(--brand-soft); color: var(--brand-dark); }
.c12 .hm-meta span { background: #e8eefe; color: #1e3a8a; }
.cother .hm-meta span { background: #ffe3e3; color: #a51d1d; }
.hm-meta span.hm-soon { background: #fff7e0; color: #8a5a00; border: 1px dashed #e9c46a; }
.hm-go { position: absolute; right: 16px; top: 18px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #f4f6f9; color: #7a8395; }
.hm-card:hover .hm-go { background: var(--brand); color: #fff; }

.hm-steps { margin-top: 28px; }
.hm-steps ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.hm-steps li { display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: #fff; line-height: 1.4; }
.hm-steps li span { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.hm-steps li b { font-weight: 600; }
.hm-steps li small { color: var(--muted); font-size: .86rem; }

/* Andar ke page */
.hm-crumb { margin: 0 2px 12px; color: var(--muted); font-size: .92rem; }
.hm-crumb a { font-weight: 600; }
.hm-head { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 24px; background: #fff; }
.hm-head .hm-art { width: 64px; height: 64px; border-radius: 20px; }
.hm-head .hm-art b { font-size: 1.7rem; }
.hm-head h1 { margin: 0; font-size: 1.35rem; line-height: 1.4; }
.hm-head p { margin: 2px 0 0; color: var(--muted); }
.hm-note { margin: 0 2px 14px; padding: 10px 14px; border-radius: 14px; background: #f3f7ff; border: 1px solid #d6e2fb; color: #2b3a67; font-size: .9rem; line-height: 1.55; }
.hm-soonbox { padding: 22px 18px; border: 1px dashed #e9c46a; border-radius: 22px; background: #fffaf0; text-align: center; line-height: 1.6; }
.hm-soonbox > b { display: block; font-size: 1.1rem; }
.hm-soonbox p { margin: 8px 0 0; color: #6b5a33; }
.hm-soonbox .actions { justify-content: center; }
.hm-subjects { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.hm-subjects span { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid #efd9a8; font-size: .9rem; font-weight: 600; }

@media (max-width: 760px) {
  .hm-hero { padding: 22px 18px; }
  .hm-cards { grid-template-columns: 1fr; gap: 12px; }
  .hm-card { flex-direction: row; align-items: center; gap: 14px; padding: 14px 52px 14px 14px; border-radius: 22px; }
  .hm-art { width: 66px; height: 66px; border-radius: 20px; }
  .hm-art b { font-size: 1.75rem; }
  .hm-txt > b { font-size: 1.15rem; }
  .hm-meta { margin-top: 7px; }
  .hm-go { top: 50%; right: 12px; width: 32px; height: 32px; transform: translateY(-50%); }
  .hm-steps ol { grid-template-columns: 1fr; gap: 8px; }
  .hm-steps li { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; padding: 12px 14px; }
  .hm-steps li span { margin: 0; }
  .hm-steps li small { flex-basis: 100%; padding-left: 44px; margin-top: -4px; }
  .hm-head { padding: 14px; gap: 12px; }
  .hm-head h1 { font-size: 1.15rem; }
}

/* ===== profile.css ===== */
/* Profile photo, kaksha page, aur admin ki student-report */

.pf-photo { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 18px 0 6px; text-align: center; }
.pf-av { width: 132px; height: 132px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); font-size: 3rem; font-weight: 700; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--brand), 0 14px 30px -16px rgba(6, 50, 38, .5); }
.pf-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-av img[hidden], .pf-av span[hidden] { display: none; }
.pf-btns, .pf-save { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pf-msg { min-height: 1.4em; font-size: .92rem; color: var(--muted); }
.pf-msg.bad { color: #b42318; font-weight: 600; }
.pf-remove { color: #b42318; font-size: .9rem; }
.pf-sep { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

.pf-cam { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 16px; background: rgba(8, 20, 16, .82); }
.pf-cam[hidden] { display: none; }
.pf-cam-box { width: min(100%, 440px); background: #fff; border-radius: 22px; padding: 12px; }
.pf-cam-box video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: #000; transform: scaleX(-1); }
.pf-cam-bar { display: flex; gap: 10px; justify-content: space-between; margin-top: 12px; }
.pf-cam-bar .btn { flex: 1; }

/* Chhoti gol tasveer (list / dashboard / drawer) */
.mini-av { flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: .95rem; vertical-align: middle; }
.mini-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-hello .av, .drawer-user .avatar { overflow: hidden; }
.ap-hello .av img, .drawer-user .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

/* Admin: student ki report */
.sr-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sr-head .pf-av { width: 84px; height: 84px; font-size: 2rem; border-width: 3px; }
.sr-head h1 { margin: 0; }
.sr-meta { color: var(--muted); font-size: .95rem; line-height: 1.6; }
.sr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.sr-stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 8px; text-align: center; line-height: 1.3; }
.sr-stat b { display: block; font-size: 1.5rem; color: var(--brand-dark); }
.sr-stat span { font-size: .8rem; color: var(--muted); }
.sr-bar { display: inline-block; width: 70px; height: 8px; border-radius: 99px; background: #e5eeea; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.sr-bar i { display: block; height: 100%; background: var(--brand); }
@media (max-width: 600px) { .sr-stats { grid-template-columns: repeat(2, 1fr); } }
@media print {
  .topbar, .tabbar, .subnav, .drawer, footer, .no-print { display: none !important; }
  .card { border: 0; box-shadow: none; }
}

.pf-save[hidden], .pf-btns[hidden], .pf-msg[hidden] { display: none; }
.pf-av img { font-size: 0; }

/* Exam chunne ke checkbox, home ke exam-chips, vishay ka edit-form */
.exam-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.exam-opt { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font-weight: 500; line-height: 1.4; }
.exam-opt input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.exam-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.exam-opt small { color: var(--muted); font-weight: 400; }
.chk { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-weight: 500; }
.chk input { width: 18px; height: 18px; accent-color: var(--brand); }
.exam-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.exam-chips::-webkit-scrollbar { display: none; }
.exam-chips a { flex: none; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.exam-chips a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.subj-edit .subj-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.subj-edit .subj-top input[type=text] { flex: 1; min-width: 160px; }
