/* ═══════════════════════════════════════════════════════════════
   styles.css — Iraqi Central Admissions Calculator 2026
   Design: Modern Glassmorphism · Academic Blue · Mobile-First
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ───────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Design Tokens ───────────────────────────────────────────── */
:root {
  /* Blues */
  --blue-950: #0a1628;
  --blue-900: #0f2044;
  --blue-800: #1a3470;
  --blue-700: #1e3a8a;
  --blue-600: #1d4ed8;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-300: #60a5fa;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  /* Accents */
  --gold:          #f59e0b;
  --gold-light:    #fef3c7;
  --gold-dark:     #78350f;
  --green:         #16a34a;
  --green-bg:      #f0fdf4;
  --green-border:  #86efac;
  --yellow:        #d97706;
  --yellow-bg:     #fffbeb;
  --yellow-border: #fcd34d;
  --red:           #dc2626;
  --red-bg:        #fef2f2;
  --red-border:    #fca5a5;

  /* Surfaces */
  --surface:       rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --bg:            #eef2ff;
  --text:          #0f172a;
  --text-2:        #334155;
  --muted:         #64748b;
  --border:        rgba(203, 213, 225, 0.7);
  --border-solid:  #e2e8f0;

  /* Glass */
  --glass:        rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur:   blur(14px);
  --glass-shadow: 0 8px 32px rgba(15, 32, 68, 0.12);

  /* Radius */
  --radius:    18px;
  --radius-sm: 11px;
  --radius-xs:  7px;

  /* Shadows */
  --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.05);
  --shadow:    0 4px 20px rgba(15, 32, 68, 0.08);
  --shadow-md: 0 8px 32px rgba(15, 32, 68, 0.13);
  --shadow-lg: 0 20px 60px rgba(15, 32, 68, 0.18);

  /* Transitions */
  --t:      0.25s ease;
  --t-fast: 0.15s ease;

  /* AdSense anchor-ad safe zone (mobile bottom bar ~60px + breathing room) */
  --floating-ad-safe-bottom: 104px;
}

/* ── App Loader ──────────────────────────────────────────────── */
.app-loader {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(160deg, var(--blue-950) 0%, var(--blue-800) 60%, #1d4ed8 100%);
  position: relative;
  overflow: hidden;
}

.app-loader-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.3) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: glowPulse 2.4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%, -50%) scale(1.1); }
}

.app-loader-icon {
  font-size: 54px;
  animation: loaderBounce 1.8s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes loaderBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.app-loader-brand {
  display: flex;
  align-items: baseline;
  gap: 0;
  position: relative;
  z-index: 1;
  margin-bottom: 2px;
}

.app-loader-q {
  font-family: 'Cairo', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #3b82f6;
  letter-spacing: -1px;
  line-height: 1;
}

.app-loader-name {
  font-family: 'Cairo', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1;
}

.app-loader-title {
  font-family: 'Cairo', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
  position: relative;
  z-index: 1;
}

.app-loader-ring {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--gold);
  animation: spin 0.85s linear infinite;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.app-loader-sub {
  font-family: 'Tajawal', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  position: relative;
  z-index: 1;
}

/* ── Base & Typography ───────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  direction: rtl;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% 15%, rgba(59,130,246,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(99,102,241,0.05) 0%, transparent 55%);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Chatbase z-index override ───────────────────────────────── */
#chatbase-bubble-button,
iframe[id^="chatbase"],
[id="chatbase-bubble-window"] {
  z-index: 9999 !important;
  bottom: 82px !important;
}

@media (min-width: 640px) {
  #chatbase-bubble-button,
  iframe[id^="chatbase"],
  [id="chatbase-bubble-window"] {
    bottom: 28px !important;
  }
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 400;
  height: 48px;
  background: rgba(2, 9, 23, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  overflow: hidden;
}
.topbar-in {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge */
  /* RTL pages scroll from right — fade left edge only */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 28px, black calc(100% - 28px), transparent 100%);
  mask-image:         linear-gradient(to right, transparent 0%, black 28px, black calc(100% - 28px), transparent 100%);
}
.topbar-in::-webkit-scrollbar { display: none; }

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: 'Tajawal', sans-serif;
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  padding: 6px 13px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .10);
  white-space: nowrap;          /* keep each button on one line */
  flex-shrink: 0;               /* never compress */
  scroll-snap-align: start;
  transition: color .2s, border-color .2s, background .2s;
}
.topbar-link:hover,
.topbar-link:focus-visible {
  color: #fff;
  border-color: rgba(34, 197, 94, .45);
  background: rgba(34, 197, 94, .09);
  outline: none;
}
.topbar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: topbarBlink 2.5s infinite;
}
@keyframes topbarBlink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ── Header ──────────────────────────────────────────────────── */
.hdr {
  background: linear-gradient(150deg,
    #020917 0%,
    #0a1628 30%,
    #0f2348 70%,
    #0d1f42 100%);
  padding: 22px 16px 40px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(59,130,246,0.18);
}

.hdr::before,
.hdr::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hdr::before {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(59,130,246,0.18) 0%, transparent 65%);
  top: -140px;
  right: -100px;
}
.hdr::after {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  bottom: -100px;
  left: -70px;
}

.hdr-in {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hdr-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  padding: 5px 15px;
  font-size: 12px;
  font-family: 'Tajawal', sans-serif;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 13px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hdr h1 {
  font-size: clamp(19px, 5vw, 27px);
  font-weight: 900;
  color: #fff;
  line-height: 1.22;
  margin-bottom: 7px;
  letter-spacing: -0.3px;
}

.hdr p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  font-family: 'Tajawal', sans-serif;
  line-height: 1.5;
}

/* ── Brand Logo ── */
.hdr-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.hdr-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 14px rgba(59,130,246,0.45);
  flex-shrink: 0;
}

.hdr-logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
  padding: 10px;
  background: linear-gradient(145deg, #dde6f5 0%, #eaf0fb 100%);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(15, 32, 68, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1.5px solid rgba(180, 200, 235, 0.6);
}

.hdr-logo-q {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  line-height: 1;
  letter-spacing: -1px;
}

.hdr-logo-dot {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  background: #fbbf24;
  border-radius: 50%;
  font-size: 0;
}

.hdr-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.hdr-brand-name {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  letter-spacing: -0.5px;
}

.hdr-brand-tag {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-family: 'Tajawal', sans-serif;
  margin-top: 1px;
  letter-spacing: 0.5px;
}

