/* ================================================================
   IRIS GATE — Premium Design System v2.0
   Mission Control · Iris Tutoring Centre GATE Prep Platform
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;0,900;1,700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

/* ── Design Tokens ──────────────────────────────────────────── */
:root {

  /* Page backgrounds */
  --bg-page:   #F6F6F1;
  --bg-card:   #FFFFFF;
  --bg-soft:   #EEF4EF;

  /* Brand green scale */
  --brand-950: #082B1E;
  --brand-900: #0C3A28;
  --brand-800: #145136;
  --brand-700: #1E6A46;
  --brand-600: #2E8A5E;
  --brand-500: #38A66F;

  /* Hero gradient */
  --hero-from:  #0A3726;
  --hero-mid:   #145636;
  --hero-to:    #246C46;
  --hero-grad:  linear-gradient(135deg, #0A3726 0%, #145636 52%, #246C46 100%);

  /* Gold accents */
  --gold:         #E9B63F;
  --gold-dk:      #C99622;
  --gold-lgt:     #F7E09A;
  --gold-soft:    #FDF6E3;
  --gold-border:  #F0D480;

  /* Text */
  --text-900: #142132;
  --text-700: #374151;
  --text-500: #667085;
  --text-300: #9CA3AF;
  --text-inv: #F8FAF7;

  /* Borders */
  --border:      #E5E7EB;
  --border-soft: #D8E1DA;

  /* Semantic */
  --success:        #249B5A;
  --success-soft:   #ECFDF5;
  --success-border: #A7F3D0;
  --warning:        #F59E0B;
  --warning-soft:   #FFFBEB;
  --warning-border: #FDE68A;
  --danger:         #EF4444;
  --danger-soft:    #FEF2F2;
  --danger-border:  #FCA5A5;
  --info:           #3B82F6;
  --info-soft:      #EFF6FF;
  --info-border:    #BFDBFE;
  --purple:         #7C6CFF;
  --purple-soft:    #F0EEFF;
  --purple-border:  #C4BBFF;

  /* Subject accent system */
  --reading:         #3B82F6;
  --reading-soft:    #EFF6FF;
  --reading-border:  #BFDBFE;
  --numerical:       #249B5A;
  --numerical-soft:  #ECFDF5;
  --numerical-border:#A7F3D0;
  --abstract:        #E9B63F;
  --abstract-soft:   #FDF6E3;
  --abstract-border: #F0D480;
  --writing:         #7C6CFF;
  --writing-soft:    #F0EEFF;
  --writing-border:  #C4BBFF;

  /* Spacing scale */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Radius */
  --r-sm:   10px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(20,33,50,.05), 0 4px 12px rgba(20,33,50,.04);
  --shadow-md:   0 4px 16px rgba(20,33,50,.07), 0 12px 32px rgba(20,33,50,.05);
  --shadow-lg:   0 8px 32px rgba(20,33,50,.10), 0 20px 48px rgba(20,33,50,.07);
  --shadow-hero: 0 6px 40px rgba(10,55,38,.30);
  --shadow-gold: 0 4px 20px rgba(233,182,63,.25);

  /* Typography */
  --font-disp: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Transitions */
  --t-fast: all 150ms ease;
  --t-base: all 180ms ease;
  --t-slow: all 300ms ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-900);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── Layout ─────────────────────────────────────────────────── */
.wrap {
  max-width: 1300px;
  margin: 0 auto;
  padding: 32px 40px 80px;
}

/* ── TOP NAV ─────────────────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 300;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(20,33,50,.06);
  display: flex; align-items: center;
  padding: 0 40px;
  height: 70px;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  margin-right: 44px; flex-shrink: 0;
  text-decoration: none;
}
.nav-logo img {
  width: 42px; height: 42px; border-radius: 11px;
  object-fit: contain;
  /* White card look — makes logo pop */
  background: white;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 8px rgba(20,82,54,.1);
  padding: 3px;
}
/* Works with or without .nav-logo-text class */
.nav-logo-text strong,
.nav-logo > div strong {
  display: block; font-size: .97rem; font-weight: 800;
  color: var(--brand-900); line-height: 1.2; letter-spacing: -.01em;
}
.nav-logo-text span,
.nav-logo > div span {
  display: block; font-size: .6rem; font-weight: 700;
  color: var(--text-300); text-transform: uppercase; letter-spacing: .16em;
  margin-top: 1px;
}
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-link {
  padding: 7px 14px; border-radius: 9px;
  font-size: .85rem; font-weight: 600;
  color: var(--text-500); transition: var(--t-fast); white-space: nowrap;
}
.nav-link:hover { color: var(--brand-800); background: var(--bg-soft); }
.nav-link.active { color: var(--brand-800); background: var(--bg-soft); font-weight: 800; }
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-pill {
  padding: 4px 12px; border-radius: var(--r-full);
  font-size: .69rem; font-weight: 800; letter-spacing: .05em;
  background: var(--gold-soft); color: var(--gold-dk);
  border: 1px solid var(--gold-border);
}
.nav-pill.premium {
  background: linear-gradient(135deg, var(--gold-dk), var(--gold));
  color: white; border: none;
}
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-800); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800;
  border: 2px solid var(--border);
}
.nav-signout {
  font-size: .78rem; color: var(--text-500); font-weight: 600;
  padding: 6px 10px; border-radius: 7px; transition: var(--t-fast);
}
.nav-signout:hover { color: var(--brand-800); background: var(--bg-soft); }

