/* ==========================================================
   Al-Tanweer Schools — Student portal (extends landing.css)
   ========================================================== */
[hidden] { display: none !important; }

/* Hero */
.pt-hero {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  padding: 170px 0 150px;
  background: radial-gradient(1000px 520px at 50% -10%, #2A2D46 0%, transparent 60%), linear-gradient(180deg, var(--night-2), var(--night-0));
}
.pt-hero .lx-hero__glow { inset-inline-end: 50%; transform: translate(50%, -50%); width: 900px; height: 900px; }
[dir="rtl"] .pt-hero .lx-hero__glow { transform: translate(-50%, -50%); }
.pt-hero .lx-hero__pattern { -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 70%); }
.pt-hero__mark { position: absolute; width: 380px; inset-inline-start: -90px; bottom: -110px; opacity: .06; pointer-events: none; }
.pt-hero__in { position: relative; display: flex; flex-direction: column; align-items: center; }
.pt-hero h1 { margin: 18px 0 20px; font-size: clamp(2.6rem, 6vw, 4.6rem); color: #fff; }
.pt-hero__lead { max-width: 56ch; color: rgba(255, 255, 255, .7); font-size: 1.12rem; }

/* Exam card */
.pt-exam-wrap { position: relative; z-index: 2; margin-top: -70px; }
.pt-exam {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  max-width: 900px; margin-inline: auto; padding: 28px 32px;
  background: var(--paper); border: 1px solid var(--line-gold); border-radius: var(--radius);
  box-shadow: 0 30px 70px -30px rgba(19, 20, 29, .35);
}
.pt-exam__icon { flex: 0 0 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; font-size: 1.6rem; background: var(--night-2); color: var(--gold-1); }
.pt-exam__copy { flex: 1; min-width: 200px; }
.pt-exam__eye { display: block; color: var(--gold-4); font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.pt-exam h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.pt-exam__actions { display: flex; align-items: center; gap: 10px; }

.pt-icon-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-gold); background: transparent; color: var(--gold-4); cursor: pointer;
  font-size: 1rem; transition: background .3s, color .3s, border-color .3s;
}
.pt-icon-btn:hover { background: var(--gold-grad); color: var(--night-1); border-color: transparent; }

/* Plans */
.pt-plans { padding-top: 100px; }
.pt-tabs {
  position: relative; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px;
}
.pt-tab {
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px 12px 14px; border-radius: 18px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); color: var(--night-2); font-family: inherit; text-align: start;
  transition: border-color .3s, box-shadow .3s, background .3s, color .3s, transform .3s var(--ease);
}
[dir="rtl"] .pt-tab { padding: 12px 14px 12px 20px; }
.pt-tab:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.pt-tab i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--cream); color: var(--gold-4); font-size: 1rem; transition: .3s; }
.pt-tab b { display: block; font-size: 1rem; line-height: 1.3; }
.pt-tab small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.3; }
.pt-tab.is-active { background: var(--night-2); border-color: var(--night-2); color: #fff; box-shadow: 0 18px 36px -18px rgba(19, 20, 29, .6); }
.pt-tab.is-active i { background: var(--gold-grad); color: var(--night-1); }
.pt-tab.is-active small { color: var(--gold-1); }
.pt-tab:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }

.pt-panel { animation: pt-fade .5s var(--ease); }
@keyframes pt-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pt-panel__head {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  padding: 26px 30px; margin-bottom: 24px; border-radius: var(--radius);
  background: var(--lavender); border: 1px solid rgba(35, 37, 58, .06);
}
.pt-panel__head h3 { font-size: 1.5rem; }
.pt-panel__head h3 span { font: 600 .95rem var(--body); color: var(--gold-4); margin-inline-start: 8px; }
.pt-note { margin-top: -6px; color: var(--muted); max-width: 70ch; }
.pt-note i { color: var(--gold-4); margin-inline-end: 4px; }
.pt-panel__archive { display: flex; gap: 10px; flex-wrap: wrap; }
.pt-panel__archive .lx-btn { padding: .8em 1.4em; font-size: .92rem; }

.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.pt-grade {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px;
  padding: 28px 26px 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.pt-grade:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -30px rgba(19, 20, 29, .35); border-color: var(--line-gold); }
.pt-grade__num {
  position: absolute; top: 10px; inset-inline-end: 18px;
  font: italic 600 4.2rem/1 'Playfair Display', Georgia, serif; color: rgba(156, 124, 66, .16); transition: color .4s;
}
.pt-grade:hover .pt-grade__num { color: rgba(156, 124, 66, .32); }
.pt-grade h4 { font-size: 1.3rem; position: relative; }
.pt-grade > p { color: var(--muted); font-size: .95rem; position: relative; }
.pt-grade__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; position: relative; }
.pt-view {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: .75em 1.1em; border-radius: 999px; cursor: pointer; font: 700 .92rem/1 var(--body);
  background: var(--night-2); color: #fff; border: 1px solid var(--night-2); transition: .3s;
}
.pt-view i { color: var(--gold-1); transition: color .3s; }
.pt-view:hover { background: var(--gold-grad); color: var(--night-1); border-color: transparent; }
.pt-view:hover i { color: var(--night-1); }
.pt-view + .pt-view { background: transparent; color: var(--night-2); border-color: var(--line-gold); }
.pt-view + .pt-view i { color: var(--gold-4); }
.pt-view + .pt-view:hover { background: var(--gold-grad); color: var(--night-1); }

