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

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Luxury palette */
  --navy:          #0A0F1E;
  --navy-mid:      #111827;
  --navy-light:    #1A2236;
  --navy-border:   #1E2D45;
  --gold:          #C9A84C;
  --gold-light:    #E8C96A;
  --gold-dim:      rgba(201,168,76,.15);
  --gold-glow:     rgba(201,168,76,.08);

  --primary:       #C9A84C;
  --primary-dark:  #A8893A;
  --primary-light: rgba(201,168,76,.12);

  --white:         #FFFFFF;
  --off-white:     #F8F6F0;
  --text:          #F1EDE4;
  --text-muted:    #8A9BB5;
  --text-light:    #4A5C75;

  --success:       #2ECC71;
  --danger:        #E74C3C;
  --warning:       #F39C12;

  --bg:            #0D1117;
  --card:          #111827;
  --card-hover:    #151F2E;
  --border:        #1E2D45;
  --border-light:  #253347;

  --nsc-color:     #9B59B6;
  --csec-color:    #C9A84C;
  --cape-color:    #2ECC71;

  --radius:        16px;
  --radius-sm:     10px;
  --radius-xs:     6px;

  --shadow:        0 2px 8px rgba(0,0,0,.4);
  --shadow-md:     0 8px 24px rgba(0,0,0,.5);
  --shadow-lg:     0 20px 60px rgba(0,0,0,.6);
  --shadow-gold:   0 4px 24px rgba(201,168,76,.2);

  --font-body:    'Inter', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

/* Light mode override */
[data-theme="light"] {
  --navy:         #FFFFFF;
  --navy-mid:     #F8F6F0;
  --navy-light:   #F0EDE6;
  --navy-border:  #E8E0D4;
  --bg:           #FAF8F5;
  --card:         #FFFFFF;
  --card-hover:   #F8F6F0;
  --border:       #E5DDD0;
  --border-light: #EDE5D8;
  --text:         #1A1208;
  --text-muted:   #6B5B45;
  --text-light:   #9C8B73;
  --primary-light: rgba(201,168,76,.1);
  --gold-dim:     rgba(201,168,76,.1);
  --gold-glow:    rgba(201,168,76,.05);
  --shadow:       0 2px 8px rgba(0,0,0,.08);
  --shadow-md:    0 8px 24px rgba(0,0,0,.1);
  --shadow-lg:    0 20px 60px rgba(0,0,0,.12);
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2 { font-family: var(--font-display); }
h1 { font-size: 2.2rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; font-family: var(--font-body); }
p  { line-height: 1.7; color: var(--text-muted); font-size: .95rem; }
a  { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-light); }

