/* =========================================================
   JobNest – Smart Job Search Portal
   Main stylesheet
   Color system (3-5 colors):
     - Primary brand: Indigo (#4f46e5)
     - Accent: Emerald (#059669) for success/positive
     - Neutrals: white, slate-50 bg, slate-500 muted, slate-900 ink
   Typography:
     - Headings: "Plus Jakarta Sans"
     - Body: "Inter"
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-soft: #eef2ff;
  --accent: #059669;
  --accent-soft: #ecfdf5;

  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --bg: #f6f7fb;

  --danger: #e11d48;
  --danger-soft: #fff1f2;
  --warn: #d97706;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);

  --maxw: 1200px;
  --font-head: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-head);
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
    color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--brand);
}

.btn-outline:hover {
  background: var(--brand-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1.05rem;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--bg);
}

.nav-links a.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--ink);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

/* user chip */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.9rem;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 40px;
  background: radial-gradient(
      1000px 500px at 80% -10%,
      var(--brand-soft),
      transparent 60%
    ),
    var(--surface);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 16px;
}

.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand), #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 26px;
}

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.hero-stats .stat b {
  font-family: var(--font-head);
  font-size: 1.6rem;
  display: block;
  color: var(--ink);
}

.hero-stats .stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-art {
  position: relative;
}

.hero-art .float-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  animation: floaty 5s ease-in-out infinite;
}

.hero-art .float-card:nth-child(2) {
  margin-left: 40px;
  animation-delay: 0.8s;
}

.hero-art .float-card:nth-child(3) {
  margin-left: 12px;
  animation-delay: 1.6s;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ---------- Search box ---------- */
.searchbar {
  margin-top: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search-field:focus-within {
  border-color: var(--brand);
  background: var(--surface);
}

.search-field svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.search-field input,
.search-field select {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  width: 100%;
  color: var(--ink);
  font-family: inherit;
}

/* ---------- Section headers ---------- */
.section {
  padding: 56px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-head p {
  color: var(--muted);
  margin-top: 4px;
}

.link-more {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Chips ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

/* skill tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 500;
}

/* ---------- Job cards grid ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.job-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #c7d2fe;
}

.job-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.company-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}

.job-card h3 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.job-card .company-name {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.save-btn {
  margin-left: auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.save-btn svg {
  width: 20px;
  height: 20px;
}

.save-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.save-btn.saved {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.save-btn.saved svg {
  fill: var(--danger);
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.job-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.job-meta svg {
  width: 15px;
  height: 15px;
}

.job-desc {
  color: var(--muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.pill-type {
  background: var(--accent-soft);
  color: var(--accent);
}

.posted {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Company cards ---------- */
.company-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.company-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #c7d2fe;
}

.company-card .company-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  margin: 0 auto 14px;
  font-size: 1.4rem;
}

.company-card h3 {
  font-size: 1.15rem;
}

.company-card .industry {
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 4px 0;
}

.company-card .c-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

/* ---------- Layout: jobs page ---------- */
.jobs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 26px;
  align-items: start;
  padding: 30px 0 70px;
}

.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.filters-head h3 {
  font-size: 1.05rem;
}

.filter-clear {
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
}

.filter-group {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.filter-group:last-child {
  padding-bottom: 0;
}

.filter-group h4 {
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.check:hover {
  color: var(--ink);
}

.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand);
  cursor: pointer;
}

/* results toolbar */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.results-count {
  font-weight: 600;
}

.results-count b {
  color: var(--brand);
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-wrap select {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
}

.filter-toggle-mobile {
  display: none;
}

.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* horizontal job card variant for list */
.jobs-list .job-card {
  gap: 12px;
}

/* ---------- Search page bar ---------- */
.page-searchbar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1.4fr 1fr auto auto;
  gap: 10px;
  margin-top: 24px;
}

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  background: radial-gradient(
      800px 400px at 90% -20%,
      var(--brand-soft),
      transparent 55%
    ),
    var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 10px;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.page-hero p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 1.05rem;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.22s ease;
  margin: auto 0;
}

.modal-sm {
  max-width: 460px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.modal-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.modal-header .company-logo {
  width: 56px;
  height: 56px;
}

.modal-close {
  margin-left: auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--ink);
}

.modal-body {
  padding: 24px;
}

.modal-title h2 {
  font-size: 1.4rem;
}

