/* ── Gig Platform — Main Stylesheet ── */

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

:root {
  --primary:    #ffffff;
  --primary-dk: #e5e5e5;
  --accent:     #ffffff;
  --accent-dk:  #e5e5e5;
  --success:    #22c55e;
  --warning:    #f59e0b;
  --danger:     #ef4444;
  --gold:       #ffd700;
  --text:       #ffffff;
  --text-muted: #9ca3af;
  --border:     #2a2a2a;
  --bg:         #0c0c0c;
  --bg-muted:   #161616;
  --card:       #ffffff;
  --card-text:  #111111;
  --nav-h:      64px;
  --radius:     8px;
  --radius-lg:  12px;
  --shadow:     0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 6px rgba(0,0,0,0.3), 0 10px 24px rgba(0,0,0,0.5);
  --shadow-lg:  0 20px 48px rgba(0,0,0,0.6);

  /* ── School color variants (inspired by, not identical) ── */
  --uab:     #1aaf7a;  /* UAB — brighter teal-green   */
  --uga:     #d63a5a;  /* UGA — softer crimson-rose   */
  --ksu:     #e8c240;  /* KSU — warm amber-gold       */
  --ua:      #c2395a;  /* UA  — muted rose-crimson    */
  --auburn:  #f09a45;  /* Auburn — warm peach-orange  */

  /* ── Active school color — defaults to UAB, overridden by data-school ── */
  --school-color: #1aaf7a;
}

/* ── School color switching via data-school attribute ── */
[data-school="uab"]    { --school-color: var(--uab); }
[data-school="uga"]    { --school-color: var(--uga); }
[data-school="ksu"]    { --school-color: var(--ksu); }
[data-school="ua"]     { --school-color: var(--ua); }
[data-school="auburn"] { --school-color: var(--auburn); }

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ── Skip link ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  z-index: 9999;
  background: #fff;
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 1rem; }