.gradient-text {
  background: linear-gradient(135deg, var(--gold), var(--gold-light), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.display-font { font-family: var(--font-display); }

/* ── Gold divider ── */
.gold-line {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px; margin: 12px auto 0;
}

/* ── Navbar ── */
.navbar {
  background: rgba(10,15,30,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 66px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
[data-theme="light"] .navbar { background: rgba(255,255,255,.95); }

.nav-brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 600;
  color: var(--text); text-decoration: none;
  letter-spacing: .01em;
}
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; box-shadow: var(--shadow-gold);
}
.brand-accent { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  color: var(--text-muted); font-size: .875rem; font-weight: 500;
  padding: 7px 14px; border-radius: var(--radius-xs);
  transition: all .2s; letter-spacing: .01em;
}
.nav-link:hover { color: var(--text); background: var(--gold-glow); text-decoration: none; }
.nav-user { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.user-name { font-weight: 600; font-size: .875rem; color: var(--text); }
.theme-toggle {
  background: var(--gold-glow); border: 1px solid var(--border);
  border-radius: 50%; width: 36px; height: 36px;
  cursor: pointer; font-size: 15px; transition: all .2s;
}
.theme-toggle:hover { border-color: var(--gold); background: var(--gold-dim); }

/* ── Badges ── */
.badge-premium {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy); font-size: .68rem; font-weight: 700;
  padding: 3px 10px; border-radius: 99px; letter-spacing: .04em; text-transform: uppercase;
}
.badge-free {
  background: var(--border); color: var(--text-muted);
  font-size: .68rem; font-weight: 700; padding: 3px 10px;
  border-radius: 99px; letter-spacing: .04em; text-transform: uppercase;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: .875rem;
  padding: 10px 22px; border-radius: var(--radius-sm); border: none;
  cursor: pointer; transition: all .2s; text-decoration: none;
  white-space: nowrap; letter-spacing: .01em;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy); box-shadow: 0 4px 16px rgba(201,168,76,.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 6px 20px rgba(201,168,76,.45); color: var(--navy);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold-dim); color: var(--gold-light); }
.btn-ghost {
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #C0392B; color: #fff; }
.btn-lg  { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm  { padding: 6px 16px; font-size: .8rem; border-radius: var(--radius-xs); }
.btn-block { width: 100%; }

/* ── Flash messages ── */
.flash-container { position: fixed; top: 74px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 400px; }
.flash {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius-sm); font-size: .875rem;
  font-weight: 500; box-shadow: var(--shadow-md); backdrop-filter: blur(10px);
  border: 1px solid;
}
.flash-success { background: rgba(46,204,113,.15); color: #2ECC71; border-color: rgba(46,204,113,.3); }
.flash-error   { background: rgba(231,76,60,.15);  color: #E74C3C; border-color: rgba(231,76,60,.3); }
.flash-warning { background: rgba(243,156,18,.15); color: #F39C12; border-color: rgba(243,156,18,.3); }
.flash-info    { background: var(--gold-dim);       color: var(--gold); border-color: rgba(201,168,76,.3); }
.flash-close   { background: none; border: none; cursor: pointer; font-size: .9rem; opacity: .6; }

/* ── Main & Footer ── */
.main-content { min-height: calc(100vh - 120px); }
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 32px;
  background: var(--card);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; font-size: .8rem; color: var(--text-muted); flex-wrap: wrap;
}

/* ── Page container ── */
.page-container { max-width: 1200px; margin: 0 auto; padding: 40px 32px; }
.page-container.narrow { max-width: 780px; }
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 36px; flex-wrap: wrap;
}
.page-header h1 { margin-bottom: 6px; }
.page-sub { font-size: .875rem; color: var(--text-muted); }
.back-link { font-size: .8rem; color: var(--text-muted); display: block; margin-bottom: 10px; transition: color .2s; }
.back-link:hover { color: var(--gold); }
.text-center { text-align: center; }

/* ── Hero ── */
.hero {
  position: relative; overflow: hidden;
  padding: 100px 32px 80px; text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,168,76,.12) 0%, transparent 70%),
              linear-gradient(180deg, var(--navy) 0%, var(--bg) 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A84C' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-dim); border: 1px solid rgba(201,168,76,.3);
  color: var(--gold); font-size: .78rem; font-weight: 600;
  padding: 5px 16px; border-radius: 99px; margin-bottom: 28px;
  letter-spacing: .05em; text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-display); font-size: 3.4rem; font-weight: 700;
  line-height: 1.1; margin-bottom: 24px; color: var(--text);
  letter-spacing: -.02em;
}
.hero-sub { font-size: 1.15rem; max-width: 580px; margin: 0 auto 40px; color: var(--text-muted); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 20px; font-size: .8rem; color: var(--text-light); }

/* ── Stats bar ── */
.stats-bar {
  background: var(--card); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: center;
}
.stat-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 60px; border-right: 1px solid var(--border);
  transition: background .2s;
}
.stat-item:hover { background: var(--gold-glow); }
.stat-item:last-child { border-right: none; }
.stat-item strong { font-size: 2rem; font-weight: 800; color: var(--gold); font-family: var(--font-display); }
.stat-item span   { font-size: .78rem; color: var(--text-muted); margin-top: 4px; letter-spacing: .06em; text-transform: uppercase; }

/* ── Sections ── */
.section { padding: 80px 32px; }
.section-alt { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; font-size: 2.2rem; margin-bottom: 10px; font-family: var(--font-display); }
.section-sub   { text-align: center; color: var(--text-muted); margin-bottom: 50px; font-size: .95rem; }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.step-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 28px; position: relative;
  box-shadow: var(--shadow); transition: all .3s;
}
.step-card:hover { border-color: var(--gold); box-shadow: var(--shadow-gold); transform: translateY(-4px); }
.step-num {
  position: absolute; top: -14px; left: 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy); font-size: .75rem; font-weight: 800;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.step-icon { font-size: 2.2rem; margin-bottom: 14px; }
.step-card h3 { margin-bottom: 10px; font-size: 1rem; color: var(--text); }

/* Subject tags */
.subject-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.subject-tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 99px; font-size: .78rem;
  font-weight: 600; border: 1px solid; transition: all .2s;
}
.subject-tag:hover { transform: translateY(-2px); }
.subject-tag-nsc  { background: rgba(155,89,182,.12); color: #C39BD3; border-color: rgba(155,89,182,.3); }
.subject-tag-csec { background: var(--gold-dim); color: var(--gold-light); border-color: rgba(201,168,76,.3); }
.subject-tag-cape { background: rgba(46,204,113,.1); color: #2ECC71; border-color: rgba(46,204,113,.25); }
.subject-tag-more { background: var(--border); color: var(--text-muted); border-color: transparent; }
.tag-level { font-size: .62rem; background: rgba(255,255,255,.1); padding: 1px 5px; border-radius: 4px; }

/* Types grid */
.types-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.type-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  transition: all .3s; position: relative; overflow: hidden;
}
.type-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0; transition: opacity .3s;
}
.type-card:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow-gold); }
.type-card:hover::before { opacity: 1; }
.type-icon { font-size: 2.8rem; margin-bottom: 14px; }
.type-card h3 { margin-bottom: 10px; color: var(--text); }
.type-card p  { font-size: .85rem; margin-bottom: 14px; line-height: 1.65; }
.type-badge { font-size: .72rem; color: var(--gold); font-weight: 600; letter-spacing: .03em; }