/* Help banner */
.pt-help-wrap { padding: 0 0 110px; }
.pt-help {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: 50px 56px; border-radius: 28px; color: var(--night-1);
  background: radial-gradient(600px 300px at 90% 0%, rgba(255, 255, 255, .35), transparent 60%), linear-gradient(120deg, #9C7C42, #C9A862 45%, #E2C57B 75%, #B7964F);
}
.pt-help > div { position: relative; }
.pt-help h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--night-1); }
.pt-help p { margin-top: 6px; color: rgba(19, 20, 29, .75); }

/* PDF viewer */
.pt-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 16, 24, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: pt-fade .3s ease; }
.pt-modal__box { width: min(1000px, 100%); height: min(88vh, 1100px); display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--night-2); border: 1px solid var(--line-gold); box-shadow: 0 40px 100px rgba(0, 0, 0, .5); }
.pt-modal__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px 14px 24px; }
[dir="rtl"] .pt-modal__bar { padding: 14px 24px 14px 18px; }
.pt-modal__bar h3 { color: #fff; font: 700 1.05rem var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-modal__tools { display: flex; gap: 8px; flex-shrink: 0; }
.pt-modal__tools .pt-icon-btn { width: 40px; height: 40px; color: var(--gold-1); }
.pt-modal__frame { position: relative; flex: 1; background: #f1f1f4; }
.pt-modal__loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.pt-modal__frame iframe { position: relative; width: 100%; height: 100%; border: 0; }

/* Signed-in user chip */
.pt-user { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8); font-size: .88rem; transition: border-color .3s, color .3s; }
[dir="rtl"] .pt-user { padding: 4px 4px 4px 14px; }
.lx-nav a.pt-user::after { display: none; }
.pt-user__out { display: none; }
[dir="rtl"] .pt-user__out { transform: scaleX(-1); }
.pt-user:hover { border-color: var(--gold-2); color: var(--gold-1); }
.pt-user img, .pt-user > i { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--night-3); color: var(--gold-1); font-size: .8rem; }

/* Sign-in screen */
.ps {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: grid; place-items: center; padding: 40px 18px;
  background: radial-gradient(1000px 600px at 50% -10%, #2A2D46 0%, transparent 60%), linear-gradient(180deg, var(--night-2), var(--night-0));
}
.ps .lx-hero__glow { inset-inline-end: 50%; transform: translate(50%, -50%); }
[dir="rtl"] .ps .lx-hero__glow { transform: translate(-50%, -50%); }
.ps .lx-hero__pattern { -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 50%, #000 0%, transparent 70%); }
.ps-card {
  position: relative; width: min(460px, 100%); padding: 44px 36px 32px; text-align: center; border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); color: rgba(255, 255, 255, .72);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: lx-rise .9s var(--ease) both;
}
.ps-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(233, 205, 128, .7), rgba(233, 205, 128, .06) 45%, rgba(233, 205, 128, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.ps-logo img { height: 70px; width: auto; margin: 0 auto 22px; }
.ps-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(221, 187, 108, .12); color: var(--gold-1); font-size: .85rem; font-weight: 700; }
.ps-card h1 { margin: 18px 0 10px; color: #fff; font-size: clamp(1.6rem, 4vw, 2rem); }
.ps-text { font-size: 1rem; }
.ps-error { margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: rgba(220, 80, 80, .14); border: 1px solid rgba(220, 80, 80, .35); color: #FFC9C9; font-size: .92rem; }
.ps-google { display: flex; justify-content: center; min-height: 44px; margin: 28px 0 18px; }
.ps-hint { font-size: .9rem; }
.ps-hint b { color: var(--gold-1); }
.ps-help { margin-top: 6px; font-size: .85rem; color: rgba(255, 255, 255, .5); }
.ps-links { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .9rem; }
.ps-links a { color: rgba(255, 255, 255, .7); transition: color .3s; }
.ps-links a:hover { color: var(--gold-1); }
.ps-links .lx-lang { margin: 0; }

/* Responsive */
@media (max-width: 900px) {
  .pt-hero { padding: 140px 0 130px; }
  .pt-tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .pt-tab { flex: 0 0 auto; scroll-snap-align: start; }
  .pt-help { padding: 40px 28px; }
}
@media (max-width: 600px) {
  .pt-hide-sm { display: none !important; }
  .pt-user { margin-inline-start: 6px; padding: 3px 10px 3px 3px; gap: 6px; }
  [dir="rtl"] .pt-user { padding: 3px 3px 3px 10px; }
  .pt-user span { display: none; }
  .pt-user__out { display: inline; font-size: .9rem; color: var(--gold-1); }
  .pt-exam { padding: 22px; gap: 16px; }
  .pt-exam__actions { width: 100%; }
  .pt-exam__actions .lx-btn { flex: 1; }
  .pt-panel__head { padding: 22px; }
  .pt-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pt-grade { padding: 22px 16px 16px; }
  .pt-grade__num { font-size: 3rem; }
  .pt-grade h4 { font-size: 1.1rem; }
  .pt-modal { padding: 0; }
  .pt-modal__box { height: 100%; border-radius: 0; border: 0; }
}