.modal-title .company-name {
  color: var(--muted);
  font-weight: 500;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.detail-grid .d-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.detail-grid .d-item b {
  font-size: 0.95rem;
}

.detail-section {
  margin-top: 20px;
}

.detail-section h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.detail-section p {
  color: var(--muted);
}

.detail-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-section ul li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
}

.detail-section ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand);
}

.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.field label .req {
  color: var(--danger);
}

.field input,
.field textarea,
.field select {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.field textarea {
  resize: vertical;
  min-height: 90px;
}

.field .hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.field .error-msg {
  font-size: 0.8rem;
  color: var(--danger);
  display: none;
}

.field.invalid input,
.field.invalid textarea,
.field.invalid select {
  border-color: var(--danger);
}

.field.invalid .error-msg {
  display: block;
}

/* file input */
.file-drop {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-drop:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.file-drop input {
  display: none;
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-side {
  background: linear-gradient(150deg, var(--brand), #6d28d9);
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-side h2 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 14px;
}

.auth-side p {
  opacity: 0.9;
  max-width: 40ch;
}

.auth-side .auth-points {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-side .auth-points li {
  display: flex;
  gap: 12px;
  align-items: center;
}

.auth-side .auth-points .ic {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.auth-card .sub {
  color: var(--muted);
  margin-bottom: 26px;
}

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

.auth-switch a {
  color: var(--brand);
  font-weight: 600;
}

.demo-note {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--brand-soft);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--brand-dark);
  display: flex;
  gap: 8px;
}

/* ---------- Dashboard ---------- */
.dash-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 26px;
  padding: 30px 0 70px;
  align-items: start;
}

.dash-nav {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.dash-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.dash-nav a svg {
  width: 19px;
  height: 19px;
}

.dash-nav a:hover {
  background: var(--bg);
  color: var(--ink);
}

.dash-nav a.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
  align-items: center;
}

.stat-card .ic {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.stat-card .ic svg {
  width: 24px;
  height: 24px;
}

.stat-card .ic.i1 {
  background: var(--brand-soft);
  color: var(--brand);
}

.stat-card .ic.i2 {
  background: var(--danger-soft);
  color: var(--danger);
}

.stat-card .ic.i3 {
  background: var(--accent-soft);
  color: var(--accent);
}

.stat-card .ic.i4 {
  background: #fef3c7;
  color: var(--warn);
}

.stat-card .num {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}

.stat-card .lbl {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.panel-head h2 {
  font-size: 1.2rem;
}

/* progress bar */
.progress {
  height: 10px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #7c3aed);
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* application rows */
.app-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.app-row:last-child {
  border-bottom: none;
}

.app-row .company-logo {
  width: 44px;
  height: 44px;
}

.app-row .app-info {
  flex: 1;
  min-width: 0;
}

.app-row .app-info h4 {
  font-size: 1rem;
  font-family: var(--font-body);
}

.app-row .app-info span {
  color: var(--muted);
  font-size: 0.85rem;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fef3c7;
  color: var(--warn);
  white-space: nowrap;
}

/* ---------- Profile ---------- */
.profile-header {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-header .avatar-lg {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-head);
  overflow: hidden;
  flex-shrink: 0;
}

.profile-header .avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag-input-row {
  display: flex;
  gap: 8px;
}

.removable-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 5px 8px 5px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.removable-tag button {
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.removable-tag button:hover {
  background: rgba(79, 70, 229, 0.18);
}

/* ---------- Resume preview ---------- */
.resume-doc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 40px;
  color: #1e293b;
  box-shadow: var(--shadow-sm);
}

.resume-doc h1 {
  font-size: 1.8rem;
  color: var(--brand);
}

.resume-doc .r-title {
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.resume-doc .r-contact {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--brand);
  margin-bottom: 18px;
}

.resume-doc .r-section {
  margin-bottom: 18px;
}

.resume-doc .r-section h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  margin-bottom: 10px;
}

.resume-doc .r-item {
  margin-bottom: 10px;
}

.resume-doc .r-item strong {
  display: block;
}

.resume-doc .r-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 56px 20px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.empty .empty-ic {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
}

.empty .empty-ic svg {
  width: 34px;
  height: 34px;
}

.empty h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
  color: var(--ink);
}

.empty p {
  margin-bottom: 18px;
}

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--ink);
  color: #fff;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s ease;
  max-width: 340px;
}

.toast.success {
  background: var(--accent);
}

.toast.error {
  background: var(--danger);
}

.toast svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 48px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 32px;
}

.site-footer .logo {
  color: #fff;
  margin-bottom: 12px;
}

.site-footer .logo span {
  color: #a5b4fc;
}

.site-footer p {
  font-size: 0.9rem;
  max-width: 34ch;
  color: #94a3b8;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 14px;
  font-family: var(--font-body);
}

.footer-col a {
  display: block;
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

/* ---------- Utilities ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 0.5s ease forwards;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mt-0 {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* =========================================================
   Auth pages (login / register)
   ========================================================= */
.auth-main {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-shell {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.auth-aside {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 48px 40px;
  display: flex;
  align-items: center;
}
.auth-aside-inner .logo,
.auth-aside-inner .logo span {
  color: #fff;
}
.auth-aside .logo-lg {
  font-size: 1.6rem;
  margin-bottom: 32px;
}
.auth-aside .logo-lg .logo-mark {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.auth-aside h2 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin-bottom: 12px;
}
.auth-aside p {
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 28px;
}
.auth-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
}
.auth-points li span {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.auth-points li span svg {
  width: 15px;
  height: 15px;
}
.auth-panel {
  padding: 48px 44px;
  display: flex;
  align-items: center;
}
.auth-form-wrap {
  width: 100%;
}
.auth-form-wrap h1 {
  font-size: 1.7rem;
  margin-bottom: 6px;
}
.auth-sub {
  color: var(--muted);
  margin-bottom: 28px;
}
.auth-form-wrap form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field-error {
  display: none;
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 6px;
}
.field.invalid .field-error {
  display: block;
}
.btn-block {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}
.auth-switch {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.auth-switch a {
  color: var(--brand);
  font-weight: 600;
}
.auth-hint {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  text-align: center;
}

/* =========================================================
   Dashboard
   ========================================================= */
.dash-hero {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 48px 0 56px;
}
.dash-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.dash-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 6px;
}
.dash-hero h1 {
  font-size: 2rem;
  color: #fff;
}
.dash-sub {
  color: rgba(255, 255, 255, 0.85);
  margin-top: 6px;
}
.dash-hero-actions {
  display: flex;
  gap: 12px;
}
.dash-hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.dash-hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}
.section-tight {
  padding: 28px 0;
}
.dash-hero + .section-tight {
  margin-top: -34px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.dash-hero + .section-tight .stat-card {
  box-shadow: var(--shadow-md);
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-ic {
  display: inline-flex;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
.stat-ic svg {
  width: 22px;
  height: 22px;
}
.stat-indigo .stat-ic { background: var(--brand-soft); color: var(--brand); }
.stat-rose .stat-ic { background: var(--danger-soft); color: var(--danger); }
.stat-amber .stat-ic { background: #fff7ed; color: var(--warn); }
.stat-green .stat-ic { background: var(--accent-soft); color: var(--accent); }
.stat-value {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
}
.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Columns */
.dash-columns {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
.dash-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}
.link-sm {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.88rem;
}

/* Applications list */
.apps-list {
  display: flex;
  flex-direction: column;
}
.app-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.app-row:last-child {
  border-bottom: none;
}
.app-main {
  flex: 1;
  min-width: 0;
}
.app-main h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}
.app-date {
  font-size: 0.8rem;
  color: var(--muted);
}
.app-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted);
}
.status-applied { background: var(--brand); }
.status-under-review { background: var(--warn); }
.status-interview { background: #7c3aed; }
.status-offer { background: var(--accent); }
.status-rejected { background: var(--danger); }
.status-select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}
.icon-btn svg {
  width: 16px;
  height: 16px;
}

/* Profile strength */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}
.progress-ring {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--brand) 0%, var(--line) 0);
}
.progress-ring span {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
}
.progress-wrap .btn {
  margin-top: 12px;
}

/* Saved mini list */
.saved-mini {
  display: flex;
  flex-direction: column;
}
.saved-mini-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.saved-mini-row:last-child {
  border-bottom: none;
}
.saved-mini-row:hover h4 {
  color: var(--brand);
}
.saved-mini-row h4 {
  font-size: 0.92rem;
  margin-bottom: 1px;
}
.mini-logo,
.app-logo {
  width: 40px;
  height: 40px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Shared empty-state (dashboard, saved jobs, profile) */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}
.empty-icon {
  display: inline-flex;
  width: 60px;
  height: 60px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 16px;
}
.empty-icon svg {
  width: 28px;
  height: 28px;
}
.empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.empty-state p {
  color: var(--muted);
  max-width: 360px;
  margin: 0 auto 18px;
}