/* Pricing teaser */
.pricing-teaser { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.price-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px; width: 300px;
  text-align: center; box-shadow: var(--shadow); transition: all .3s;
}
.price-card.price-premium {
  border: 1px solid rgba(201,168,76,.4);
  box-shadow: var(--shadow-gold);
  background: linear-gradient(160deg, var(--card), rgba(201,168,76,.04));
}
.price-badge { font-size: .72rem; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; letter-spacing: .08em; text-transform: uppercase; }
.price-badge-premium { color: var(--gold); }
.price-amount { font-size: 3rem; font-weight: 800; margin-bottom: 24px; font-family: var(--font-display); color: var(--gold); }
.price-amount span { font-size: 1rem; color: var(--text-muted); font-weight: 400; font-family: var(--font-body); }
.price-list { list-style: none; text-align: left; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.price-list li { font-size: .875rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.price-list li.feature-no { opacity: .4; }

/* CTA */
.cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, rgba(201,168,76,.08) 50%, var(--navy) 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(201,168,76,.06), transparent);
}
.cta-section h2 { color: var(--text); position: relative; }
.cta-section p  { color: var(--text-muted); margin: 14px 0 32px; position: relative; }
.cta-section .section-inner { position: relative; }

/* ── Auth pages ── */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 120px); padding: 40px 16px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201,168,76,.06), transparent);
}
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 48px;
  width: 100%; max-width: 460px; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: var(--radius); display: flex; align-items: center;
  justify-content: center; font-size: 1.8rem; box-shadow: var(--shadow-gold);
}
.auth-header h1 { font-size: 1.7rem; margin-bottom: 8px; }
.auth-switch { text-align: center; margin-top: 24px; font-size: .875rem; color: var(--text-muted); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; }
.form-group input, .form-select, .form-textarea {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .9rem;
  background: var(--bg); color: var(--text);
  transition: all .2s;
}
.form-group input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.form-check { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.form-check input { width: auto; accent-color: var(--gold); }
.form-check label { font-size: .875rem; margin: 0; color: var(--text-muted); text-transform: none; }
.auth-form { display: flex; flex-direction: column; gap: 4px; }

/* ── Dashboard ── */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.project-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  gap: 10px; transition: all .3s; position: relative; overflow: hidden;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0; transition: opacity .3s;
}
.project-card:hover { border-color: rgba(201,168,76,.3); box-shadow: var(--shadow-gold); transform: translateY(-3px); }
.project-card:hover::before { opacity: 1; }
.project-card-header { display: flex; align-items: center; gap: 12px; }
.project-type-icon {
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  background: var(--gold-dim); border: 1px solid rgba(201,168,76,.2);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.project-meta  { display: flex; gap: 8px; flex-wrap: wrap; }
.project-level { font-size: .68rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; letter-spacing: .05em; text-transform: uppercase; }
.level-nsc  { background: rgba(155,89,182,.15); color: #C39BD3; }
.level-csec { background: var(--gold-dim); color: var(--gold-light); }
.level-cape { background: rgba(46,204,113,.12); color: #2ECC71; }
.project-type  { font-size: .68rem; color: var(--text-muted); padding: 3px 10px; background: var(--border); border-radius: 99px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.project-title   { font-size: 1rem; font-weight: 700; color: var(--text); font-family: var(--font-display); line-height: 1.35; }
.project-subject { font-size: .8rem; color: var(--text-muted); }
.project-topic   { font-size: .8rem; color: var(--text-muted); font-style: italic; }
.project-date    { font-size: .72rem; color: var(--text-light); }
.project-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.progress-bar-wrap { height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 99px; transition: width .4s ease; }
.progress-stats { display: flex; justify-content: space-between; font-size: .75rem; color: var(--text-muted); }

.empty-state { text-align: center; padding: 100px 24px; }
.empty-icon  { font-size: 4rem; margin-bottom: 20px; }
.empty-state h2 { margin-bottom: 12px; font-size: 1.6rem; }
.empty-state p  { max-width: 400px; margin: 0 auto 32px; }

.upgrade-banner {
  background: linear-gradient(135deg, rgba(201,168,76,.08), rgba(201,168,76,.04));
  border: 1px solid rgba(201,168,76,.2); border-radius: var(--radius);
  padding: 18px 24px; display: flex; align-items: center; gap: 16px;
  margin-bottom: 32px; font-size: .875rem;
}
.upgrade-banner-icon { font-size: 1.6rem; }
.upgrade-link { color: var(--gold); font-weight: 600; }

/* ── New SBA form ── */
.new-sba-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.new-sba-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}
.form-section { margin-bottom: 36px; }
.form-section-title { display: flex; align-items: center; gap: 12px; font-size: 1rem; margin-bottom: 18px; color: var(--text); }
.step-badge {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy); font-size: .72rem; font-weight: 800;
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.optional-tag { background: var(--border); color: var(--text-muted); font-size: .68rem; padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.level-chips { display: flex; gap: 14px; flex-wrap: wrap; }
.level-chip { cursor: pointer; }
.level-chip input { position: absolute; opacity: 0; pointer-events: none; }
.level-chip .chip-label { display: block; font-weight: 700; font-size: .95rem; color: var(--text); }
.level-chip .chip-sub   { display: block; font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.level-chip {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 22px; transition: all .2s;
}
.level-chip:has(input:checked) { border-color: var(--gold); background: var(--gold-dim); box-shadow: 0 0 0 1px var(--gold); }
.form-hint { font-size: .85rem; color: var(--text-muted); margin-top: 10px; }
.form-textarea { resize: vertical; min-height: 80px; }
.topic-suggestions {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px; margin-top: 10px; font-size: .875rem;
}
.suggestions-label { font-weight: 700; color: var(--text); margin-bottom: 12px !important; }
.suggestion-item { padding: 10px 14px; border-radius: var(--radius-xs); transition: all .15s; border: 1px solid transparent; }
.suggestion-item:hover { background: var(--gold-dim); border-color: rgba(201,168,76,.2); color: var(--gold); }
.hidden { display: none !important; }

/* ── Builder layout ── */
.builder-layout { display: flex; height: calc(100vh - 66px); overflow: hidden; }
.builder-sidebar {
  width: 290px; flex-shrink: 0; background: var(--card);
  border-right: 1px solid var(--border); display: flex;
  flex-direction: column; overflow-y: auto;
}
.sidebar-top { padding: 24px 18px 18px; border-bottom: 1px solid var(--border); }
.sidebar-title { font-size: .95rem; font-weight: 700; margin: 10px 0 8px; font-family: var(--font-display); color: var(--text); }
.sidebar-meta  { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.sidebar-topic { font-size: .75rem; color: var(--text-muted); font-style: italic; margin-top: 6px; line-height: 1.5; }
.sidebar-progress { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.progress-label { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.progress-words { font-size: .72rem; color: var(--text-light); margin-top: 6px; }

.section-nav { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.section-nav-item {
  background: none; border: none; border-radius: var(--radius-xs);
  padding: 10px 14px; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: .83rem;
  color: var(--text-muted); transition: all .18s; width: 100%;
}
.section-nav-item:hover:not(.locked) { background: var(--gold-glow); color: var(--text); }
.section-nav-item.active { background: var(--gold-dim); color: var(--gold); font-weight: 600; border: 1px solid rgba(201,168,76,.2); }
.section-nav-item.locked { opacity: .4; cursor: not-allowed; }
.nav-item-label { flex: 1; }
.nav-item-words { font-size: .68rem; }
.lock-icon  { font-size: .8rem; }
.check-icon { font-size: .8rem; color: var(--success); }

.sidebar-actions { padding: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.upgrade-box {
  background: linear-gradient(135deg, rgba(201,168,76,.08), rgba(201,168,76,.04));
  border: 1px solid rgba(201,168,76,.2); border-radius: var(--radius-sm);
  padding: 14px; font-size: .8rem; display: flex; flex-direction: column; gap: 10px;
}
.upgrade-box p { color: var(--text); margin: 0; }

/* Builder main */
.builder-main { flex: 1; overflow-y: auto; background: var(--bg); }
.section-panel { padding: 40px 36px; max-width: 880px; margin: 0 auto; }
.section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-header h2 { font-size: 1.5rem; font-family: var(--font-display); }
.word-limit { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.section-header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.word-count-badge {
  background: var(--border); color: var(--text-muted);
  font-size: .72rem; font-weight: 700; padding: 4px 12px; border-radius: 99px;
}
.save-status { font-size: .75rem; }
.status-ok      { color: var(--success); }
.status-pending { color: var(--text-muted); }

/* Guidance */
.guidance-box {
  background: rgba(201,168,76,.05); border: 1px solid rgba(201,168,76,.15);
  border-radius: var(--radius-sm); margin-bottom: 18px; overflow: hidden;
}
.guidance-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; cursor: pointer; font-size: .875rem; font-weight: 600;
  color: var(--gold);
}
.guidance-body  { padding: 12px 16px 16px; font-size: .85rem; color: var(--text-muted); line-height: 1.7; }

/* Editor */
.section-editor {
  width: 100%; min-height: 300px; padding: 20px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: Georgia, 'Times New Roman', serif; font-size: 1rem;
  line-height: 1.8; color: var(--text); background: var(--card);
  resize: vertical; transition: all .2s;
}
.section-editor:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }

/* AI panel */
.ai-panel {
  margin-top: 24px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.ai-panel-header {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: linear-gradient(135deg, #0D1117, #111827);
  border-bottom: 1px solid var(--border);
}
.ai-icon { font-size: 1.2rem; }
.ai-panel-header span:nth-child(2) { flex: 1; font-weight: 600; font-size: .875rem; color: var(--text); }
.ai-panel-toggle { background: none; border: none; color: var(--text-muted); cursor: pointer; }
.ai-panel-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.ai-chat { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.ai-message { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .875rem; line-height: 1.65; max-width: 92%; }
.ai-welcome   { background: var(--gold-dim); border: 1px solid rgba(201,168,76,.2); color: var(--text-muted); }
.ai-user      { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--navy); align-self: flex-end; font-weight: 500; }
.ai-assistant { background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.ai-system    { background: rgba(231,76,60,.12); border: 1px solid rgba(231,76,60,.2); color: var(--danger); }
.ai-thinking  { background: var(--bg); color: var(--text-muted); font-style: italic; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .4 } }
.ai-input-row { display: flex; gap: 10px; }
.ai-input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font-body);
  font-size: .875rem; background: var(--bg); color: var(--text); transition: all .2s;
}
.ai-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.ai-quick-prompts { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-btn {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 99px; padding: 5px 14px; font-size: .75rem;
  cursor: pointer; color: var(--text-muted); transition: all .2s; font-family: var(--font-body);
}
.quick-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }

/* Locked */
.section-locked { position: relative; }
.locked-overlay {
  display: flex; align-items: center; justify-content: center;
  min-height: 420px; background: var(--card);
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--card), rgba(201,168,76,.02));
}
.lock-message { text-align: center; padding: 48px 28px; }
.lock-big { font-size: 3.5rem; margin-bottom: 14px; display: block; }
.lock-message h3 { margin-bottom: 12px; font-size: 1.3rem; font-family: var(--font-display); }
.lock-message p  { max-width: 320px; margin: 0 auto 24px; }

/* Tool box */
.tool-box { margin-top: 24px; background: var(--gold-dim); border: 1px solid rgba(201,168,76,.2); border-radius: var(--radius-sm); padding: 18px; }
.tool-box h4 { margin-bottom: 8px; color: var(--gold); }
.tool-box p  { font-size: .85rem; margin-bottom: 14px; }
.gen-result { margin-top: 14px; }
.gen-result pre { white-space: pre-wrap; font-size: .8rem; background: var(--card); padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* ── AI markdown rendering ── */
.ai-p    { margin-bottom: 8px; line-height: 1.65; }
.ai-h3   { font-size: 1rem; font-weight: 700; margin: 12px 0 6px; color: var(--text); }
.ai-h4   { font-size: .9rem; font-weight: 700; margin: 10px 0 4px; color: var(--text); }
.ai-ul, .ai-ol { margin: 6px 0 8px 18px; display: flex; flex-direction: column; gap: 4px; }
.ai-ul li, .ai-ol li { font-size: .875rem; line-height: 1.6; color: var(--text); }
.ai-hr   { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.ai-quote { border-left: 3px solid var(--gold); padding: 8px 14px; margin: 8px 0; background: var(--gold-dim); border-radius: 0 var(--radius-xs) var(--radius-xs) 0; font-style: italic; color: var(--gold); }
.ai-code  { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; font-family: 'Courier New', monospace; font-size: .82rem; color: var(--gold); }
.ai-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .82rem; }
.ai-table th { background: var(--gold-dim); color: var(--gold); padding: 8px 12px; text-align: left; font-weight: 700; border-bottom: 1px solid rgba(201,168,76,.2); }
.ai-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.ai-table tr:last-child td { border-bottom: none; }
.ai-table tr:nth-child(even) td { background: rgba(255,255,255,.02); }

/* ── Preview ── */
.preview-doc { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.preview-cover {
  padding: 56px 48px; text-align: center;
  background: linear-gradient(160deg, var(--navy), rgba(201,168,76,.06));
  border-bottom: 1px solid var(--border);
}
.preview-main-title { font-size: 2rem; font-weight: 700; margin-bottom: 18px; font-family: var(--font-display); color: var(--text); }
.preview-cover-meta { color: var(--text-muted); font-size: .9rem; line-height: 2.2; margin-bottom: 18px; }
.preview-stats { display: flex; gap: 18px; justify-content: center; font-size: .8rem; color: var(--text-muted); }
.preview-divider { border: none; border-top: 1px solid var(--border); }
.preview-section { padding: 36px 48px; }
.preview-section-title { font-size: 1.3rem; margin-bottom: 18px; color: var(--gold); font-family: var(--font-display); border-bottom: 1px solid rgba(201,168,76,.2); padding-bottom: 10px; }
.preview-para { margin-bottom: 14px; font-size: .95rem; line-height: 1.8; color: var(--text); }
.preview-empty { color: var(--text-muted); font-style: italic; }
.preview-section-meta { font-size: .72rem; color: var(--text-light); margin-top: 14px; }
.preview-actions { display: flex; gap: 10px; }
.preview-locked { min-height: 200px; }
.preview-blur-overlay { position: relative; }
.preview-blurred-content { filter: blur(6px); user-select: none; color: var(--text-muted); font-size: .9rem; line-height: 1.8; }
.preview-lock-msg { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; background: var(--card); padding: 28px 36px; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid rgba(201,168,76,.2); z-index: 10; width: 340px; }
.preview-upgrade-banner { padding: 48px; text-align: center; border-top: 1px solid var(--border); background: linear-gradient(135deg, rgba(201,168,76,.06), transparent); }
.preview-upgrade-banner h3 { margin-bottom: 10px; color: var(--gold); font-family: var(--font-display); }

/* ── Pricing ── */
.pricing-header { padding: 56px 24px 36px; background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(201,168,76,.08), transparent); }
.pricing-grid { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; padding: 0 24px 48px; max-width: 820px; margin: 0 auto; }
.pricing-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; flex: 1;
  min-width: 290px; max-width: 360px; position: relative; box-shadow: var(--shadow); transition: all .3s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pricing-card-featured {
  border: 1px solid rgba(201,168,76,.35);
  background: linear-gradient(160deg, var(--card), rgba(201,168,76,.04));
  box-shadow: var(--shadow-gold);
}
.pricing-card-featured:hover { box-shadow: 0 20px 60px rgba(201,168,76,.25); }
.featured-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy); font-size: .72rem; font-weight: 800;
  padding: 5px 18px; border-radius: 99px; white-space: nowrap; letter-spacing: .05em;
}
.pricing-card-header { text-align: center; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.pricing-card-header h2 { font-size: 1.5rem; margin-bottom: 10px; font-family: var(--font-display); color: var(--text); }
.pricing-price { font-size: 3rem; font-weight: 800; color: var(--gold); margin-bottom: 8px; font-family: var(--font-display); }
.pricing-price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; font-family: var(--font-body); }
.pricing-card-header p { font-size: .875rem; }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.pricing-features li { font-size: .875rem; display: flex; align-items: flex-start; gap: 10px; color: var(--text-muted); }
.feature-yes { color: var(--text); }
.feature-yes::before { content: "✓"; color: var(--gold); font-weight: 700; flex-shrink: 0; }
.feature-no::before  { content: "✗"; color: var(--text-light); font-weight: 700; flex-shrink: 0; }
.faq-section { max-width: 900px; margin: 0 auto; padding: 56px 24px; }
.faq-title { text-align: center; margin-bottom: 36px; font-family: var(--font-display); }
.faq-grid  { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; }
.faq-item  { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 24px; transition: border-color .2s; }
.faq-item:hover { border-color: rgba(201,168,76,.2); }
.faq-item h4 { margin-bottom: 10px; font-size: .95rem; color: var(--text); }
.faq-item p  { font-size: .875rem; }

/* ── Teacher dashboard ── */
.teacher-stats { display: flex; gap: 18px; margin-bottom: 36px; flex-wrap: wrap; }
.t-stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 32px; text-align: center; box-shadow: var(--shadow); transition: all .2s; flex: 1; min-width: 140px; }
.t-stat:hover { border-color: rgba(201,168,76,.2); }
.t-stat strong { display: block; font-size: 2.2rem; font-weight: 800; color: var(--gold); font-family: var(--font-display); }
.t-stat span   { font-size: .72rem; color: var(--text-muted); margin-top: 4px; letter-spacing: .06em; text-transform: uppercase; }
.section-group-title { font-size: .85rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; color: var(--text-muted); letter-spacing: .07em; text-transform: uppercase; }
.status-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-pending  { background: var(--warning); }
.dot-reviewed { background: var(--success); }
.count-badge  { background: var(--border); color: var(--text-muted); font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.submissions-table-wrap { overflow-x: auto; margin-bottom: 14px; border-radius: var(--radius); border: 1px solid var(--border); }
.submissions-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.submissions-table th { background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 16px; text-align: left; font-weight: 600; color: var(--text-muted); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }
.submissions-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.submissions-table tr:last-child td { border-bottom: none; }
.submissions-table tr:hover td { background: var(--gold-glow); }
.topic-cell { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); }
.muted-sm { font-size: .78rem; color: var(--text-muted); }
.mini-progress { height: 4px; background: var(--border); border-radius: 99px; width: 80px; margin-bottom: 4px; }
.mini-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 99px; }
.grade-badge { background: rgba(201,168,76,.15); color: var(--gold); font-weight: 700; padding: 3px 10px; border-radius: 99px; font-size: .82rem; }
.status-tag  { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; letter-spacing: .04em; }
.status-submitted { background: rgba(243,156,18,.12); color: var(--warning); }
.status-reviewed  { background: rgba(46,204,113,.12); color: var(--success); }
.status-returned  { background: var(--gold-dim); color: var(--gold); }
.empty-state-sm { text-align: center; padding: 28px; color: var(--text-muted); font-size: .875rem; background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.review-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .review-layout { grid-template-columns: 1fr; } }
.review-section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 18px; transition: border-color .2s; }
.review-section:hover { border-color: rgba(201,168,76,.15); }
.review-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.review-content { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; }
.review-content p { font-size: .9rem; line-height: 1.75; color: var(--text); margin-bottom: 10px; }
.review-content p:last-child { margin: 0; }
.comment-label { display: block; font-size: .75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; letter-spacing: .05em; text-transform: uppercase; }
.comment-textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: .875rem; resize: vertical; background: var(--bg); color: var(--text); transition: border .2s; }
.comment-textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.save-comment-btn { margin-top: 8px; }
.comment-status { font-size: .8rem; margin-left: 8px; }
.teacher-comment-box { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.review-sidebar-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; position: sticky; top: 80px; }
.review-sidebar-card h3 { margin-bottom: 4px; font-family: var(--font-display); }
.student-info-box p { font-size: .85rem; color: var(--text-muted); margin-bottom: 8px; }
.review-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Submit to teacher */
.submit-teacher-box { border-top: 1px solid var(--border); padding: 16px; }
.submit-teacher-label { font-size: .72rem; font-weight: 700; color: var(--text-muted); margin-bottom: 12px; letter-spacing: .07em; text-transform: uppercase; }
.teacher-search-results { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); max-height: 180px; overflow-y: auto; }
.teacher-result-item { padding: 10px 14px; cursor: pointer; font-size: .85rem; border-bottom: 1px solid var(--border); transition: background .15s; }
.teacher-result-item:last-child { border-bottom: none; }
.teacher-result-item:hover { background: var(--gold-glow); color: var(--gold); }
.submission-status-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; font-size: .8rem; }
.submission-status-box p { margin-bottom: 4px; color: var(--text); }
.teacher-feedback-preview { margin-top: 8px; background: rgba(46,204,113,.08); border-radius: var(--radius-xs); padding: 8px 10px; }
.teacher-feedback-preview p { font-size: .75rem; color: var(--success); margin-top: 4px; }
.teacher-feedback-inline { background: rgba(46,204,113,.08); border: 1px solid rgba(46,204,113,.2); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 14px; }
.feedback-label { font-size: .78rem; font-weight: 700; color: var(--success); margin-bottom: 8px; }
.teacher-feedback-inline p { font-size: .875rem; color: var(--text); }