.hdr-chips {
  display: flex;
  gap: 9px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hdr-chip {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px 16px;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--t-fast), transform var(--t-fast);
}
.hdr-chip:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.hdr-chip .n {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.hdr-chip .l {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 2px;
  font-family: 'Tajawal', sans-serif;
}

/* ── Sponsored Banner ────────────────────────────────────────── */
.spon {
  background: linear-gradient(135deg, #6b2d0a, #92400e, #b45309);
  padding: 13px 16px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

.spon-in {
  max-width: 640px;
  margin: 0 auto;
}

.spon-tag {
  font-size: 10.5px;
  font-family: 'Tajawal', sans-serif;
  background: rgba(255, 255, 255, 0.15);
  color: #fef3c7;
  border-radius: 5px;
  padding: 2px 10px;
  margin-bottom: 9px;
  display: inline-block;
  letter-spacing: 0.3px;
}

.spon-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: none;
}
.spon-row::-webkit-scrollbar { display: none; }

.spon-card {
  min-width: 188px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t-fast), transform var(--t-fast);
}
.spon-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.spon-card .sc-name { color: #fff; font-size: 13px; font-weight: 700; }
.spon-card .sc-uni  { color: #fde68a; font-size: 11.5px; margin-top: 2px; }
.spon-card .sc-note { color: #fed7aa; font-size: 11px; margin-top: 4px; font-family: 'Tajawal', sans-serif; }
.spon-card .sc-btn  {
  display: inline-block;
  margin-top: 8px;
  background: var(--gold);
  color: #78350f;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
}

/* ── Layout Container ────────────────────────────────────────── */
.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 14px 42px;
  min-height: 200px;
}

/* ── Glass Card ──────────────────────────────────────────────── */
.card {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  padding: 18px;
  margin-bottom: 13px;
  transition: box-shadow var(--t);
}
.card:focus-within {
  box-shadow: 0 8px 36px rgba(37, 99, 235, 0.14);
}

.card-ttl {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-600);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Grade Input Row ─────────────────────────────────────────── */
.grade-row {
  display: flex;
  gap: 9px;
  align-items: stretch;
}

.grade-wrap { flex: 1; position: relative; }

.grade-inp {
  width: 100%;
  border: 2.5px solid var(--border-solid);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 28px;
  font-weight: 900;
  font-family: 'Cairo', sans-serif;
  text-align: center;
  color: var(--blue-700);
  background: rgba(255, 255, 255, 0.95);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t-fast);
  direction: ltr;
}
.grade-inp:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
  transform: scale(1.01);
}
.grade-inp::placeholder {
  color: #cbd5e1;
  font-size: 18px;
  font-weight: 500;
}

.info-btn {
  background: var(--blue-50);
  border: 2px solid var(--blue-100);
  border-radius: var(--radius-sm);
  padding: 0 13px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
  flex-shrink: 0;
}
.info-btn:hover {
  background: var(--blue-100);
  transform: scale(1.05);
}

.reset-btn {
  background: rgba(248, 250, 252, 0.9);
  border: 2px solid var(--border-solid);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  cursor: pointer;
  color: var(--muted);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cairo', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  gap: 4px;
  min-width: 76px;
  flex-shrink: 0;
}
.reset-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-bg);
}

.eff-grade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--blue-50), #e0eaff);
  border: 1px solid var(--blue-100);
  border-radius: 9px;
  padding: 5px 13px;
  font-size: 13px;
  color: var(--blue-700);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

/* ── Filters Grid ────────────────────────────────────────────── */
.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 13px;
}

.fg label {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 5px;
  display: block;
}

.gender-note {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
  opacity: 0.8;
  font-family: 'Tajawal', sans-serif;
  font-weight: 500;
}

select {
  width: 100%;
  border: 2px solid var(--border-solid);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: 'Cairo', sans-serif;
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.95);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M.5.5l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 32px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
select:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* ── Bonus Toggles ───────────────────────────────────────────── */
.bonus-row {
  display: flex;
  gap: 9px;
}

.bon-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 2px solid var(--border-solid);
  border-radius: var(--radius-sm);
  padding: 10px 7px;
  font-size: 12.5px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
}
.bon-btn.on {
  border-color: var(--green);
  background: var(--green-bg);
  color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.bon-btn .bico { font-size: 16px; }

.bon-badge {
  background: var(--green);
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 900;
}

/* ── Golden Tips Section ─────────────────────────────────────── */
.guide-section {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 13px;
  box-shadow: var(--shadow);
}

.guide-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--blue-600);
  margin-bottom: 12px;
  font-family: 'Cairo', sans-serif;
}

.guide-cards {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.guide-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  border: 1px solid rgba(203, 213, 225, 0.55);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.guide-card:hover {
  transform: translateX(-3px);
  box-shadow: var(--shadow-xs);
}

.guide-ico {
  font-size: 21px;
  flex-shrink: 0;
  margin-top: 1px;
}

.guide-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Cairo', sans-serif;
}

.guide-card-body {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  font-family: 'Tajawal', sans-serif;
  line-height: 1.55;
}

/* ── Stats Bar ───────────────────────────────────────────────── */
.stats {
  display: flex;
  gap: 9px;
  margin-bottom: 13px;
}

.sp {
  flex: 1;
  border-radius: 13px;
  padding: 12px 8px;
  text-align: center;
  transition: transform var(--t-fast);
}
.sp:hover { transform: translateY(-2px); }

.sp.g {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1.5px solid var(--green-border);
}
.sp.y {
  background: linear-gradient(135deg, #fffbeb, #fef9c3);
  border: 1.5px solid var(--yellow-border);
}
.sp.r {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1.5px solid var(--red-border);
}

.sp .sn {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}
.sp.g .sn { color: var(--green); }
.sp.y .sn { color: var(--yellow); }
.sp.r .sn { color: var(--red); }

.sp .sl {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 4px;
  font-family: 'Tajawal', sans-serif;
}

/* ── Near Miss Section ───────────────────────────────────────── */
.nm-section {
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid rgba(245,158,11,.25);
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
  box-shadow: 0 4px 20px rgba(245,158,11,.08);
}

.nm-header {
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(245,158,11,.15);
}

.nm-headline {
  font-size: 15px;
  font-weight: 900;
  color: #92400e;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nm-sub {
  font-size: 12px;
  color: #b45309;
}

.nm-cards {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nm-card {
  background: #fff;
  border: 1px solid rgba(245,158,11,.2);
  border-radius: 12px;
  padding: 13px 14px;
}

.nm-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.nm-college-name {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.nm-gap-badge {
  font-size: 12px;
  font-weight: 700;
  color: #d97706;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.2);
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.nm-uni {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
}

.nm-bar-wrap {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.nm-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  transition: width .8s ease;
}

.nm-bar-label {
  font-size: 10.5px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
}

.nm-more-hint {
  text-align: center;
  font-size: 12px;
  color: #92400e;
  background: #fff7ed;
  border: 1px dashed rgba(245,158,11,.35);
  border-radius: 10px;
  padding: 10px 14px;
}

.nm-footer {
  padding: 10px 18px 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid rgba(245,158,11,.12);
}

.nm-tip {
  font-size: 11.5px;
  color: #92400e;
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.15);
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s;
  font-family: 'Tajawal', sans-serif;
}

.nm-tip:hover {
  background: rgba(245,158,11,.16);
}

.nm-more {
  margin-right: auto;
  font-size: 11px;
  color: #b45309;
  font-weight: 700;
}

/* ── NearMiss Paywall Card ───────────────────────────────────── */
.nm-paywall-card {
  margin-top: 10px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px dashed rgba(245, 158, 11, 0.45);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nm-paywall-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nm-paywall-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}

.nm-paywall-title {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
}

.nm-paywall-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.5;
}

.nm-unlock-btn {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0a1628;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.3px;
}

.nm-unlock-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.55);
}