/* ── Nav ── */
nav {
  background: rgba(12,12,12,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; opacity: 0.85; }

.nav-logo-img {
  height: 52px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.nav-links { display: flex; align-items: center; gap: 0.15rem; }

.nav-links a {
  color: #9ca3af;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.nav-links a:hover { background: #1a1a1a; color: #fff; text-decoration: none; }

.nav-links .btn-nav {
  background: #fff;
  color: #111;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  margin-left: 0.25rem;
}
.nav-links .btn-nav:hover { background: #e5e5e5; text-decoration: none; }

.nav-greeting { color: #9ca3af; font-size: 0.82rem; margin-right: 0.4rem; }

.nav-msg-link { position: relative; }
.nav-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: #e53935;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page { padding: 2rem 1.5rem; max-width: 1200px; margin: 0 auto; }

/* ── Flash messages ── */
.flashes { max-width: 1200px; margin: 1rem auto 0; padding: 0 1.5rem; }
.flash {
  background: #f0fdf4;
  border-left: 3px solid var(--success);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #166534;
}
.flash.error { background: #fff1f2; border-color: var(--danger); color: #9f1239; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1;
  letter-spacing: 0.01em;
  font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary   { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(15,52,96,0.3); }
.btn-primary:hover { background: var(--primary-dk); box-shadow: 0 4px 16px rgba(15,52,96,0.35); }
.btn-accent    { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(61,184,90,0.3); }
.btn-accent:hover { background: var(--accent-dk); box-shadow: 0 4px 16px rgba(61,184,90,0.35); }
.btn-success   { background: var(--success); color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-outline   { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: rgba(15,52,96,0.06); }
.btn-ghost     { background: transparent; border: 1.5px solid var(--border); color: var(--text-muted); }
.btn-ghost:hover { background: var(--card); border-color: #cbd5e1; color: var(--text); }
.btn-sm  { padding: 0.35rem 0.8rem; font-size: 0.8rem; border-radius: 8px; }
.btn-lg  { padding: 0.875rem 2rem; font-size: 0.975rem; border-radius: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ── Cards ── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 2px solid var(--school-color);
  overflow: hidden;
  color: var(--card-text);
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--card-text);
}
.card-header h3 { font-size: 0.95rem; font-weight: 700; color: var(--card-text); }
.card-body { padding: 1.25rem; color: var(--card-text); }

/* ── Task card ── */
.task-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--school-color);
  padding: 1.25rem;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--card-text);
}
.task-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.18); transform: translateY(-3px); }

.task-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }

.task-title { font-size: 1rem; font-weight: 700; color: var(--card-text); margin: 0; }
.task-title a { color: inherit; text-decoration: none; }
.task-title a:hover { color: var(--primary); }

.task-budget {
  font-size: 0.9rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.task-desc {
  font-size: 0.875rem;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.task-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.8rem; color: #777; }
.task-meta span { display: flex; align-items: center; gap: 0.2rem; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-open      { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.badge-progress  { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.badge-completed { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-cancelled { background: #f9fafb; color: #6b7280; border: 1px solid #e5e7eb; }
.badge-pending   { background: #fdf2f8; color: #9d174d; border: 1px solid #fbcfe8; }
.badge-accepted  { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.badge-rejected  { background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; }
.badge-category  { background: #f5f3ff; color: #5b21b6; border: 1px solid #ddd6fe; }
.badge-verified  { background: #f0fdfa; color: #115e59; border: 1px solid #99f6e4; }

/* ── Grid layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.tasks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.page-header p  { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* ── Stats row ── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 2px solid var(--school-color);
  text-align: center;
  box-shadow: var(--shadow);
  color: var(--card-text);
}
.stat-card .stat-num { font-size: 2rem; font-weight: 800; color: var(--school-color); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-card .stat-label { font-size: 0.78rem; color: #666; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.2rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.4rem; color: #111; }
.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: #111;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,52,96,0.1);
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Auth page ── */
.auth-wrap {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 100%);
}
.auth-card {
  background: var(--card);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 0.5rem; }
.auth-logo-img { width: 140px; height: auto; object-fit: contain; border-radius: 10px; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.75rem; }

.role-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.role-option input { display: none; }
.role-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.role-option label .role-icon { font-size: 1.75rem; }
.role-option label .role-title { font-weight: 700; font-size: 0.9rem; }
.role-option label .role-desc  { font-size: 0.75rem; color: var(--text-muted); }
.role-option input:checked + label { border-color: var(--primary); background: rgba(15,52,96,0.04); }
.role-option input:checked + label .role-title { color: var(--primary); }
.auth-switch { text-align: center; margin-top: 1.25rem; font-size: 0.875rem; color: var(--text-muted); }

/* ── Landing ── */
.hero {
  background: linear-gradient(145deg, #0d2f5c 0%, #0f3460 40%, #1a3f6e 70%, #0d3b5e 100%);
  color: #fff;
  padding: 5.5rem 1.5rem 8rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(61,184,90,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.04) 0%, transparent 50%);
}

.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(61,184,90,0.15);
  border: 1px solid rgba(61,184,90,0.35);
  color: #6ee7a0;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.75rem);
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 1.1rem;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero h1 span { color: #5de08a; }

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 500px;
  margin: 0 auto 2.25rem;
  line-height: 1.7;
  font-weight: 400;
}

.hero-cta { display: flex; gap: 0.875rem; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 3.5rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
}
.hero-stat {
  padding: 0 2.5rem;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.hero-stat:last-child { border-right: none; }
.hero-stat .num { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hero-stat .lbl { font-size: 0.75rem; color: rgba(255,255,255,0.5); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.2rem; }

/* ── How it works ── */
.hiw { padding: 5rem 1.5rem 4rem; background: #fff; }
.hiw h2 { text-align: center; font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -0.02em; text-wrap: balance; }
.hiw-sub { text-align: center; color: var(--text-muted); margin-bottom: 2.5rem; font-size: 0.975rem; }

.hiw-tabs {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 3rem;
  background: var(--bg);
  padding: 0.35rem;
  border-radius: 12px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3rem;
}
.hiw-tab {
  background: transparent;
  border: none;
  padding: 0.55rem 1.5rem;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.18s;
  font-family: inherit;
  flex: 1;
}
.hiw-tab.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.hiw-tab:hover:not(.active) { color: var(--text); }

.hiw-panel { display: none; }
.hiw-panel.active { display: block; }

.hiw-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; max-width: 900px; margin: 0 auto; }
.hiw-step { text-align: center; padding: 0.5rem; }
.hiw-step .step-num {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #1a4a7a);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.1rem;
  box-shadow: 0 4px 12px rgba(15,52,96,0.25);
}
.hiw-step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.hiw-step p  { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; }

/* ── Categories ── */
.categories-section { padding: 4rem 1.5rem; background: var(--bg); }
.categories-section h2 { text-align: center; font-size: 1.75rem; font-weight: 800; margin-bottom: 2rem; letter-spacing: -0.02em; text-wrap: balance; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.875rem; max-width: 860px; margin: 0 auto; }
.cat-item {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 0.75rem;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  text-decoration: none;
  color: var(--text);
}
.cat-item:hover { border-color: var(--primary); background: rgba(15,52,96,0.03); text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-item .cat-icon { font-size: 1.875rem; margin-bottom: 0.5rem; display: block; }
.cat-item .cat-name { font-size: 0.78rem; font-weight: 600; color: var(--text); }

/* ── Trust section ── */
.trust { background: linear-gradient(135deg, var(--primary) 0%, #0d2a52 100%); color: #fff; padding: 4rem 1.5rem; }
.trust h2 { text-align: center; font-size: 1.75rem; font-weight: 800; margin-bottom: 2.5rem; letter-spacing: -0.02em; text-wrap: balance; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; max-width: 900px; margin: 0 auto; }
.trust-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  backdrop-filter: blur(4px);
}
.t-icon { font-size: 1.875rem; margin-bottom: 0.85rem; display: block; }
.trust-item h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.trust-item p  { font-size: 0.825rem; color: rgba(255,255,255,0.65); line-height: 1.65; }

/* ── Stars ── */
.stars { display: inline-flex; gap: 1px; color: var(--gold); font-size: 0.9rem; }
.stars.sm { font-size: 0.75rem; }
.rating-display { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; }
.rating-display .rating-num { font-weight: 700; }
.rating-display .rating-count { color: var(--text-muted); font-size: 0.78rem; }

/* ── Star rating input ── */
.star-input { display: flex; gap: 0.35rem; flex-direction: row-reverse; justify-content: flex-end; }
.star-input input { display: none; }
.star-input label { font-size: 2rem; cursor: pointer; color: #ddd; transition: color 0.1s; }
.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--gold); }

/* ── Application card ── */
.app-card {
  background: var(--card);
  border: 2px solid var(--school-color);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: var(--card-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.app-info { display: flex; align-items: center; gap: 0.75rem; }
.app-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1a4a7a);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
  flex-shrink: 0;
}
.app-name  { font-weight: 700; font-size: 0.95rem; }
.app-price { font-size: 1.2rem; font-weight: 800; color: var(--success); font-variant-numeric: tabular-nums; }
.app-actions { display: flex; align-items: center; gap: 0.5rem; }

/* ── Profile ── */
.profile-header {
  background: linear-gradient(135deg, var(--primary), #1a3a6e);
  color: #fff;
  padding: 2.5rem 1.5rem;
}
.profile-avatar-lg {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.profile-info { margin-top: 1rem; }
.profile-info h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.25rem; letter-spacing: -0.02em; }
.profile-info .profile-role { opacity: 0.7; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* ── Review card ── */
.review-card { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.review-card:last-child { border-bottom: none; }
.review-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.reviewer-name { font-weight: 600; font-size: 0.9rem; }
.review-task { font-size: 0.78rem; color: var(--text-muted); }
.review-comment { font-size: 0.875rem; color: var(--card-text); margin-top: 0.25rem; }

/* ── Messages ── */
.chat-layout { display: grid; grid-template-columns: 280px 1fr; height: calc(100vh - var(--nav-h) - 4rem); gap: 1rem; }
.convo-list {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--school-color);
  overflow-y: auto;
  color: var(--card-text);
}
.convo-item {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: background 0.1s;
  text-decoration: none;
  color: var(--card-text);
}
.convo-item:hover { background: var(--bg); text-decoration: none; }
.convo-item.active { background: rgba(15,52,96,0.06); }
.convo-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1a4a7a);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  flex-shrink: 0;
}
.convo-name { font-weight: 600; font-size: 0.875rem; }
.convo-preview { font-size: 0.78rem; color: var(--text-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 180px; }

.chat-window {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--school-color);
  display: flex;
  flex-direction: column;
  color: var(--card-text);
}
.chat-header {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.chat-messages { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.msg { max-width: 70%; }
.msg-bubble {
  background: var(--bg);
  border-radius: 14px 14px 14px 4px;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
}
.msg.mine { align-self: flex-end; }
.msg.mine .msg-bubble { background: var(--primary); color: #fff; border-radius: 14px 14px 4px 14px; }
.msg-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; }
.msg.mine .msg-meta { text-align: right; }
.chat-input {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
}
.chat-input input { flex: 1; }

/* ── Admin ── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th {
  text-align: left;
  padding: 0.65rem 1rem;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.admin-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:hover td { background: var(--bg); }

/* ── Filter sidebar ── */
.filter-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; align-items: start; }
.filter-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--school-color);
  padding: 1.25rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  box-shadow: var(--shadow);
  color: var(--card-text);
}
.filter-card h3 { font-size: 0.82rem; font-weight: 700; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.filter-group { margin-bottom: 1.25rem; }
.filter-group label { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; display: block; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 3.5rem 1.5rem; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 2.75rem; margin-bottom: 0.85rem; }
.empty-state h3 { font-size: 1rem; font-weight: 700; color: #111; margin-bottom: 0.35rem; }
.empty-state p  { font-size: 0.875rem; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ── Footer ── */
footer {
  background: #0a1f3d;
  color: rgba(255,255,255,0.45);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.825rem;
  margin-top: 4rem;
}
footer strong { color: rgba(255,255,255,0.85); }
footer a { color: rgba(255,255,255,0.45); }
footer a:hover { color: rgba(255,255,255,0.7); text-decoration: underline; }

/* ── Utilities ── */
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.font-bold   { font-weight: 700; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.hidden { display: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .filter-layout { grid-template-columns: 1fr; }
  .filter-card   { position: static; }
  .chat-layout   { grid-template-columns: 1fr; grid-template-rows: 220px 1fr; }
  .grid-3        { grid-template-columns: repeat(2, 1fr); }
  .grid-4        { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2     { grid-template-columns: 1fr; }
  .grid-3     { grid-template-columns: 1fr; }
  .form-row   { grid-template-columns: 1fr; }
  .hero       { padding: 4rem 1rem 6rem; clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%); }
  .hero-cta   { flex-direction: column; align-items: center; }
  .hero-stat  { padding: 0 1.25rem; }
  .nav-greeting { display: none; }
  .page       { padding: 1.25rem 1rem; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .hero { clip-path: none; }
}

/* ══════════════════════════════════════════════════════════════════
   WHITE CARD TEXT OVERRIDE
   Everything inside a white card must have dark text.
   var(--text) = #fff and var(--primary) = #fff which are invisible
   on white backgrounds — this block overrides all of that.
   ══════════════════════════════════════════════════════════════════ */
.card, .task-card, .stat-card, .app-card,
.filter-card, .auth-card, .convo-list,
.chat-window, .modal-box, .table-card, .chart-card,
.sample-card, .profile-section {
  color: var(--card-text);
}

/* All text elements inside any white card container */
.card h1,.card h2,.card h3,.card h4,.card h5,.card p,.card li,.card label,
.card strong,.card td,.card th,.card div:not([class*="badge"]):not(.btn),
.task-card h1,.task-card h2,.task-card h3,.task-card p,.task-card label,.task-card strong,
.stat-card h1,.stat-card h2,.stat-card h3,.stat-card p,.stat-card label,
.app-card h1,.app-card h2,.app-card h3,.app-card p,.app-card label,.app-card strong,
.filter-card h1,.filter-card h2,.filter-card h3,.filter-card p,.filter-card label,.filter-card li,
.auth-card h1,.auth-card h2,.auth-card h3,.auth-card p,.auth-card label,
.convo-list h1,.convo-list h2,.convo-list h3,.convo-list p,
.chat-window h1,.chat-window h2,.chat-window h3,.chat-window p {
  color: var(--card-text);
}

/* Links inside white cards — use a visible blue instead of white */
.card a:not(.btn),.task-card a:not(.btn),.app-card a:not(.btn),
.filter-card a:not(.btn),.auth-card a:not(.btn),
.convo-list a:not(.btn),.chat-window a:not(.btn),
.profile-section a:not(.btn) {
  color: #1d6aab;
}
.card a:not(.btn):hover,.task-card a:not(.btn):hover {
  color: #1450a3;
}

/* Muted text inside cards */
.card .text-muted, .task-card .text-muted,
.card [style*="text-muted"], .task-card [style*="text-muted"] {
  color: #666 !important;
}
