/* ---- Tokens ---- */
:root {
  --navy: #142A4C;
  --navy-dark: #0D1D34;
  --paper: #EFF2F6;
  --panel: #FFFFFF;
  --ink: #1B2430;
  --ink-soft: #4B5768;
  --line: #D8DEE6;
  --amber: #E2A63B;
  --amber-dark: #C68A22;
  --green: #1F7A5C;
  --red: #B23A3A;

  --font-display: "Space Grotesk", "IBM Plex Sans", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, sans-serif;

  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-dark);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }

a { color: var(--navy); }

button, input, select, textarea { font-family: inherit; font-size: 1rem; }

:focus-visible {
  outline: 2px solid var(--amber-dark);
  outline-offset: 2px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Nav ---- */
.nav-utility {
  background: var(--navy-dark);
  color: #C7D0DE;
  font-size: 0.8rem;
}
.nav-utility-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 24px;
}
.nav-utility-inner a { color: #C7D0DE; text-decoration: none; }
.nav-utility-inner a:hover { color: var(--amber); }
@media (max-width: 700px) { .nav-utility-inner span { display: none; } }

.nav {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1120px;
  margin: 0 auto;
  gap: 20px;
}
.nav-menu {
  display: flex;
  gap: 24px;
  align-items: center;
  flex: 1;
  justify-content: center;
}
.nav-menu a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}
.nav-menu a:hover { color: var(--navy-dark); }
@media (max-width: 880px) { .nav-menu { display: none; } }

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 6px; right: 6px; top: 13px;
  height: 2px;
  background: var(--amber);
}
.nav-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.nav-user { font-size: 0.9rem; color: var(--navy-dark); margin-right: 8px; }
.nav-user-role { color: var(--ink-soft); font-weight: 400; text-transform: capitalize; }

/* ---- Hero banner (photo) ---- */
.hero-banner {
  width: 100%;
  line-height: 0;
  background: var(--navy-dark);
  overflow: hidden;
  max-height: 460px;
}
.hero-banner img {
  width: 100%;
  height: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: var(--navy-dark); }