/* ── HERO BANNER ─────────────────────────────────────────────── */
.hero-banner {
  background: var(--hero-grad);
  border-radius: var(--r-xl);
  padding: 44px 52px;
  margin-bottom: 28px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-hero);
}
.hero-banner::before {
  content: ''; position: absolute;
  top: -100px; right: 180px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(233,182,63,.11) 0%, transparent 65%);
  pointer-events: none;
}
.hero-banner::after {
  content: ''; position: absolute;
  bottom: -70px; left: 52%;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(110,231,183,.09) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr auto;
  gap: 40px; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .71rem; font-weight: 700;
  color: rgba(255,255,255,.48); text-transform: uppercase; letter-spacing: .16em;
  margin-bottom: 12px;
}
.hero-eyebrow::before {
  content: ''; width: 20px; height: 2px;
  background: var(--gold); border-radius: 2px; flex-shrink: 0;
}
.hero-title {
  font-family: var(--font-disp);
  font-size: 2.6rem; font-weight: 800;
  color: white; line-height: 1.2; margin-bottom: 14px;
}
.hero-title em { font-style: normal; color: var(--gold); }
.hero-sub {
  font-size: .89rem; color: rgba(255,255,255,.68);
  max-width: 480px; line-height: 1.72; margin-bottom: 26px;
}
.hero-focus-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px; padding: 7px 14px;
  font-size: .81rem; color: rgba(255,255,255,.82);
  margin-bottom: 24px;
}
.hfp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-meta { display: flex; flex-direction: column; gap: 9px; min-width: 160px; }
.hm-item {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px; padding: 9px 14px;
}
.hm-lbl { font-size: .69rem; color: rgba(255,255,255,.48); font-weight: 600; }
.hm-val { font-size: .88rem; font-weight: 900; color: white; }
.hm-val.gold { color: var(--gold); }

