:root { --radius: 14px; --shadow-1: 0 6px 18px rgba(0,0,0,.12); --focus: 0 0 0 .2rem rgba(99,102,241,.25); }
html[data-theme="light"] {
  --bg-1:#f6f7fb; --bg-2:#ffffff; --line:#e6e9f3; --text-1:#0b1220; --text-2:#4a5568;
  --accent:#3b82f6; --accent-2:#6366f1; --muted:#7a869e;
}
html[data-theme="dark"] {
  --bg-1:#0a0f1d; --bg-2:#0f172a; --line:#1e293b; --text-1:#eaf0ff; --text-2:#a8b1c7;
  --accent:#60a5fa; --accent-2:#818cf8; --muted:#90a0bb;
}
html,body { background: var(--bg-1); color: var(--text-1); }
.navbar { background: var(--bg-1); }
.navbar, .card, .form-control, .form-select, .list-group-item { border-color: var(--line)!important; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
a, .btn-link { color: var(--accent); }
.btn-primary { background: var(--accent)!important; border: none!important; color: #fff!important; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-outline-secondary { color: var(--text-1); border-color: var(--line); background: transparent; }
.btn-outline-secondary:hover { background: color-mix(in oklab, var(--accent) 10%, transparent); }
label.form-label { color: var(--text-2); }
.form-control, .form-select {
  background: color-mix(in oklab, var(--bg-2) 95%, black 0%);
  color: var(--text-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.form-control:focus, .form-select:focus { box-shadow: var(--focus); border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
.form-control::placeholder { color: var(--muted); opacity: 1; }
/* Auth legibility */
.auth .form-label { color: var(--text-1)!important; font-weight: 600; }
.auth .form-control[type="password"],
.auth .form-control[type="email"],
.auth .form-control[type="text"] {
  color: var(--text-1)!important;
  background: color-mix(in oklab, var(--bg-2) 92%, black 0%)!important;
}
/* Hero glow tighter and subtler */
.hero-wrap { background:
  radial-gradient(220px 130px at 14% 0%, color-mix(in oklab, var(--accent) 13%, transparent), transparent 62%),
  radial-gradient(220px 130px at 86% 8%, color-mix(in oklab, var(--accent-2) 11%, transparent), transparent 58%),
  linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}
/* Badges */
.badge.status-applied { background-color: color-mix(in oklab, var(--accent) 35%, white); color:#0b1220; }
.badge.status-viewed { background-color: color-mix(in oklab, var(--accent-2) 30%, white); color:#0b1220; }
.badge.status-shortlisted { background-color: color-mix(in oklab, var(--accent-2) 45%, white); color:#0b1220; }
.badge.status-rejected { background-color: #ef4444; color: #fff; }
.badge.status-hired { background-color: #10b981; color: #0b1220; }
.badge.status-withdrawn { background-color: #94a3b8; color: #0b1220; }

/* ===== Dark mode form readability ===== */

html[data-theme='dark'] body {
  color: #e5e7eb; /* light gray text */
}

/* Cards */
html[data-theme='dark'] .card {
  background-color: #020617;   /* very dark */
  border-color: #111827;
}

/* Labels */
html[data-theme='dark'] .form-label {
  color: #e5e7eb;
}

/* Inputs / selects */
html[data-theme='dark'] .form-control,
html[data-theme='dark'] .form-select {
  background-color: #020617;
  color: #e5e7eb;
  border-color: #374151;
}

html[data-theme='dark'] .form-control::placeholder {
  color: #6b7280;
}

/* Read-only/plaintext email field */
html[data-theme='dark'] .form-control-plaintext {
  color: #e5e7eb;
}

/* Muted text (help text, subtitles) */
html[data-theme='dark'] .text-muted {
  color: #9ca3af !important;
}
/* === Dark mode polish for Account > Resumes === */

html[data-theme='dark'] .card {
  background-color: #020617;
  border-color: #111827;
}

/* Resume list items */
html[data-theme='dark'] .card .list-group-item {
  background-color: #020617;
  border-color: #111827;
  color: #e5e7eb;
}

/* Small muted text (uploaded date, size, helper text) */
html[data-theme='dark'] .card .small,
html[data-theme='dark'] .card .text-muted {
  color: #9ca3af !important;
}

/* "View" / "Delete" outline buttons inside resumes */
html[data-theme='dark'] .card .btn.btn-outline-secondary,
html[data-theme='dark'] .card .btn.btn-outline-danger {
  color: #e5e7eb;
  border-color: #4b5563;
}

html[data-theme='dark'] .card .btn.btn-outline-secondary:hover,
html[data-theme='dark'] .card .btn.btn-outline-danger:hover {
  background-color: #111827;
  border-color: #6b7280;
}

/* File input + selects inside Account */
html[data-theme='dark'] .card .form-control,
html[data-theme='dark'] .card .form-select {
  background-color: #020617;
  color: #e5e7eb;
  border-color: #374151;
}

html[data-theme='dark'] .card .form-control::file-selector-button {
  background-color: #111827;
  border-color: #374151;
  color: #e5e7eb;
}
/* Dark mode polish for Company locations block */
[data-bs-theme="dark"] .company-locations-card {
  background-color: #020617;      /* match your other cards */
  border-color: #1f2937;
}

[data-bs-theme="dark"] .company-location-add-form {
  background-color: #020617;
  border-color: #1f2937;
}

[data-bs-theme="dark"] .company-location-item {
  background-color: transparent;
  border-color: #1f2937;
}

/* Landing page refinements */
.section-pad {
  padding: 3.5rem 0;
}
@media (min-width: 992px) {
  .section-pad {
    padding: 4.5rem 0;
  }
}
.bg-subtle {
  background: color-mix(in oklab, var(--bg-1) 80%, var(--bg-2));
}
.bg-soft-accent {
  background-color: color-mix(in oklab, var(--accent) 12%, #ffffff);
}
.text-accent {
  color: var(--accent);
}
.hero-card {
  border-radius: var(--radius);
}
/* Mapbox map legibility */
#map {
  background-color: var(--bg-1);
}

html[data-theme="light"] .mapboxgl-popup-content,
html[data-theme="light"] .mapboxgl-ctrl,
html[data-theme="light"] .mapboxgl-ctrl-group {
  background-color: #ffffff;
  color: #111827;
}

html[data-theme="dark"] .mapboxgl-popup-content,
html[data-theme="dark"] .mapboxgl-ctrl,
html[data-theme="dark"] .mapboxgl-ctrl-group {
  background-color: color-mix(in oklab, var(--bg-2) 92%, #000000 8%);
  color: var(--text-1);
  border-color: var(--line);
}

html[data-theme="dark"] .mapboxgl-popup-tip {
  border-top-color: color-mix(in oklab, var(--bg-2) 92%, #000000 8%);
  border-bottom-color: color-mix(in oklab, var(--bg-2) 92%, #000000 8%);
}

.mapboxgl-popup-content a {
  color: var(--accent);
}
/* Improve list-group readability in dark mode */
html[data-theme="dark"] .list-group-item {
  background-color: var(--bg-2);
  color: var(--text-1);
}

html[data-theme="dark"] .list-group-item .small,
html[data-theme="dark"] .list-group-item .text-muted {
  color: var(--text-2);
}

html[data-theme="dark"] .list-group-item-action:hover,
html[data-theme="dark"] .list-group-item-action:focus {
  background-color: color-mix(in oklab, var(--bg-2) 80%, var(--accent) 20%);
}

/* Mobile ATS pipeline tweaks */
@media (max-width: 767.98px) {
  .ats-pipeline-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    gap: 0.75rem;
  }

  .ats-pipeline-row > [class*="col-"] {
    flex: 0 0 80vw; /* each column ~80% of viewport width */
    max-width: 80vw;
  }

  .ats-pipeline-row .card {
    height: auto; /* allow cards to grow naturally */
  }

  .ats-app-card .card-body {
    padding: 0.5rem 0.75rem;
  }

  .ats-app-card .fw-semibold {
    font-size: 0.95rem;
  }

  .ats-app-card small {
    font-size: 0.8rem;
  }
}

/* Make drag targets visually separated */
.ats-stage-column {
  min-height: 60px;
}

.ats-stage-column .ats-app-card {
  cursor: grab;
}
@media (max-width: 767.98px) {
  .ats-application-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .ats-application-header .btn {
    width: 100%;
    text-align: center;
  }

  .ats-application-stage-badge {
    margin-bottom: 0.75rem;
  }

  .ats-application-notes textarea {
    font-size: 0.9rem;
  }

  .ats-application-notes button {
    width: 100%;
  }
}