/* Role chips */
.role-chip { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: .9rem; font-weight: 600; background: var(--bg); transition: all .2s; color: var(--text-muted); }
.role-chip:has(input:checked) { border-color: var(--gold); background: var(--gold-dim); color: var(--gold); }
.role-chip input { position: absolute; opacity: 0; pointer-events: none; }

/* Submission link */
.submission-link-box { display: flex; gap: 10px; margin-bottom: 10px; }
.link-input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: .875rem; background: var(--bg); color: var(--text); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-title { font-size: 2.2rem; }
  .stat-item  { padding: 18px 28px; }
  .builder-sidebar { width: 250px; }
  .section-panel { padding: 24px 16px; }
  .pricing-grid { flex-direction: column; align-items: center; }
  .nav-links .nav-link { display: none; }
  .page-container { padding: 28px 20px; }
}
@media (max-width: 600px) {
  .builder-layout { flex-direction: column; height: auto; }
  .builder-sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .builder-main   { height: auto; }
  .hero-title { font-size: 1.9rem; }
  .stats-bar  { flex-wrap: wrap; }
  .stat-item  { flex: 1; min-width: 80px; padding: 16px 12px; }
}

/* ── Assignment Helper ──────────────────────────────────────────────────── */

.assign-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.assign-type-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.assign-type-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}
.assign-type-icon { font-size: 2rem; margin-bottom: 10px; }
.assign-type-label { font-weight: 600; color: var(--text); margin-bottom: 6px; }
.assign-type-desc  { font-size: .8rem; color: var(--text-muted); line-height: 1.4; }