.btn-primary:hover { background: var(--amber-dark); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: transparent; }
.btn-ghost:hover { background: rgba(20,42,76,0.06); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-success { background: transparent; border-color: var(--green); color: var(--green); }
.btn-success:hover { background: var(--green); color: #fff; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---- Hero ---- */
.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-tag {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--navy);
  background: rgba(20,42,76,0.07);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero-ctas { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* Journey diagram - a real product sequence, not decoration */
.journey {
  background: var(--navy-dark);
  border-radius: 10px;
  padding: 32px 28px;
  color: #fff;
}
.journey-title { font-size: 0.85rem; color: #A9B8CC; margin-bottom: 20px; }
.journey-steps { display: flex; flex-direction: column; gap: 0; }
.journey-step {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  position: relative;
}
.journey-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px; top: 40px; bottom: -4px;
  width: 1px;
  background: rgba(255,255,255,0.18);
}
.journey-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--navy-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  flex-shrink: 0;
}
.journey-step h4 { color: #fff; margin: 0 0 2px; font-size: 1rem; }
.journey-step p { color: #A9B8CC; margin: 0; font-size: 0.88rem; }

/* ---- Sections ---- */
.section { padding: 64px 0; }
.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.section-split.three-up { grid-template-columns: 1fr 1fr 1fr; }
.section-split.four-up { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1080px) { .section-split.four-up { grid-template-columns: 1fr 1fr; } }
@media (max-width: 880px) { .section-split, .section-split.three-up, .section-split.four-up { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

/* Each audience column is a flex-column group of two boxes (text card +
   button card), so the pairing stays correct at every breakpoint - 1, 2,
   or 4 columns wide (a flattened single-grid version was tried and broke
   this: at 2 columns, 4 text cards spill across 2 rows, and the button
   cards that follow in DOM order land 2 rows below their OWN text card
   instead of directly under it). Keeping each pair inside one grid item
   avoids that entirely. CSS Grid stretches each "audience-group" grid
   item to the row's tallest column; flex:1 on the text card lets it
   absorb that extra height, and a fixed height on the button card (see
   below) keeps every button box identical regardless of whether that
   column's button label wraps to 1 or 2 lines. */
.audience-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel-audience {
  padding: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.panel-audience h3 { display: flex; align-items: center; gap: 10px; }
.audience-dot { width: 10px; height: 10px; border-radius: 50%; }
.audience-dot.company { background: var(--navy); }
.audience-dot.aspirant { background: var(--amber); }
.audience-dot.trainer { background: var(--green); }
.audience-dot.university { background: #6B4FA3; }
.panel-audience ul { margin: 16px 0 0; padding-left: 20px; color: var(--ink-soft); }
.panel-audience li { margin-bottom: 6px; }

.panel-audience-cta {
  padding: 20px 24px;
  display: flex;
  align-items: center; /* vertically centers a 1-line button within the
                           same fixed-height box as a 2-line button */
  height: 96px;         /* fixed (not min-height) so every button box is
                            identical - "Join as a trainer" fits on one
                            line while the others wrap to two */
  flex: 0 0 auto;        /* locks this box at exactly 96px - never grows
                            or shrinks as part of the flex column above */
  box-sizing: border-box;
}

footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-footer {
  background: var(--navy-dark);
  border-top: 3px solid var(--amber);
  color: #C7D0DE;
  margin-top: 48px;
}
.site-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 24px;
  flex-wrap: wrap;
}
.site-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}
.site-footer-meta {
  text-align: right;
  font-size: 0.85rem;
  line-height: 1.6;
}
.site-footer-meta p { margin: 0; color: #A9B8CC; max-width: none; }
.site-footer-meta a { color: var(--amber); text-decoration: none; }
.site-footer-meta a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .site-footer-inner { flex-direction: column; }
  .site-footer-meta { text-align: left; }
}

/* ---- Forms ---- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 90px; }
.field-hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; }
.form-row { display: flex; gap: 12px; }
.form-row .field { flex: 1; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
}
.tab.active { color: var(--navy-dark); border-bottom-color: var(--amber); }

.auth-shell {
  max-width: 440px;
  margin: 48px auto;
}
.auth-toggle { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.auth-toggle button {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap; /* "Log in" has a space and would otherwise wrap
                           to 2 lines while the single-word buttons next
                           to it (Aspirant, Company...) can't wrap and
                           stay wide - this kept "Log in" shrunk shorter
                           and taller than the rest */
}
.auth-toggle button.active { border-color: var(--navy); color: var(--navy); background: rgba(20,42,76,0.05); }

/* ---- Dashboard shell ---- */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

.list-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
}
.list-item-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}
.list-item h4 { margin: 0 0 4px; }
.list-item-meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 8px; }
.list-item-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-applied { background: rgba(20,42,76,0.08); color: var(--navy); }
.badge-shortlisted { background: rgba(226,166,59,0.18); color: var(--amber-dark); }
.badge-selected { background: rgba(31,122,92,0.14); color: var(--green); }
.badge-rejected { background: rgba(178,58,58,0.1); color: var(--red); }
.badge-completed { background: rgba(31,122,92,0.14); color: var(--green); }
.badge-ongoing { background: rgba(226,166,59,0.18); color: var(--amber-dark); }
.badge-scheduled { background: rgba(20,42,76,0.08); color: var(--navy); }
.badge-score { background: var(--navy-dark); color: #fff; }

.skill-chip {
  display: inline-block;
  font-size: 0.78rem;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  margin: 2px 4px 2px 0;
}

.banner {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.92rem;
}
.banner-warn { background: rgba(226,166,59,0.14); border: 1px solid rgba(226,166,59,0.4); color: var(--amber-dark); }
.banner-error { background: rgba(178,58,58,0.08); border: 1px solid rgba(178,58,58,0.3); color: var(--red); }
.banner-success { background: rgba(31,122,92,0.1); border: 1px solid rgba(31,122,92,0.3); color: var(--green); }

.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.activity-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.activity-row:last-child { border-bottom: none; }
.activity-time { color: var(--ink-soft); white-space: nowrap; margin-left: 12px; }

/* ---- Admin: stat cards & simple bar charts ---- */
.stat-card {
  padding: 24px;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.stat-card .stat-sub {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.bar-row .bar-label {
  width: 90px;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-transform: capitalize;
}
.bar-row .bar-track {
  flex: 1;
  background: var(--paper);
  border-radius: 4px;
  height: 20px;
  overflow: hidden;
  display: flex;
}
.bar-row .bar-fill-a { background: var(--navy); height: 100%; }
.bar-row .bar-fill-b { background: var(--amber); height: 100%; }
.bar-row .bar-value {
  width: 110px;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-dark);
  text-align: right;
}
.bar-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.bar-legend span { display: flex; align-items: center; gap: 6px; }
.bar-legend .dot { width: 10px; height: 10px; border-radius: 2px; }
.bar-legend .dot.a { background: var(--navy); }
.bar-legend .dot.b { background: var(--amber); }

.hidden { display: none !important; }

.spinner-text { color: var(--ink-soft); font-size: 0.9rem; padding: 20px 0; }

/* ---- Courses: pricing row, syllabus display, syllabus builder ---- */
.course-pricing {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  font-weight: 700;
  color: var(--navy-dark);
  font-size: 0.95rem;
}
.course-pricing .field-hint { font-weight: 400; margin-left: 2px; }

.syllabus-block {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.syllabus-day {
  display: flex;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.syllabus-day:last-child { border-bottom: none; }
.syllabus-day-num {
  flex-shrink: 0;
  width: 64px;
  font-weight: 700;
  color: var(--navy-dark);
  font-size: 0.88rem;
}
.syllabus-day-body { flex: 1; }
.syllabus-day-hours {
  font-size: 0.78rem;
  color: var(--amber-dark);
  font-weight: 600;
  margin-bottom: 2px;
}

.syllabus-builder-row {
  display: grid;
  grid-template-columns: 70px 110px 1fr;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.syllabus-builder-day {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-dark);
}
.syllabus-builder-row input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.88rem;
}
@media (max-width: 600px) {
  .syllabus-builder-row { grid-template-columns: 1fr; }
}
