/* =============================================================================
   Apply Command — Main Stylesheet
   ============================================================================= */

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

:root {
  --bg:           #ffffff;
  --surface:      #f8f9fc;
  --surface-2:    #f0f2f7;
  --border:       #e2e5ed;
  --accent:       #4f6ef7;
  --accent-hover: #3d5ce0;
  --green:        #16a34a;
  --yellow:       #ca8a04;
  --red:          #dc2626;
  --text:         #111827;
  --text-muted:   #6b7280;
  --text-dim:     #4b5563;
  --radius:       10px;
  --radius-sm:    6px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =============================================================================
   NAV
   ============================================================================= */

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.15s;
}

.nav-links a:hover {
  color: #fff;
  text-decoration: none;
}

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background 0.15s !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  text-decoration: none !important;
}

/* =============================================================================
   HERO
   ============================================================================= */

.hero {
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(79, 110, 247, 0.1);
  border: 1px solid rgba(79, 110, 247, 0.25);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--border); color: #fff; }

.btn-lg { padding: 0.9rem 2.2rem; font-size: 1.05rem; }

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =============================================================================
   HOW IT WORKS
   ============================================================================= */

.section {
  padding: 5rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.section-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 3rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(79, 110, 247, 0.15);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =============================================================================
   WHAT WE ANALYZE
   ============================================================================= */

.modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.module-icon {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.module-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.4rem;
}

.module-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =============================================================================
   DIVIDER
   ============================================================================= */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* =============================================================================
   CTA SECTION
   ============================================================================= */

.cta-section {
  text-align: center;
  padding: 6rem 1.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* =============================================================================
   FOOTER
   ============================================================================= */

footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* =============================================================================
   SCORE PAGE
   ============================================================================= */

.score-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.score-page h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.score-page .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

.card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

input[type=file],
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  margin-bottom: 1.25rem;
  transition: border-color 0.15s;
}

input[type=file]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea { resize: vertical; }

.form-submit {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.form-submit:hover { background: var(--accent-hover); }

.upload-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: -1rem;
  margin-bottom: 1.25rem;
}

/* =============================================================================
   RESULTS PAGE
   ============================================================================= */

.results-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.decision-banner {
  text-align: center;
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.decision-banner.proceed { border-color: var(--green); background: rgba(22,163,74,0.06); }
.decision-banner.maybe   { border-color: var(--yellow); background: rgba(202,138,4,0.06); }
.decision-banner.dna     { border-color: var(--red); background: rgba(220,38,38,0.06); }

.decision-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.proceed .decision-label { color: var(--green); }
.maybe   .decision-label { color: var(--yellow); }
.dna     .decision-label { color: var(--red); }

.decision-score {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}

.proceed .decision-score { color: var(--green); }
.maybe   .decision-score { color: var(--yellow); }
.dna     .decision-score { color: var(--red); }

.decision-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.decision-description {
  font-size: 0.92rem;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto;
}

.target-title-pill {
  display: inline-block;
  font-size: 0.78rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

/* Module scores grid */
.module-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.module-score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.module-score-card .module-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.module-score-card .module-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.score-high  { color: var(--green); }
.score-mid   { color: var(--yellow); }
.score-low   { color: var(--red); }

.module-score-card .module-bar {
  height: 3px;
  background: var(--border);
  border-radius: 999px;
  margin-top: 0.75rem;
  overflow: hidden;
}

.module-score-card .module-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* Keyword lists */
.keyword-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 580px) { .keyword-lists { grid-template-columns: 1fr; } }

.keyword-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.keyword-box h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.keyword-box.matched h3 { color: var(--green); }
.keyword-box.missing h3 { color: var(--red); }

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 500;
}

.tag-matched {
  background: rgba(22,163,74,0.08);
  color: var(--green);
  border: 1px solid rgba(22,163,74,0.2);
}

.tag-missing {
  background: rgba(220,38,38,0.08);
  color: var(--red);
  border: 1px solid rgba(220,38,38,0.2);
}

.tag-neutral {
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* Action bar */
.action-bar {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Error */
.error-box {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: #fca5a5;
  font-size: 0.9rem;
}

/* =============================================================================
   NAV ACTIONS
   ============================================================================= */

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-email {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.nav-text-link {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.nav-text-link:hover { color: var(--text); text-decoration: none; }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.88rem; }

/* =============================================================================
   FLASH MESSAGES
   ============================================================================= */

.flash-container {
  max-width: 700px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.flash-error {
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.25);
  color: #b91c1c;
}

.flash-success {
  background: rgba(22,163,74,0.08);
  border: 1px solid rgba(22,163,74,0.25);
  color: #15803d;
}

/* =============================================================================
   AUTH PAGES
   ============================================================================= */

.auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 1.5rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

/* =============================================================================
   SAVE BANNER
   ============================================================================= */

.save-banner {
  background: rgba(22,163,74,0.08);
  border: 1px solid rgba(22,163,74,0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: #15803d;
  margin-bottom: 1rem;
}

.save-banner-anon {
  background: rgba(79,110,247,0.06);
  border-color: rgba(79,110,247,0.2);
  color: var(--text-dim);
}

.save-banner-anon a { color: var(--accent); }

/* =============================================================================
   TRACKER PAGE
   ============================================================================= */

.tracker-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.tracker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}

.tracker-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.tracker-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tracker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.tracker-table thead {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.tracker-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

.tracker-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.tracker-table tr:last-child td { border-bottom: none; }
.tracker-table tr:hover td { background: var(--surface); }

.score-pill, .decision-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
}

.pill-green  { background: rgba(22,163,74,0.1);  color: var(--green); border: 1px solid rgba(22,163,74,0.2); }
.pill-yellow { background: rgba(202,138,4,0.1);  color: var(--yellow); border: 1px solid rgba(202,138,4,0.2); }
.pill-red    { background: rgba(220,38,38,0.1);  color: var(--red); border: 1px solid rgba(220,38,38,0.2); }

.col-green  { color: var(--green); font-weight: 600; }
.col-yellow { color: var(--yellow); font-weight: 600; }
.col-red    { color: var(--red); font-weight: 600; }
.col-muted  { color: var(--text-muted); }

.outcome-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  background: var(--bg);
  color: var(--text);
}

.outcome-pending   { color: var(--text-muted); }
.outcome-interview { color: var(--accent); border-color: var(--accent); }
.outcome-offer     { color: var(--green); border-color: var(--green); }
.outcome-rejected  { color: var(--red); border-color: var(--red); }

.delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
}

.delete-btn:hover { color: var(--red); background: rgba(220,38,38,0.08); }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-state p { margin-bottom: 0.5rem; }

/* Responsive */
@media (max-width: 640px) {
  nav { padding: 1rem; }
  .nav-links { display: none; }
  .hero { padding: 4rem 1rem 3rem; }
  .tracker-header { flex-direction: column; }
}
