/* The student's app frame (student.html). Page, cards, notes, fields, buttons and the trial panel come from apply.css;
   this adds the top bar, the tab bar and the shared pieces every screen uses. Screen-specific styles live in student/*.css.
   The look is the navy design canvas's phone boards (student-*): a brand mark and a round bell on top, a light tab bar
   with the current tab in navy, capsule chips, gold for an ayah position. */
.sapp .top .word { display: inline-flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 800; line-height: 1; color: var(--ink); }
.sapp .top .word .logo { margin: 0; border-radius: 10px; box-shadow: var(--shadow-deep); }
.bell { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--brand); box-shadow: var(--shadow); display: grid; place-items: center;
  transition: transform 150ms var(--ease); }
.bell:active { transform: scale(.95); }
.dot { position: absolute; top: 9px; inset-inline-end: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-mark); border: 2px solid var(--surface); }
/* back to a named screen: the arrow and its name (جدولي، الرئيسية) */
.sapp .back.named { width: auto; height: 44px; gap: 2px; padding: 0 4px 0 10px; border-radius: var(--radius-pill); background: none; box-shadow: none; display: inline-flex; align-items: center; font-size: 15.5px; font-weight: 700; color: var(--brand); }
.sapp .back.named svg { flex: none; }

/* the tab bar, fixed at the bottom; screens with it leave room for it */
body.with-tabs .app { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); }
.tabbar { position: fixed; z-index: 40; bottom: 0; inset-inline: 0; margin: 0 auto; max-width: 480px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 4px calc(env(safe-area-inset-bottom, 0px) + 8px);
  background: rgba(255, 255, 255, .94); box-shadow: 0 -1px 0 var(--line); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
.tabbar a { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: var(--radius-md); color: var(--ink-3); font-size: 11.5px; font-weight: 500; text-decoration: none; }
.tabbar a[aria-current="page"] { color: var(--brand); font-weight: 700; }
.tabbar a[aria-current="page"] svg { color: var(--navy-2); stroke-width: 2.2; }
.tabbar .ti { position: relative; display: grid; place-items: center; }
.tabbar .ti .dot { top: -3px; inset-inline-end: -6px; }

/* shared pieces */
.card-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.4; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-head a, .link { display: inline-flex; align-items: center; gap: 2px; color: var(--brand); font-size: var(--text-md); font-weight: 700; text-decoration: none; }
.card-head a { min-height: 44px; margin-block: -10px; }     /* a full finger's height without growing the head */
.muted-line { margin: 0; font-size: var(--text-md); color: var(--ink-2); }
.section-title { margin: 8px 0 0; font-size: 17px; font-weight: 700; }
/* a list of rows: icon, text (b + small), and an end part */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list > li { border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.row { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 10px 0; border: 0; background: none; color: inherit; text-align: start; text-decoration: none; }
.row .ri { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.row .rt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.row .rt b { font-size: 15.5px; font-weight: 700; }
.row .rt small { font-size: var(--text-md); color: var(--ink-2); }
.row .re { flex: none; color: var(--ink-2); font-size: var(--text-sm); display: flex; align-items: center; gap: 6px; }
/* chips: capsules; a grade's own colour (ممتاز green, جيد navy, مقبول amber, ضعيف red); gold for make-ups */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 700; background: var(--fill-2); color: var(--ink-2); white-space: nowrap; }
.chip.ok { background: var(--brand-soft); color: var(--brand); }
.chip.best { background: var(--live-soft); color: var(--live); }
.chip.wait { background: var(--amber-bg); color: var(--amber); }
.chip.no { background: var(--danger-bg); color: var(--danger); }
.chip.gold { background: var(--gold); color: var(--gold-ink); box-shadow: inset 0 0 0 1px var(--gold-edge); }
.chip.line { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.chip.now { background: var(--grad); color: var(--on-accent); }
/* an ayah position (surah and ayah, never the Quran's words): always gold */
.pos { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--radius-sm); background: var(--gold); color: var(--gold-ink); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
/* an icon in a soft circle */
.ico-circle { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
/* number cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.stat b { font-size: var(--text-2xl); font-weight: 800; color: var(--brand); line-height: 1.2; }
.stat small { font-size: var(--text-sm); color: var(--ink-2); }
.btn.small { height: 36px; padding: 0 14px; font-size: var(--text-md); }
.btn:disabled { opacity: 1; cursor: default; }
.trial-link { color: var(--brand); font-size: var(--text-md); font-weight: 700; }
.trial-pop select { height: 40px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0 10px; background: var(--surface); }
/* a confirmation dialog: a sheet from the bottom (no entrance motion: the app redraws whole screens, and it would replay) */
.sheet-back { position: fixed; inset: 0; z-index: 60; background: rgba(11, 21, 52, .42); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: min(480px, 100%); max-height: 86dvh; overflow-y: auto; padding: 22px 20px calc(env(safe-area-inset-bottom, 0px) + 20px); border-radius: var(--radius-xl) var(--radius-xl) 0 0; background: var(--surface);
  box-shadow: 0 -18px 40px -20px rgba(11, 21, 52, .45); display: flex; flex-direction: column; gap: 12px; }
.sheet h2 { margin: 0; font-size: var(--text-xl); font-weight: 800; }
.sheet p { margin: 0; color: var(--ink-2); font-size: var(--text-base); }
/* links drawn as buttons keep the button's colours, not the browser's link blue */
a.btn { color: var(--brand); text-decoration: none; }
a.btn.primary { color: var(--on-accent); }
a.btn.quiet { color: var(--brand); }

/* a press shows on the bar (a phone has no hover) */
.tabbar a { transition: transform 120ms ease-out, color 150ms ease; }
.tabbar a:active { transform: scale(0.94); }
@media (prefers-reduced-motion: reduce) { .tabbar a { transition: none; } .tabbar a:active { transform: none; } }

/* Moves between screens (student/app.js): the frame stays still while the screen changes softly, as a phone app's
   does; the tab bar and the top bar are their own layers so they never blink. */
.sapp .top { view-transition-name: s-top; }
.tabbar { view-transition-name: s-tabs; }

/* «الشيخ بانتظارك» (student/app.js): the sheikh is in his call; one tap and he is in. */
.sheikh-waiting { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; padding: 14px 16px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #132457, var(--navy-2)); color: #fff; text-decoration: none; box-shadow: var(--shadow-deep); }
.sheikh-waiting:active { transform: scale(.98); }
.sheikh-waiting .sw-text { flex: 1; display: grid; gap: 2px; }
.sheikh-waiting b { font-size: 17px; font-weight: 800; }
.sheikh-waiting small { font-size: 14px; opacity: .85; }
.sheikh-waiting .sw-dot { width: 12px; height: 12px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .25); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .sheikh-waiting .sw-dot { animation: sw-pulse 1.6s ease-in-out infinite; }
  @keyframes sw-pulse { 50% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } }
}

/* «شيخك» (student/sheikh.js): a card on «الرئيسية» with his photo and name; his page with the photo large (a tap opens it
   at its size), his name, and his CV laid out by its lines (headings, points, lines) */
.card.sk-card { display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; color: var(--ink); text-align: start; text-decoration: none; }
.sk-card:active { background: var(--navy-wash); }
.sk-pic { flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--brand-soft); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px #E9C77D; }
.sk-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sk-t small { font-size: var(--text-xs); font-weight: 700; color: var(--gold-ink); }
.sk-t b { font-size: var(--text-base); font-weight: 800; line-height: 1.4; }
.sk-t span { font-size: var(--text-sm); color: var(--ink-3); }
.sk-card > svg { flex: none; color: var(--ink-3); }
.sk-page { display: flex; flex-direction: column; gap: 14px; }
.sk-head.card { align-items: center; gap: 12px; padding: 22px 16px; text-align: center; }
.sk-photo { width: 168px; height: 210px; border-radius: 20px; overflow: hidden; background: var(--brand-soft); box-shadow: 0 16px 36px -18px rgba(16, 27, 58, .55); }
.sk-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-head h2 { margin: 0; font-size: var(--text-xl); font-weight: 800; line-height: 1.4; }
.sk-bio.card { gap: 8px; padding: 18px 18px 20px; }
.sk-bio h2 { margin: 0 0 4px; font-size: var(--text-lg); font-weight: 800; }
.sk-bio h3 { margin: 10px 0 2px; font-size: var(--text-base); font-weight: 800; color: var(--brand); }
.sk-bio p { margin: 0; font-size: var(--text-base); line-height: 1.8; color: var(--ink); }
.sk-points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sk-points li b { font-weight: 700; }
.sk-points li { position: relative; padding-inline-start: 18px; font-size: var(--text-base); line-height: 1.75; }
.sk-points li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: #E9C77D; }

/* an applicant's login number on «طلبي» (the real side) */
.au-login-no { display: block; font-size: 32px; font-weight: 800; letter-spacing: .12em; color: var(--brand); text-align: center; }