.assign-session-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.assign-session-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text);
  transition: all .2s;
}
.assign-session-card:hover {
  border-color: var(--gold);
  background: var(--card-hover);
}
.assign-session-icon  { font-size: 1.5rem; flex-shrink: 0; }
.assign-session-info  { flex: 1; min-width: 0; }
.assign-session-title { font-weight: 600; margin-bottom: 2px; }
.assign-session-meta  { font-size: .78rem; color: var(--text-muted); margin-bottom: 4px; }
.assign-session-preview { font-size: .82rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assign-session-arrow { color: var(--gold); font-size: 1.2rem; flex-shrink: 0; }

/* Assignment Helper layout */
.assign-helper-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: calc(100vh - 64px);
  overflow: hidden;
}

.assign-sidebar {
  background: var(--navy-light);
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}
.assign-back {
  color: var(--gold);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
}
.assign-back:hover { text-decoration: underline; }

.assign-info-card {
  background: var(--card);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.assign-info-icon    { font-size: 2rem; margin-bottom: 8px; }
.assign-info-label   { font-weight: 600; color: var(--gold); margin-bottom: 4px; font-size: .9rem; }
.assign-info-subject { font-size: .8rem; color: var(--text-muted); margin-bottom: 4px; }
.assign-info-title   { font-size: .85rem; color: var(--text); }

.assign-tips { font-size: .82rem; color: var(--text-muted); }
.assign-tips h4 { color: var(--text); font-size: .85rem; margin-bottom: 8px; font-family: var(--font-display); }
.assign-tips ul { padding-left: 16px; }
.assign-tips li { margin-bottom: 6px; line-height: 1.4; }

/* Chat area */
.assign-chat-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.assign-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.assign-chat-welcome {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
}
.assign-welcome-icon { font-size: 3rem; margin-bottom: 16px; }
.assign-chat-welcome h2 {
  font-family: var(--font-display);
  color: var(--gold);
  margin-bottom: 10px;
}

.assign-msg { display: flex; gap: 12px; align-items: flex-start; }
.assign-msg-user { flex-direction: row-reverse; }

.assign-msg-bubble {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 16px;
  line-height: 1.6;
  font-size: .93rem;
}
.assign-msg-user .assign-msg-bubble {
  background: var(--gold);
  color: #0A0F1E;
  border-radius: 16px 4px 16px 16px;
  font-weight: 500;
}
.assign-msg-ai .assign-msg-bubble {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px 16px 16px 16px;
}

.assign-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.assign-msg-error {
  background: rgba(231,76,60,.1);
  border: 1px solid rgba(231,76,60,.3);
  color: var(--danger);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
}

.assign-typing { display: flex; gap: 12px; align-items: center; }
.assign-typing-dots { display: flex; gap: 5px; padding: 14px 18px; background: var(--card); border-radius: 4px 16px 16px 16px; }
.assign-typing-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-muted);
  animation: bounce 1.2s infinite;
}
.assign-typing-dots span:nth-child(2) { animation-delay: .2s; }
.assign-typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