.nm-unlock-btn:active {
  transform: translateY(0);
}

/* ── Premium Banner ──────────────────────────────────────────── */
/* ── Evening Banner ──────────────────────────────────────────── */
.evening-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #0f2027, #1a3a2a, #0d3b1e);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.evening-banner:hover {
  border-color: rgba(52, 211, 153, 0.6);
  transform: translateY(-1px);
}
.ev-banner-ico { font-size: 26px; flex-shrink: 0; }
.ev-banner-txt { flex: 1; }
.ev-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: #6ee7b7;
}
.ev-banner-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}
.ev-banner-arr {
  font-size: 18px;
  color: #34d399;
  font-weight: 700;
}

/* ── Fee badge ───────────────────────────────────────────────── */
.badge-fee {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

/* ── Report Banner ───────────────────────────────────────────── */
.rpt-banner {
  background: linear-gradient(145deg, #0f2044 0%, #1a3a6e 55%, #1d4ed8 100%);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 28px rgba(15, 32, 68, 0.28);
  position: relative;
  overflow: hidden;
}
.rpt-banner::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(99,179,237,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.rpt-banner-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.rpt-banner-ico { font-size: 28px; flex-shrink: 0; }
.rpt-banner-title {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  line-height: 1.3;
}
.rpt-banner-sub {
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  font-family: 'Tajawal', sans-serif;
  margin-top: 2px;
}

.rpt-feats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 14px;
}
.rpt-feat {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  background: rgba(255,255,255,0.07);
  border-radius: 9px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.08);
}
.rpt-feat-ico { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.rpt-feat-lbl {
  color: rgba(255,255,255,0.9);
  font-size: 11.5px;
  font-family: 'Tajawal', sans-serif;
  line-height: 1.35;
}

.rpt-dl-btn {
  width: 100%;
  padding: 13px 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1a0a00;
  border: none;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(245,158,11,0.4);
  transition: transform var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
}
.rpt-dl-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245,158,11,0.5);
}
.rpt-dl-btn:active:not(:disabled) { transform: scale(0.98); }
.rpt-dl-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.rpt-dl-btn-ico { font-size: 18px; }

@media (max-width: 420px) {
  .rpt-feats { grid-template-columns: 1fr; }
}