/* ── READINESS RING ──────────────────────────────────────────── */
.readiness-ring { position: relative; flex-shrink: 0; }
.readiness-ring svg { transform: rotate(-90deg); display: block; }
.rr-bg   { fill: none; stroke: rgba(255,255,255,.1); }
.rr-fill { fill: none; stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 1.3s cubic-bezier(.4,0,.2,1); }
.rr-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.rr-pct   { font-size: 2.2rem; font-weight: 900; color: white; line-height: 1; }
.rr-label { font-size: .61rem; color: rgba(255,255,255,.48); text-transform: uppercase; letter-spacing: .1em; margin-top: 2px; }
.rr-trend { font-size: .69rem; color: var(--gold); font-weight: 700; margin-top: 4px; display: flex; align-items: center; gap: 4px; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 11px;
  font-weight: 800; font-size: .88rem;
  border: none; cursor: pointer; font-family: inherit;
  text-decoration: none; transition: var(--t-base); white-space: nowrap;
}
.btn-gold   { background: var(--gold); color: #0f2c1e; box-shadow: var(--shadow-gold); }
.btn-gold:hover { background: var(--gold-dk); transform: translateY(-1px); }
.btn-green  { background: var(--brand-700); color: white; }
.btn-green:hover { background: var(--brand-600); transform: translateY(-1px); }
.btn-ghost  { background: rgba(255,255,255,.1); color: white; border: 1px solid rgba(255,255,255,.2); }
.btn-ghost:hover { background: rgba(255,255,255,.17); }
.btn-outline { background: transparent; color: var(--brand-800); border: 2px solid var(--brand-800); }
.btn-outline:hover { background: var(--bg-soft); }
.btn-primary { background: var(--brand-800); color: white; }
.btn-primary:hover { background: var(--brand-700); transform: translateY(-1px); }
.btn-purple  { background: var(--purple); color: white; }
.btn-purple:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-sm   { padding: 8px 16px; font-size: .82rem; border-radius: 9px; }
.btn-lg   { padding: 14px 28px; font-size: .94rem; border-radius: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-header {
  padding: 16px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  justify-content: space-between;
}
.card-header-left { display: flex; align-items: center; gap: 10px; }
.card-header h3 { font-size: .94rem; font-weight: 800; color: var(--text-900); }
.card-body { padding: 20px 22px; }
.ch-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── STAT CARDS ──────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.stat-val { font-size: 2rem; font-weight: 900; color: var(--text-900); line-height: 1; }
.stat-lbl {
  font-size: .7rem; font-weight: 700;
  color: var(--text-300); text-transform: uppercase; letter-spacing: .07em;
  margin-top: 3px;
}
.stat-sub { font-size: .74rem; color: var(--text-500); margin-top: 3px; }
.stat-sub.ok     { color: var(--success); font-weight: 700; }
.stat-sub.warn   { color: var(--warning); font-weight: 700; }
.stat-sub.danger { color: var(--danger);  font-weight: 700; }

/* ── TAGS & BADGES ───────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: .69rem; font-weight: 700; letter-spacing: .03em;
}
.tag-green  { background: var(--success-soft);  color: var(--success); }
.tag-gold   { background: var(--gold-soft);     color: var(--gold-dk); }
.tag-warn   { background: var(--warning-soft);  color: #92400E; }
.tag-danger { background: var(--danger-soft);   color: var(--danger); }
.tag-blue   { background: var(--info-soft);     color: var(--info); }
.tag-purple { background: var(--purple-soft);   color: var(--purple); }
.tag-brand  { background: var(--bg-soft);       color: var(--brand-800); }

.premium-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--r-full);
  background: var(--gold-soft); color: var(--gold-dk);
  border: 1px solid var(--gold-border);
  font-size: .69rem; font-weight: 800; letter-spacing: .05em;
}

/* ── PROGRESS ────────────────────────────────────────────────── */
.progress-bar {
  height: 7px; background: var(--border);
  border-radius: var(--r-full); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: var(--r-full);
  transition: width 1s ease;
}

/* ── INSIGHT / RECOMMENDATION PANELS ─────────────────────────── */
.insight-panel {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.insight-icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.insight-title { font-size: .84rem; font-weight: 800; color: var(--text-900); margin-bottom: 4px; }
.insight-body  { font-size: .78rem; color: var(--text-500); line-height: 1.6; }
.insight-body strong { color: var(--text-900); }

.rec-strip {
  background: linear-gradient(135deg, #F3F1FF, #FAFAFF);
  border: 1px solid #D4CCFF;
  border-radius: var(--r-lg);
  padding: 20px 24px;
}
.rec-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--purple); color: white;
  font-size: .67rem; font-weight: 800;
  padding: 3px 10px; border-radius: 6px; margin-bottom: 10px;
}

/* ── LOCK OVERLAY ────────────────────────────────────────────── */
.lock-msg {
  display: flex; align-items: center; gap: 8px;
  background: var(--gold-soft); color: var(--gold-dk);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-sm); padding: 10px 14px;
  font-size: .81rem; font-weight: 600; margin-top: 10px;
}

/* ── SECTION HEADING ─────────────────────────────────────────── */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-head h2 { font-size: 1.05rem; font-weight: 800; color: var(--text-900); }
.see-all { font-size: .78rem; font-weight: 700; color: var(--brand-700); }
.see-all:hover { text-decoration: underline; }

/* ── PAGE HEADER ─────────────────────────────────────────────── */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.7rem; font-weight: 900; color: var(--text-900); margin-bottom: 4px; }
.page-header p  { font-size: .9rem; color: var(--text-500); }

/* ── MINI RING (subject mastery) ─────────────────────────────── */
.mini-ring { position: relative; }
.mini-ring svg { transform: rotate(-90deg); display: block; }
.mr-bg   { fill: none; stroke: var(--border); }
.mr-fill { fill: none; stroke-linecap: round; transition: stroke-dashoffset 1.2s ease; }
.mr-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.mr-pct { font-size: 1.05rem; font-weight: 900; color: var(--text-900); line-height: 1; }
.mr-lbl { font-size: .58rem; color: var(--text-300); text-transform: uppercase; letter-spacing: .05em; }

/* ── EMPTY STATES ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-500); }
.empty-state h3 { font-size: 1rem; font-weight: 700; color: var(--text-900); margin-bottom: 6px; }
.empty-state p  { font-size: .86rem; }

/* ── GRID HELPERS ────────────────────────────────────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr;        gap: 18px; }
.col-2  { display: grid; grid-template-columns: 1fr 340px;      gap: 20px; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1100px) { .col-2 { grid-template-columns: 1fr; } }
@media (max-width: 960px)  {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .hero-banner { padding: 32px 32px; }
  .hero-title  { font-size: 2rem; }
  .topnav { padding: 0 24px; }
}
@media (max-width: 640px)  {
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-banner { padding: 24px 22px; }
  .hero-title  { font-size: 1.65rem; }
  .topnav { padding: 0 16px; }
  .wrap   { padding: 16px 16px 48px; }
}