.assign-input-bar {
  border-top: 1px solid var(--border);
  padding: 16px 40px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: var(--navy);
}
.assign-input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .93rem;
  resize: none;
  line-height: 1.5;
  transition: border-color .2s;
}
.assign-input:focus { outline: none; border-color: var(--gold); }
.assign-send-btn { flex-shrink: 0; height: 48px; padding: 0 24px; }

/* Pricing 4-column grid */
.pricing-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) {
  .pricing-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .pricing-grid-4 { grid-template-columns: 1fr; }
  .assign-helper-layout { grid-template-columns: 1fr; }
  .assign-sidebar { display: none; }
  .assign-chat-messages { padding: 20px 16px; }
  .assign-input-bar { padding: 12px 16px; }
}

.pricing-card-bundle {
  border-color: var(--gold);
  background: linear-gradient(160deg, var(--navy-light) 0%, rgba(201,168,76,.05) 100%);
}

.featured-badge-bundle {
  background: var(--gold);
  color: #0A0F1E;
}

.paypal-msg {
  text-align: center;
  font-size: .8rem;
  margin-top: 8px;
  color: var(--text-muted);
}

/* ── Topic suggestion cards ─────────────────────────────────────────────── */
.topic-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.topic-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
}

.topic-card:hover {
  background: var(--card-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-gold);
  border-left-color: var(--gold-light);
}

.topic-card-title {
  font-weight: 600;
  color: var(--text);
  font-size: .92rem;
  line-height: 1.45;
  margin-bottom: 4px;
}

.topic-card-desc {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.suggestions-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}

/* ── CAPE IA ────────────────────────────────────────────────────────────── */
.cape-badge {
  background: linear-gradient(135deg, var(--cape-color), #27ae60);
  color: #fff;
  font-size: .7rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  display: inline-block;
}

.pricing-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 40px;
}
@media (max-width: 1300px) {
  .pricing-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .pricing-grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .pricing-grid-5 { grid-template-columns: 1fr; }
}