/* ── Results Header ──────────────────────────────────────────── */
.res-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.res-ttl {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.res-cnt {
  background: linear-gradient(135deg, var(--blue-50), #e0eaff);
  color: var(--blue-600);
  border: 1px solid var(--blue-100);
  border-radius: 14px;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 700;
}

/* ── PDF Download Button ─────────────────────────────────────── */
.pdf-dl-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 900;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.pdf-dl-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}
.pdf-dl-btn:active { transform: scale(0.97); }

/* ── College Cards ───────────────────────────────────────────── */
.cc {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 15px 13px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.cc:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.cc:active { transform: scale(0.99); }

.cc.safe       { border-color: rgba(134, 239, 172, 0.7); }
.cc.borderline { border-color: rgba(252, 211, 77, 0.7); }
.cc.unlikely   { border-color: rgba(252, 165, 165, 0.7); }

.cc-bar {
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.safe       .cc-bar { background: linear-gradient(180deg, #22c55e, #16a34a); }
.borderline .cc-bar { background: linear-gradient(180deg, #fbbf24, #d97706); }
.unlikely   .cc-bar { background: linear-gradient(180deg, #f87171, #dc2626); }

.cc-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.cc-info { flex: 1; min-width: 0; }

.cc-name {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.cc-uni {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  font-family: 'Tajawal', sans-serif;
}

.cc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  background: var(--blue-50);
  color: var(--blue-600);
  border: 1px solid var(--blue-100);
  border-radius: 7px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge.cat-tqny  { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.badge.cat-mhd   { background: #fdf4ff; color: #7e22ce; border-color: #e9d5ff; }
.badge.cat-msai  { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.badge.gender-female { background: #fdf2f8; color: #9d174d; border-color: #fbcfe8; }
.badge.gender-male   { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.badge.gender-mixed  { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.badge.badge-abna    { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ── Sponsored Card ──────────────────────────────────────────── */
.cc.sponsored-card {
  border-color: rgba(245, 158, 11, 0.5);
  border-width: 2px;
  background: linear-gradient(135deg,
    rgba(255, 253, 240, 0.95) 0%,
    rgba(255, 255, 255, 0.9) 100%);
}
.cc.sponsored-card .cc-bar {
  background: linear-gradient(180deg, #fbbf24, #b45309);
}

.spon-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #fff;
  border-radius: 6px;
  padding: 2px 9px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.spon-note {
  font-size: 11.5px;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 5px 11px;
  margin-top: 8px;
  display: inline-block;
  font-family: 'Tajawal', sans-serif;
}

/* ── Probability Ring ────────────────────────────────────────── */
.prob-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 64px;
  flex-shrink: 0;
}

.prob-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-fast);
}
.cc:hover .prob-ring { transform: scale(1.08); }

.prob-ring.safe {
  background: var(--green-bg);
  border-color: var(--green);
  color: var(--green);
}
.prob-ring.borderline {
  background: var(--yellow-bg);
  border-color: var(--yellow);
  color: var(--yellow);
}
.prob-ring.unlikely {
  background: var(--red-bg);
  border-color: var(--red);
  color: var(--red);
}

.prob-delta {
  font-size: 13px;
  font-weight: 900;
  direction: ltr;
}

.prob-lbl {
  font-size: 9.5px;
  color: var(--muted);
  text-align: center;
  font-family: 'Tajawal', sans-serif;
}

/* ── Card Bottom Bar ─────────────────────────────────────────── */
.cc-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.cc-min {
  font-size: 12.5px;
  color: var(--muted);
  font-family: 'Tajawal', sans-serif;
}
.cc-min span {
  font-weight: 700;
  color: var(--text);
  font-family: 'Cairo', sans-serif;
}

.share-btn {
  border: 1.5px solid var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-500);
  font-size: 16px;
  cursor: pointer;
  padding: 5px 9px;
  border-radius: 8px;
  transition: background var(--t-fast), transform var(--t-fast);
}
.share-btn:hover {
  background: var(--blue-100);
  transform: scale(1.1);
}
.career-link-btn {
  border: 1.5px solid rgba(74,222,128,.3);
  background: rgba(74,222,128,.08);
  color: #4ade80;
  font-size: 16px;
  text-decoration: none;
  padding: 5px 9px;
  border-radius: 8px;
  transition: background .2s, transform .2s;
  display: inline-flex; align-items: center;
}
.career-link-btn:hover {
  background: rgba(74,222,128,.18);
  transform: scale(1.1);
}

/* ── Add to Form Button ──────────────────────────────────────── */
.add-form-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .15s, box-shadow .18s;
  white-space: nowrap;
  border: 1.5px solid rgba(99,102,241,.35);
  background: rgba(99,102,241,.09);
  color: #818cf8;
}
.add-form-btn:hover:not(:disabled) {
  background: rgba(99,102,241,.18);
  border-color: rgba(99,102,241,.6);
  transform: scale(1.04);
  box-shadow: 0 0 10px rgba(99,102,241,.25);
}
.add-form-btn.in-form {
  border-color: rgba(74,222,128,.45);
  background: rgba(74,222,128,.1);
  color: #4ade80;
}
.add-form-btn.in-form:hover {
  background: rgba(248,113,113,.12);
  border-color: rgba(248,113,113,.45);
  color: #f87171;
  box-shadow: 0 0 10px rgba(248,113,113,.2);
}
.add-form-btn:disabled { opacity: .4; cursor: not-allowed; }
.add-form-plus { font-size: 16px; line-height: 1; }
.add-form-check { font-size: 14px; line-height: 1; }
.add-form-txt { font-size: 12px; }

/* Subtle highlight ring when card is already in the form */
.cc.cc-in-form {
  box-shadow: 0 0 0 2px rgba(74,222,128,.28), 0 4px 24px rgba(0,0,0,.2);
}
@media (max-width: 480px) {
  .add-form-txt { display: none; }
  .add-form-btn { padding: 5px 8px; }
}

/* ── Featured Divider ────────────────────────────────────────── */
.featured-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  margin-top: 4px;
}

.featured-hdr-line {
  flex: 1;
  height: 1.5px;
  background: linear-gradient(to left, transparent, #fcd34d);
  border-radius: 2px;
}

.featured-hdr-txt {
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  background: linear-gradient(135deg, var(--gold-light), #fffbeb);
  border: 1px solid #fcd34d;
  border-radius: 20px;
  padding: 4px 14px;
  white-space: nowrap;
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 52px 20px;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty .eico {
  font-size: 56px;
  margin-bottom: 16px;
  display: block;
  animation: emptyFloat 2.8s ease-in-out infinite;
}

@keyframes emptyFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.empty h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--text);
}

.empty p {
  font-size: 13px;
  color: var(--muted);
  font-family: 'Tajawal', sans-serif;
}

/* ── Skeleton Loading ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(226, 232, 240, 0.6) 25%,
    rgba(248, 250, 252, 0.9) 50%,
    rgba(226, 232, 240, 0.6) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 112px;
  border-radius: var(--radius);
  margin-bottom: 10px;
}

/* ── Modal Overlay & Sheet ───────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.65);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  z-index: 900;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: overlayIn 0.2s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sheet {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 22px 22px 0 0;
  width: 100%;
  max-width: 640px;
  padding: 24px 20px 40px;
  animation: sheetUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 93vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(15, 32, 68, 0.22);
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.handle {
  width: 38px;
  height: 4px;
  background: var(--border-solid);
  border-radius: 2px;
  margin: 0 auto 22px;
}

.modal-ico {
  font-size: 44px;
  text-align: center;
  margin-bottom: 10px;
  animation: loaderBounce 2.2s ease-in-out infinite;
}

.modal-ttl {
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 6px;
  color: var(--text);
}

.modal-sub {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 18px;
  font-family: 'Tajawal', sans-serif;
}

.price-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold-light), #fffbeb);
  border: 1.5px solid var(--gold);
  border-radius: 13px;
  padding: 10px 22px;
  font-size: 16px;
  font-weight: 900;
  color: var(--gold-dark);
  margin-bottom: 20px;
  box-shadow: 0 3px 14px rgba(245, 158, 11, 0.2);
}

/* ── Locked Preview ──────────────────────────────────────────── */
.locked-preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.locked-preview-content {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--border-solid);
}

.locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 22, 40, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-radius: var(--radius);
  gap: 7px;
}

.locked-ico { font-size: 30px; }
.locked-txt {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}
.locked-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Tajawal', sans-serif;
  text-align: center;
}

/* ── Payment Tabs ────────────────────────────────────────────── */
.pay-tabs {
  display: flex;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border-solid);
  margin-bottom: 16px;
  background: var(--bg);
}

.pay-tab {
  flex: 1;
  padding: 11px 6px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.pay-tab.active {
  background: var(--blue-900);
  color: #fff;
}
.pay-tab-ico { font-size: 18px; }

/* ── AsiaHawala Panel ────────────────────────────────────────── */
.asia-panel { display: flex; flex-direction: column; gap: 13px; }

.asia-number-box {
  background: linear-gradient(135deg, var(--blue-950), var(--blue-800));
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(15, 32, 68, 0.3);
}

.asia-lbl {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.62);
  font-family: 'Tajawal', sans-serif;
}

.asia-number {
  font-size: 27px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2.5px;
  direction: ltr;
  font-family: 'Cairo', sans-serif;
}

.asia-copy-btn {
  font-size: 11.5px;
  color: var(--gold);
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 20px;
  padding: 4px 15px;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  transition: all var(--t-fast);
}
.asia-copy-btn:hover {
  background: var(--gold);
  color: #78350f;
}

.asia-steps {
  background: linear-gradient(135deg, var(--blue-50), #e0eaff);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.asia-step {
  font-size: 12px;
  color: var(--blue-800);
  padding: 4px 0;
  font-family: 'Tajawal', sans-serif;
  border-bottom: 1px solid rgba(203, 213, 225, 0.4);
}
.asia-step:last-child { border-bottom: none; }

/* ── Transaction Input ───────────────────────────────────────── */
.txn-field { display: flex; flex-direction: column; gap: 6px; }
.txn-lbl { font-size: 12.5px; font-weight: 700; color: var(--text); }

.txn-inp {
  border: 2px solid var(--border-solid);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  direction: ltr;
  text-align: center;
  color: var(--blue-800);
  background: rgba(255, 255, 255, 0.95);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
.txn-inp:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}
.txn-inp::placeholder {
  color: #cbd5e1;
  font-weight: 400;
  font-size: 13px;
  direction: rtl;
}

/* ── WhatsApp Verify Button ──────────────────────────────────── */
.wa-btn {
  width: 100%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 15px;
  font-size: 15px;
  font-weight: 900;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.3);
  transition: opacity var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.wa-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
}
.wa-btn:active { transform: scale(0.98); }
.wa-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Coming-Soon Panels ──────────────────────────────────────── */
.master-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 12px;
}

/* ── ZainCash Panel (real payment UI) ────────────────────────── */
.zain-panel { padding: 6px 2px 2px; }

.zain-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #005c2e, #00a651);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.zain-logo-txt {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

.zain-logo-sub { font-size: 11px; color: rgba(255,255,255,.7); margin-top: 2px; }

.zain-wallet-box {
  background: var(--card-bg, #f8fafc);
  border: 2px solid #00a651;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: center;
}

.zain-wallet-lbl { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.zain-wallet-num {
  font-size: 22px;
  font-weight: 900;
  color: #00a651;
  letter-spacing: 2px;
  direction: ltr;
}

.zain-copy-btn {
  margin-top: 8px;
  background: #00a651;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 18px;
  font-size: 12px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.zain-copy-btn:hover { background: #007a3d; }

.zain-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.zain-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--bg-2, #f1f5f9);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: 'Tajawal', sans-serif;
}

.zain-step-num {
  background: #00a651;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}

/* Pending state */
.zain-pending {
  text-align: center;
  padding: 24px 12px;
}

.zain-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: #00a651;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.zain-pending-ttl {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  font-family: 'Tajawal', sans-serif;
}

.zain-pending-sub {
  font-size: 12px;
  color: var(--muted);
  font-family: 'Tajawal', sans-serif;
  line-height: 1.6;
}

.zain-dots::after {
  content: '';
  animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
  0%   { content: ''; }
  33%  { content: '.'; }
  66%  { content: '..'; }
  100% { content: '...'; }
}

/* Approved state */
.zain-approved {
  text-align: center;
  padding: 24px 12px;
}

.zain-check {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 16px;
  animation: pop .4s cubic-bezier(.175,.885,.32,1.275);
}

@keyframes pop {
  0%   { transform: scale(0); }
  100% { transform: scale(1); }
}

.zain-approved-ttl {
  font-size: 18px;
  font-weight: 900;
  color: #16a34a;
  margin-bottom: 8px;
  font-family: 'Tajawal', sans-serif;
}

.zain-approved-sub {
  font-size: 13px;
  color: var(--muted);
  font-family: 'Tajawal', sans-serif;
}

.zain-start-btn {
  margin-top: 18px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 32px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  width: 100%;
  transition: background .2s;
}

.zain-start-btn:hover { background: #15803d; }

.zain-confirm-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #005c2e, #00a651);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  transition: opacity .2s;
  margin-top: 4px;
}

.zain-confirm-btn:disabled { opacity: .5; cursor: not-allowed; }

.zain-soon-badge,
.master-soon-badge {
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  box-shadow: var(--shadow);
}

.zain-soon-badge   { background: linear-gradient(135deg, #005c2e, #00a651); }
.master-soon-badge { background: linear-gradient(135deg, #12122a, #1a1a3e); }

.soon-tag {
  background: var(--gold);
  color: var(--gold-dark);
  border-radius: 6px;
  padding: 3px 11px;
  font-size: 11px;
  font-weight: 900;
}

.master-soon-txt { font-size: 14px; font-weight: 700; color: #fff; }
.master-soon-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.58);
  font-family: 'Tajawal', sans-serif;
  margin-top: 3px;
}

/* ── Mastercard Circles ──────────────────────────────────────── */
.mc-circles { display: flex; flex-shrink: 0; }
.mc-c1 { width: 26px; height: 26px; border-radius: 50%; background: #eb001b; opacity: 0.9; }
.mc-c2 { width: 26px; height: 26px; border-radius: 50%; background: #f79e1b; opacity: 0.9; margin-right: -12px; }

/* ── Secure Note ─────────────────────────────────────────────── */
.pay-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  font-family: 'Tajawal', sans-serif;
}

/* ── Close Button ────────────────────────────────────────────── */
.close-btn {
  width: 100%;
  background: transparent;
  border: 2px solid var(--border-solid);
  border-radius: var(--radius);
  padding: 13px;
  font-size: 14px;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  color: var(--muted);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.close-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-bg);
}

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  padding: 11px 24px;
  font-size: 13.5px;
  font-family: 'Tajawal', sans-serif;
  z-index: 1000;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), toastOut 0.3s ease 2.5s forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.9); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0)    scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ── Scroll-to-top FAB ───────────────────────────────────────── */
.fab {
  position: fixed;
  /* On mobile: sit above the AdSense anchor ad + iPhone home-bar */
  bottom: calc(var(--floating-ad-safe-bottom) + env(safe-area-inset-bottom, 0px));
  left: 16px;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: transform var(--t-fast), box-shadow var(--t-fast), bottom var(--t);
}
.fab:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 26px rgba(37, 99, 235, 0.52);
}

/* On tablet/desktop: no anchor ad, return to default position */
@media (min-width: 640px) {
  .fab {
    bottom: 24px;
  }
}

/* ── Official Links ──────────────────────────────────────────── */
.off-links-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 52px;
}

.off-links-hdr {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.off-links-ico-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.off-links-title {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.off-links-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.off-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 11px;
}

.off-link-card {
  background: var(--surface);
  border: 1px solid var(--border-solid);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}

.off-link-card:hover {
  border-color: rgba(59,130,246,.4);
  background: rgba(59,130,246,.06);
  transform: translateY(-2px);
}

.off-link-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.off-link-name {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 3px;
}

.off-link-url {
  font-size: 11px;
  color: #3b82f6;
  direction: ltr;
  text-align: left;
  font-family: monospace;
}

/* ── Specialized Institutes Banner ──────────────────────────── */
.spec-inst-section { max-width: 900px; margin: 0 auto; padding: 0 16px 40px; }
.spec-inst-hdr { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.spec-inst-hdr-ico { width: 46px; height: 46px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.spec-inst-hdr-title { font-family: var(--font-head, 'Cairo', sans-serif); font-size: 16px; font-weight: 800; margin-bottom: 3px; }
.spec-inst-hdr-sub { font-size: 12px; color: var(--text-2, #94a3b8); line-height: 1.5; }
.spec-inst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.spec-inst-card { border: 1px solid; border-radius: 14px; padding: 16px; transition: transform .2s, box-shadow .2s; }
.spec-inst-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.spec-inst-card-ico { font-size: 26px; margin-bottom: 8px; line-height: 1; }
.spec-inst-card-title { font-family: var(--font-head, 'Cairo', sans-serif); font-size: 13px; font-weight: 800; margin-bottom: 3px; }
.spec-inst-card-sub { font-size: 10px; color: var(--text-2, #94a3b8); margin-bottom: 7px; font-weight: 600; }
.spec-inst-card-desc { font-size: 11px; color: var(--text-2, #94a3b8); line-height: 1.5; }
.spec-inst-cta { display: block; text-align: center; padding: 13px 20px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; color: var(--text-1, #e2e8f0); text-decoration: none; font-size: 13px; font-weight: 600; transition: background .2s, border-color .2s; }
.spec-inst-cta:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.spec-inst-cta-arrow { display: inline-block; transition: transform .2s; }
.spec-inst-cta:hover .spec-inst-cta-arrow { transform: translateX(-4px); }
@media(max-width:480px) { .spec-inst-grid { grid-template-columns: 1fr 1fr; } }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 32px 16px 90px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  font-family: 'Tajawal', sans-serif;
  border-top: 1px solid var(--border-solid);
  margin-top: 6px;
  background: linear-gradient(to bottom, transparent, rgba(15,23,42,0.6));
}

.footer-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  margin-bottom: 10px;
}

.footer-logo-q {
  font-size: 18px;
  font-weight: 900;
  color: #3b82f6;
  font-family: 'Cairo', sans-serif;
  letter-spacing: -0.5px;
}

.footer-logo-name {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  font-family: 'Cairo', sans-serif;
  letter-spacing: -0.5px;
}

.footer-copy {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.footer-disc {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
  max-width: 480px;
  margin: 0 auto 12px;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  font-family: 'Tajawal', sans-serif;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  transition: color var(--t-fast);
}
.footer-link:hover { color: #3b82f6; }

.footer-dot {
  color: var(--border-solid);
  font-size: 14px;
  line-height: 1;
}

@media (min-width: 640px) {
  .footer { padding-bottom: 50px; }
}

/* ── Responsive — Mobile First ───────────────────────────────── */
@media (max-width: 400px) {
  .filters   { grid-template-columns: 1fr; }
  .bonus-row { flex-direction: column; }
  .hdr h1    { font-size: 18px; }
  .grade-inp { font-size: 22px; padding: 12px; }
  .stats     { gap: 6px; }
  .sp .sn    { font-size: 20px; }
  .cc-name   { font-size: 13.5px; }
  .prob-ring { width: 50px; height: 50px; }
  .prob-delta { font-size: 11.5px; }
  .sheet     { padding: 18px 14px 32px; }
}

@media (max-width: 340px) {
  .hdr-chips  { gap: 6px; }
  .hdr-chip   { padding: 6px 10px; }
  .hdr-chip .n { font-size: 17px; }
}

@media (min-width: 540px) {
  .wrap { padding: 18px 18px 44px; }
  .cc:hover { transform: translateY(-4px); }
  .stats { gap: 12px; }
  .sp    { padding: 14px 10px; }
  .sp .sn { font-size: 28px; }
}

@media (min-width: 640px) {
  .hdr { padding: 36px 24px 46px; }
  .wrap { padding: 20px 20px 50px; }
  .guide-cards { flex-direction: row; }
  .guide-card  { flex: 1; flex-direction: column; text-align: center; }
  .guide-card:hover { transform: translateY(-3px); }
}

/* ══════════════════════════════════════════════════════════════
   Application Form Section
   ══════════════════════════════════════════════════════════════ */
.afs-section {
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px;
  margin-bottom: 14px;
}

/* Header */
.afs-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 8px;
}
.afs-hdr-left { flex: 1; }
.afs-title {
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-700);
}
.afs-subtitle {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  font-family: 'Tajawal', sans-serif;
}
.afs-progress-pill {
  background: var(--blue-50);
  border: 1.5px solid var(--blue-100);
  border-radius: 20px;
  padding: 4px 14px;
  flex-shrink: 0;
  transition: background var(--t), border-color var(--t);
}
.afs-progress-pill.full {
  background: var(--green-bg);
  border-color: var(--green-border);
}
.afs-count {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-600);
}
.afs-progress-pill.full .afs-count { color: var(--green); }

/* Warning */
.afs-warn {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--red);
  margin-bottom: 10px;
  line-height: 1.5;
  font-family: 'Tajawal', sans-serif;
}

/* Stats row */
.afs-stats-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.afs-stat {
  font-size: 11.5px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 10px;
  font-family: 'Tajawal', sans-serif;
  transition: color var(--t), border-color var(--t);
}
.afs-stat.ok {
  color: var(--green);
  border-color: var(--green-border);
  background: var(--green-bg);
}
.afs-clear-btn {
  background: none;
  border: 1px solid var(--red-border);
  color: var(--red);
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 11.5px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  margin-right: auto;
  transition: background var(--t);
}
.afs-clear-btn:hover { background: var(--red-bg); }

/* Slots list */
.afs-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 480px;
  overflow-y: auto;
  padding-left: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--blue-100) transparent;
}
.afs-list::-webkit-scrollbar { width: 5px; }
.afs-list::-webkit-scrollbar-thumb { background: var(--blue-100); border-radius: 4px; }

/* Individual slot */
.afs-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 6px 8px;
  border: 1.5px solid transparent;
  transition: background var(--t-fast), border-color var(--t-fast);
  min-height: 44px;
}
.afs-slot.empty {
  background: rgba(241, 245, 249, 0.7);
  border-color: var(--border);
}
.afs-slot.empty:hover { background: var(--blue-50); border-color: var(--blue-100); }
.afs-slot.filled      { background: #fff; border-color: var(--blue-100); }
.afs-slot.filled.safe       { border-color: #86efac; background: #f0fdf4; }
.afs-slot.filled.borderline { border-color: #fcd34d; background: #fefce8; }
.afs-slot.filled.unlikely   { border-color: #fca5a5; background: #fef2f2; }

/* Slot number badge */
.afs-slot-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--blue-700);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Cairo', sans-serif;
}
.afs-slot.empty .afs-slot-num {
  background: #e2e8f0;
  color: var(--muted);
}

/* Slot content */
.afs-slot-info {
  flex: 1;
  cursor: pointer;
  min-width: 0;
}
.afs-slot-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  font-family: 'Cairo', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.afs-slot-sub {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 1px;
  font-family: 'Tajawal', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.afs-add-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  text-align: right;
  padding: 4px 0;
  font-family: 'Tajawal', sans-serif;
  transition: color var(--t-fast);
}
.afs-slot.empty:hover .afs-add-btn { color: var(--blue-600); }

/* Slot action buttons */
.afs-slot-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.afs-mv-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
}
.afs-mv-btn:hover { background: var(--blue-50); color: var(--blue-600); }
.afs-rm-btn {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
}
.afs-rm-btn:hover { background: #fee2e2; }

/* Action buttons bar */
.afs-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.afs-autosave {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  color: var(--green);
  background: var(--green-bg);
  border: 1.5px solid var(--green-border);
  border-radius: 10px;
  font-family: 'Tajawal', sans-serif;
  white-space: nowrap;
}
.afs-pdf-btn {
  flex: 1;
  background: var(--blue-700);
  border: none;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.afs-pdf-btn:hover  { opacity: 0.88; transform: translateY(-1px); }
.afs-pdf-btn:active { transform: scale(0.98); }
.afs-pdf-btn.locked {
  background: var(--muted);
}

/* ══════════════════════════════════════════════════════════════
   College Search Modal
   ══════════════════════════════════════════════════════════════ */
.sm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 950;
  display: flex;
  align-items: flex-end;
}
.sm-sheet {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.22s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.sm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sm-title {
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-700);
}
.sm-close {
  background: var(--bg);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
}
.sm-close:hover { background: var(--border); }
.sm-search-wrap {
  padding: 10px 14px 6px;
  flex-shrink: 0;
}
.sm-input {
  width: 100%;
  border: 1.5px solid var(--blue-100);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'Tajawal', sans-serif;
  outline: none;
  direction: rtl;
  background: var(--blue-50);
  transition: border-color var(--t-fast);
}
.sm-input:focus { border-color: var(--blue-400); background: #fff; }
.sm-count {
  padding: 0 16px 6px;
  font-size: 11.5px;
  color: var(--muted);
  font-family: 'Tajawal', sans-serif;
  flex-shrink: 0;
}
.sm-list {
  overflow-y: auto;
  flex: 1;
  padding: 0 8px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--blue-100) transparent;
}
.sm-list::-webkit-scrollbar { width: 5px; }
.sm-list::-webkit-scrollbar-thumb { background: var(--blue-100); border-radius: 4px; }
.sm-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 40px 20px;
  font-family: 'Tajawal', sans-serif;
}
.sm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  border-radius: 8px;
  transition: background var(--t-fast);
}
.sm-item:hover { background: var(--blue-50); }
.sm-item:last-child { border-bottom: none; }
.sm-item-main { flex: 1; min-width: 0; }
.sm-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-family: 'Cairo', sans-serif;
}
.sm-item-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-family: 'Tajawal', sans-serif;
}
.sm-status-badge {
  font-size: 10.5px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}
.srb-safe     { background: #f0fdf4; color: #16a34a; }
.srb-border   { background: #fefce8; color: #d97706; }
.srb-unlikely { background: #fef2f2; color: #dc2626; }
.srb-far      { background: #fff1f2; color: #9f1239; border: 1px solid #fda4af; }

/* ── sm-item hover when far/high-risk ── */
.sm-item-far { opacity: 0.82; }
.sm-item-far:hover { opacity: 1; background: #fff1f2; }

/* ── High-risk slot border override ── */
.afs-slot.high-risk {
  border-color: #fda4af !important;
  background: #fff1f2 !important;
}

/* ── High-risk warning variant ── */
.afs-warn-risk {
  background: #fff1f2;
  border-color: #fda4af;
  color: #9f1239;
}

/* ── High-risk stat badge ── */
.afs-stat.risk {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fef2f2;
}

/* ── Inline risk badge inside slot name ── */
.afs-risk-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  color: #9f1239;
  background: #ffe4e6;
  border: 1px solid #fda4af;
  border-radius: 5px;
  padding: 1px 5px;
  margin-right: 6px;
  vertical-align: middle;
  font-family: 'Tajawal', sans-serif;
}

/* ── Drag handle ── */
.afs-drag-handle {
  color: #cbd5e1;
  font-size: 14px;
  cursor: grab;
  flex-shrink: 0;
  user-select: none;
  padding: 0 2px;
  line-height: 1;
  transition: color var(--t-fast);
}
.afs-slot:hover .afs-drag-handle { color: var(--blue-300); }
.afs-drag-handle:active { cursor: grabbing; }

/* ── Drag-over drop zone highlight ── */
.afs-slot.drag-over {
  border-color: var(--blue-400) !important;
  background: rgba(59, 130, 246, 0.07) !important;
  transform: scale(1.01);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* ── Slot being dragged (ghost source) ── */
.afs-slot.dragging {
  opacity: 0.45;
}

/* ══════════════════════════════════════════════════════════════
   Skeleton Loader
   ══════════════════════════════════════════════════════════════ */
@keyframes sk-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.sk-line {
  background: linear-gradient(90deg, var(--surface-2) 25%, rgba(255,255,255,.06) 50%, var(--surface-2) 75%);
  background-size: 800px 100%;
  animation: sk-shimmer 1.4s infinite linear;
  border-radius: 6px;
  height: 14px;
  margin-bottom: 10px;
}

.sk-card { pointer-events: none; min-height: 110px; }
.sk-title  { width: 65%; height: 16px; }
.sk-sub    { width: 85%; }
.sk-short  { width: 45%; }
.sk-badge  { width: 72px; height: 22px; border-radius: 20px; margin-bottom: 0; }

/* ── Load More button ── */
.load-more-btn {
  display: block;
  width: 100%;
  margin: 16px 0 8px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-2);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.load-more-btn:hover {
  background: var(--blue-800);
  color: #fff;
  border-color: var(--blue-600);
}

/* ══════════════════════════════════════════════════════════════
   Parallel Education Section
   ══════════════════════════════════════════════════════════════ */
.par-section {
  max-width: 700px;
  margin: 0 auto 16px;
  padding: 0 12px;
}

.par-header {
  background: linear-gradient(135deg, #0c2a6e 0%, #1a4fad 60%, #1d6fdb 100%);
  border-radius: 18px 18px 0 0;
  padding: 22px 22px 18px;
  position: relative;
  overflow: hidden;
}
.par-header::before {
  content: '';
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  top: -60px; left: -50px;
}

.par-badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  padding: 3px 12px;
  margin-bottom: 8px;
}

.par-title {
  font-family: 'Cairo', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 4px;
}

.par-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,.72);
  font-family: 'Tajawal', sans-serif;
}

/* Tabs */
.par-tabs {
  display: flex;
  background: #dbeafe;
  border-right: 2px solid #bfdbfe;
  border-left: 2px solid #bfdbfe;
}

.par-tab {
  flex: 1;
  padding: 11px 6px;
  border: none;
  background: none;
  font-family: 'Cairo', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e40af;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: background .15s, border-color .15s;
}

.par-tab:hover { background: #bfdbfe44; }

.par-tab-active {
  background: #fff;
  border-bottom-color: #2563eb;
  color: #1d4ed8;
}

/* Panel */
.par-panel {
  background: #fff;
  border: 2px solid #bfdbfe;
  border-top: none;
  border-radius: 0 0 18px 18px;
  padding: 18px 18px 20px;
}

.par-panel-note {
  font-size: 13px;
  color: #475569;
  margin-bottom: 14px;
  font-family: 'Tajawal', sans-serif;
  line-height: 1.6;
}

/* Grades list */
.par-grade-list { display: flex; flex-direction: column; gap: 8px; }

.par-grade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f0f7ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 11px 14px;
}

.par-grade-college {
  font-size: 13px;
  font-family: 'Tajawal', sans-serif;
  color: #1e293b;
  flex: 1;
}

.par-grade-diff {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 8px;
  padding: 3px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Fees list */
.par-fee-list { display: flex; flex-direction: column; gap: 8px; }

.par-fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed #e2e8f0;
  padding: 10px 4px;
}
.par-fee-row:last-child { border-bottom: none; }

.par-fee-college {
  font-size: 13.5px;
  font-family: 'Tajawal', sans-serif;
  color: #1e293b;
}

.par-fee-amount {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #15803d;
  direction: ltr;
  white-space: nowrap;
}

/* Rules grid */
.par-rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.par-rule-card {
  background: #f0f7ff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 13px 13px;
}

.par-rule-ico  { font-size: 22px; margin-bottom: 6px; }
.par-rule-title {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 4px;
}
.par-rule-body {
  font-size: 12px;
  color: #475569;
  font-family: 'Tajawal', sans-serif;
  line-height: 1.55;
}

@media (max-width: 480px) {
  .par-rules-grid { grid-template-columns: 1fr; }
  .par-tab { font-size: 11.5px; padding: 10px 4px; }
  .par-grade-college { font-size: 12px; }
}

/* ══════════════════════════════════════════════════════════════
   FAQ Accordion
   ══════════════════════════════════════════════════════════════ */
.faq-section {
  max-width: 700px;
  margin: 0 auto 8px;
  padding: 0 12px 24px;
}

.faq-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cairo', sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.faq-title-ico { font-size: 22px; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}

.faq-item.faq-open {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(59,130,246,.1);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: right;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  transition: background .15s;
}

.faq-q:hover { background: rgba(59,130,246,.04); }

.faq-q-txt { flex: 1; }

.faq-chevron {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  transition: background .2s, color .2s;
}

.faq-open .faq-chevron {
  background: var(--accent);
  color: #fff;
}

.faq-a {
  padding: 0 18px 16px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  font-family: 'Tajawal', sans-serif;
}

@media (max-width: 480px) {
  .faq-q { font-size: 13px; padding: 14px 14px; }
  .faq-a  { font-size: 13px; padding: 12px 14px 14px; }
  .faq-title { font-size: 16px; }
}

/* ═══════════════════════════════════════════════════════════════
   Design & Performance Enhancements
   ═══════════════════════════════════════════════════════════════ */

/* ── New keyframes ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: scale(1);   }
}

@keyframes gradientSlide {
  0%   { background-position: 0% 50%;   }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%;   }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0);    }
}

@keyframes safePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,.35); }
  60%       { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
}

/* ── Page entrance ───────────────────────────────────────────── */
.main-content {
  animation: fadeInUp .45s ease both;
}

/* ── Topbar link active state ────────────────────────────────── */

/* ── Grade input — glowing focus ring ───────────────────────── */
.grade-inp:focus {
  box-shadow: 0 0 0 3px rgba(59,130,246,.25), 0 2px 8px rgba(59,130,246,.15);
  border-color: var(--blue-400) !important;
  transform: translateY(-1px);
}

/* ── College cards — staggered entrance ──────────────────────── */
.cc {
  animation: fadeInUp .35s ease both;
}
.cc:nth-child(1)  { animation-delay: .04s; }
.cc:nth-child(2)  { animation-delay: .08s; }
.cc:nth-child(3)  { animation-delay: .12s; }
.cc:nth-child(4)  { animation-delay: .16s; }
.cc:nth-child(5)  { animation-delay: .20s; }
.cc:nth-child(6)  { animation-delay: .24s; }
.cc:nth-child(7)  { animation-delay: .28s; }
.cc:nth-child(8)  { animation-delay: .32s; }
.cc:nth-child(n+9){ animation-delay: .35s; }

/* ── College card hover glow by status ───────────────────────── */
.cc.safe:hover {
  box-shadow: 0 4px 24px rgba(22,163,74,.18), 0 1px 4px rgba(0,0,0,.08);
  border-color: rgba(22,163,74,.4);
}
.cc.borderline:hover {
  box-shadow: 0 4px 24px rgba(217,119,6,.18), 0 1px 4px rgba(0,0,0,.08);
  border-color: rgba(217,119,6,.4);
}
.cc.unlikely:hover {
  box-shadow: 0 4px 24px rgba(220,38,38,.14), 0 1px 4px rgba(0,0,0,.08);
  border-color: rgba(220,38,38,.3);
}

/* ── Prob-ring pulse for safe colleges ───────────────────────── */
.cc.safe .prob-ring {
  animation: safePulse 2.4s ease-in-out infinite;
}

/* ── Evening banner — animated gradient ─────────────────────── */
.evening-banner {
  background-size: 200% 200%;
  animation: gradientSlide 6s ease infinite;
}

/* ── Report banner — animated gradient ───────────────────────── */
.rpt-banner {
  background-size: 200% 200%;
  animation: gradientSlide 10s ease infinite;
}

/* ── Bon btn — subtle lift on hover ──────────────────────────── */
.bon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(59,130,246,.3);
}
.bon-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ── Stat chips entrance ─────────────────────────────────────── */
.sp {
  animation: fadeInScale .4s ease both;
}
.sp:nth-child(1) { animation-delay: .1s; }
.sp:nth-child(2) { animation-delay: .18s; }
.sp:nth-child(3) { animation-delay: .26s; }

/* ── Guide cards stagger ─────────────────────────────────────── */
.guide-card {
  transition: transform .22s ease, box-shadow .22s ease;
}
.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(59,130,246,.14);
}

/* ── FAQ item entrance ───────────────────────────────────────── */
.faq-item {
  animation: slideInRight .38s ease both;
}
.faq-item:nth-child(1)  { animation-delay: .05s; }
.faq-item:nth-child(2)  { animation-delay: .10s; }
.faq-item:nth-child(3)  { animation-delay: .15s; }
.faq-item:nth-child(4)  { animation-delay: .20s; }
.faq-item:nth-child(5)  { animation-delay: .25s; }
.faq-item:nth-child(n+6){ animation-delay: .28s; }

/* ── Scrollbar styling ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(59,130,246,.35);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(59,130,246,.6);
}

/* ── Respect reduced-motion preference ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
