/* =========================
   NEXTUMAX MAIN PLATFORM
   Industry / startup-ready frontend
========================= */

:root {
  --bg: #07100d;
  --panel: #0d1a15;
  --card: #102019;
  --card-strong: #172a22;
  --surface-input: #0a1712;
  --surface-hover: #193329;
  --border: rgba(174, 222, 198, 0.2);
  --text: #f5fff9;
  --muted: #a9beb4;
  --accent: #2ee58b;
  --accent-2: #1ac7a1;
  --danger: #ff6b6b;
  --warn: #f8c96b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius: 24px;
  --max: 1180px;
  --page-gutter: clamp(48px, 5.8vw, 104px);
  --header-bg: #07100d;
  --header-surface: #0d1a15;
  --header-border: rgba(174, 222, 198, 0.2);
  --header-text: #f5fff9;
  --header-muted: #a9beb4;
  --header-hover: #102019;
  --soft-action: #74d9a6;
  --soft-action-hover: #8ee4b8;
}

[data-theme="light"] {
  --bg: #eaf7ef;
  --panel: #dff2e7;
  --card: #f4fbf7;
  --card-strong: #deeee5;
  --surface-input: #ffffff;
  --surface-hover: #d2eadf;
  --border: rgba(6, 74, 41, 0.25);
  --text: #071c13;
  --muted: #435f51;
  --accent: #0ca866;
  --accent-2: #0891b2;
  --shadow: 0 24px 60px rgba(14, 90, 55, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(46, 229, 139, 0.14), transparent 32%),
    radial-gradient(circle at top right, rgba(26, 199, 161, 0.10), transparent 28%),
    linear-gradient(135deg, var(--bg), var(--panel));
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--accent);
  outline-color: color-mix(in srgb, var(--accent) 72%, white);
  outline-offset: 3px;
}

:where(button, .primary-btn, .outline-btn, .danger-btn, .locked-btn, .dash-card) {
  touch-action: manipulation;
}

.skip-link {
  position: absolute;
  top: -70px;
  left: 16px;
  background: var(--accent);
  color: #03140b;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  z-index: 999;
}
.skip-link:focus { top: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--header-border);
}
[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(12, 168, 102, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(8, 145, 178, 0.10), transparent 30%),
    linear-gradient(135deg, var(--bg), var(--panel));
}

[data-theme="light"] .topbar {
  background: var(--header-bg);
  border-bottom-color: var(--header-border);
}

[data-theme="light"] #homePage .mini-label {
  background: rgba(12, 168, 102, 0.11);
  border-color: rgba(12, 168, 102, 0.24);
  color: #075f3b;
}

[data-theme="light"] #homePage .outline-btn {
  background: rgba(255, 255, 255, 0.48);
  border-color: rgba(6, 74, 41, 0.22);
  box-shadow: 0 12px 30px rgba(14, 90, 55, 0.08);
}

[data-theme="light"] #homePage .ai-hero-btn {
  background: linear-gradient(135deg, rgba(12, 168, 102, 0.14), rgba(8, 145, 178, 0.08));
  border-color: rgba(12, 168, 102, 0.34);
  box-shadow: 0 12px 30px rgba(14, 90, 55, 0.08);
}

.nav {
  width: min(var(--max), calc(100% - var(--page-gutter)));
  min-height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand strong {
  font-size: 1.62rem;
  letter-spacing: 0;
  line-height: 1;
  color: var(--header-text);
}

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

.page-back-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.page-back-row {
  margin: 0 0 44px;
}

.nav-links button,
.nav-links a,
.theme-btn,
.menu-btn {
  border: 1px solid var(--header-border);
  background: transparent;
  color: var(--header-muted);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 750;
  text-decoration: none;
}

.nav-links button:hover,
.nav-links a:hover,
.theme-btn:hover,
.menu-btn:hover {
  background: var(--header-hover);
  color: var(--header-text);
}

.menu-btn { display: none; margin-left: auto; }

.icon-theme-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 1.18rem;
  line-height: 1;
}

.page {
  display: none;
  width: min(var(--max), calc(100% - var(--page-gutter)));
  margin: 0 auto;
  padding: 34px 0 64px;
}
.page.active { display: block; }

.page.page-entering {
  animation: page-enter 0.22s ease both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

.mini-label {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--accent);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 850;
  font-size: 0.84rem;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { overflow-wrap: break-word; }

.primary-btn,
.outline-btn,
.danger-btn,
.locked-btn {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 20px;
  border: 0;
  font-weight: 900;
  transition: 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn { background: var(--accent); color: #03140b; }
.outline-btn { border: 1px solid var(--border); background: var(--card); color: var(--text); }
.ai-hero-btn {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 20px;
  border: 1px solid rgba(46, 229, 139, 0.58);
  background: linear-gradient(135deg, rgba(46, 229, 139, 0.18), rgba(26, 199, 161, 0.08));
  color: var(--text);
  font-weight: 950;
  transition: 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 34px rgba(46, 229, 139, 0.08);
}
.danger-btn { background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.28); color: var(--danger); }
.locked-btn { background: rgba(248, 201, 107, 0.12); border: 1px solid rgba(248, 201, 107, 0.28); color: var(--warn); }

.primary-btn:hover, .outline-btn:hover, .ai-hero-btn:hover, .danger-btn:hover, .locked-btn:hover, .dash-card:hover { transform: translateY(-2px); }
.full { width: 100%; }

.hero {
  min-height: calc(100vh - 110px);
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(340px, 0.78fr);
  gap: 42px;
  align-items: center;
  padding: 18px 0 48px;
}

.hero h1,
.auth-info h1,
.dashboard-top h1 {
  font-size: 4.8rem;
  line-height: 0.96;
  letter-spacing: 0;
  margin: 18px 0;
}

.hero p,
.auth-info p,
.dashboard-top p,
.dash-card p,
.inside-panel p,
.operation-grid p,
.product-engine-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

#homePage .hero-actions {
  width: 100%;
  max-width: 760px;
}

/* Main hero card */
.product-engine-card,
.operation-grid article,
.auth-card,
.dash-card,
.inside-panel,
.candidate-card,
.admin-stat-grid article,
.admin-panel,
.admin-item,
.admin-empty,
.engine-step,
.engine-stat,
.access-policy article {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.product-engine-card {
  padding: 22px;
  background:
    radial-gradient(circle at 70% 20%, rgba(46, 229, 139, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)),
    var(--card);
}

.engine-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.engine-top span {
  color: var(--accent);
  font-weight: 950;
}

.engine-top strong {
  display: block;
  margin-top: 6px;
  font-size: 1.28rem;
}

.engine-badge {
  border: 1px solid rgba(46, 229, 139, 0.24);
  background: rgba(46, 229, 139, 0.09);
  color: var(--accent);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 950;
  white-space: nowrap;
}

.engine-diagram {
  display: grid;
  gap: 10px;
}

.engine-step {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  box-shadow: none;
  background: var(--card-strong);
}

.engine-step span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #03140b;
  font-weight: 950;
}

.engine-step strong { display: block; }
.engine-step small { color: var(--muted); }

.engine-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 14px;
}

.engine-stat {
  padding: 13px;
  box-shadow: none;
  text-align: center;
}

.engine-stat strong, .engine-stat span { display: block; }
.engine-stat strong { color: var(--accent); font-size: 1.2rem; }
.engine-stat span { color: var(--muted); font-size: 0.78rem; }

.platform-section { padding: 38px 0; }

.section-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: 3.1rem;
  letter-spacing: 0;
  margin: 14px 0 10px;
}

.section-head p {
  color: var(--muted);
  line-height: 1.75;
}

.operation-grid,
.access-policy {
  display: grid;
  gap: 18px;
}

.operation-grid { grid-template-columns: repeat(4, 1fr); }
.access-policy { grid-template-columns: repeat(3, 1fr); }

.operation-grid article,
.access-policy article {
  padding: 22px;
}

.operation-grid span,
.access-policy span {
  color: var(--accent);
  font-weight: 950;
}

.home-journey-section {
  width: min(var(--max), calc(100% - var(--page-gutter)));
  margin: 0 auto;
}

.home-section-head {
  display: grid;
  justify-items: center;
  margin-inline: auto;
  max-width: 860px;
  text-align: center;
}

.auth-page {
  min-height: calc(100vh - 108px);
  align-items: center;
}
.auth-page.active { display: grid; }

.auth-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
  gap: 26px;
  padding: 28px;
}

.admin-auth-card .auth-info {
  grid-row: span 2;
}

.admin-auth-card .compact-reset-form {
  grid-column: 2;
}

.auth-info { padding: 20px; }

.small-note {
  margin-top: 24px;
  border: 1px solid var(--border);
  background: var(--card-strong);
  border-radius: 18px;
  padding: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
}

.auth-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.auth-toggle button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.auth-toggle button.active {
  background: var(--accent);
  color: #03140b;
}

.auth-mode-note {
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.compact-reset-form {
  margin-top: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 16px;
}

input, select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
}

input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 229, 139, 0.12);
}

.verification-box {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.verification-box p { color: var(--muted); }
.hidden { display: none; }

.payment-gate-actions {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  margin-top: 18px;
}

.access-code-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.access-code-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.access-code-form input {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-input);
  color: var(--text);
  padding: 0 14px;
}

#resumeAiPaymentLink[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.74;
  pointer-events: none;
}

.dashboard-page { min-height: calc(100vh - 108px); }

.dashboard-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.dashboard-top h1 { font-size: 3.4rem; }

.candidate-dashboard-top {
  align-items: center;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(46, 229, 139, 0.12), rgba(26, 199, 161, 0.05)),
    var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  padding: 18px;
}

.candidate-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.candidate-avatar {
  position: relative;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(46, 229, 139, 0.18);
  border-radius: 26px;
  display: grid;
  place-items: end center;
  flex: 0 0 auto;
  background: #f7fbf8;
  box-shadow: 0 18px 42px rgba(6, 74, 41, 0.12);
  color: #03140b;
  font-weight: 950;
  overflow: hidden;
}

.candidate-dashboard-top h1 {
  font-size: clamp(2rem, 4.6vw, 3rem);
  margin: 8px 0 6px;
}

.candidate-dashboard-top p {
  line-height: 1.45;
  margin-bottom: 0;
}

.candidate-progress-wrap {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  max-width: 360px;
}

.candidate-progress-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.82rem;
  font-weight: 850;
  justify-content: space-between;
}

.candidate-progress-meta strong {
  color: var(--accent);
}

.candidate-progress-bar {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--border);
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.candidate-progress-bar span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 0.25s ease;
  width: 0%;
}

[data-theme="light"] .candidate-progress-bar {
  background: rgba(255, 255, 255, 0.62);
}

.candidate-top-status {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) auto;
  margin-left: auto;
  min-width: min(100%, 380px);
}

.candidate-avatar::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
}

.candidate-avatar::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 33px;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  border-radius: 28px 28px 8px 8px;
  background: #2f9dcc;
  z-index: 0;
}

.candidate-avatar span {
  position: relative;
  width: 31px;
  height: 38px;
  border-radius: 46% 46% 42% 42%;
  display: block;
  background: #f3c19d;
  border: 1px solid rgba(99, 65, 38, 0.08);
  margin-bottom: 26px;
  z-index: 3;
}

.candidate-avatar span::before,
.candidate-avatar span::after {
  content: "";
  position: absolute;
  background: #8b5e4a;
}

.candidate-avatar span::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  top: 14px;
  left: 7px;
  box-shadow: 13px 0 0 #8b5e4a;
  opacity: 0.45;
}

.candidate-avatar span::after {
  width: 12px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  left: 9px;
  bottom: 8px;
  opacity: 0.3;
}

.candidate-avatar[data-avatar="avatar-1"]::before {
  width: 61px;
  height: 18px;
  top: 11px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0 16px, #ed7b72 16px 43px, transparent 43px),
    linear-gradient(#f8d38b, #f8d38b);
  box-shadow: 0 9px 0 -2px #f8d38b;
}

.candidate-avatar[data-avatar="avatar-1"] span {
  margin-top: 28px;
}

.candidate-avatar[data-avatar="avatar-1"] span::before {
  width: 29px;
  height: 18px;
  top: -7px;
  left: -1px;
  border-radius: 12px 12px 10px 10px;
  background: #6d4b3d;
  box-shadow: 21px 8px 0 -9px #6d4b3d;
  opacity: 1;
}

.candidate-avatar[data-avatar="avatar-2"] {
  background: #f7fbf8;
}

.candidate-avatar[data-avatar="avatar-2"]::before {
  width: 47px;
  height: 56px;
  top: 15px;
  border-radius: 48% 48% 16px 16px;
  background: #e59a38;
  z-index: 1;
}

.candidate-avatar[data-avatar="avatar-2"]::after {
  background: #48c4d8;
}

.candidate-avatar[data-avatar="avatar-2"] span {
  background: #f2bd95;
}

.candidate-avatar[data-avatar="avatar-3"]::before {
  width: 37px;
  height: 19px;
  top: 23px;
  border-radius: 13px 16px 10px 8px;
  background: #8a6558;
  transform: translateX(-50%) rotate(5deg);
}

.candidate-avatar[data-avatar="avatar-3"]::after {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.2) 0 4px, transparent 4px 10px),
    #3697bf;
}

.candidate-avatar[data-avatar="avatar-3"] span::after {
  width: 21px;
  height: 17px;
  left: 5px;
  bottom: -1px;
  border-radius: 0 0 12px 12px;
  background: #7b5548;
  opacity: 1;
}

.candidate-avatar[data-avatar="avatar-4"]::before {
  width: 80px;
  height: 26px;
  top: 21px;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 0 24px, #ef7674 24px 56px, transparent 56px),
    linear-gradient(#efe5de, #efe5de);
  transform: translateX(-50%) rotate(-12deg);
}

.candidate-avatar[data-avatar="avatar-4"]::after {
  background: #329fe0;
}

.candidate-avatar[data-avatar="avatar-4"] span {
  background: #efb98e;
}

.candidate-avatar[data-avatar="avatar-4"] span::before {
  width: 16px;
  height: 48px;
  top: -5px;
  left: -9px;
  border-radius: 999px;
  background: #c9865a;
  box-shadow: none;
  opacity: 1;
}

.candidate-card-identity,
.candidate-preview-identity {
  gap: 12px;
}

.candidate-card-identity .candidate-avatar,
.candidate-preview-identity .candidate-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}

.candidate-card-identity .candidate-avatar::before,
.candidate-preview-identity .candidate-avatar::before {
  transform: translateX(-50%) scale(0.68);
  transform-origin: top center;
}

.candidate-card-identity .candidate-avatar[data-avatar="avatar-3"]::before,
.candidate-preview-identity .candidate-avatar[data-avatar="avatar-3"]::before {
  transform: translateX(-50%) rotate(5deg) scale(0.68);
}

.candidate-card-identity .candidate-avatar[data-avatar="avatar-4"]::before,
.candidate-preview-identity .candidate-avatar[data-avatar="avatar-4"]::before {
  transform: translateX(-50%) rotate(-12deg) scale(0.68);
}

.candidate-card-identity .candidate-avatar span,
.candidate-preview-identity .candidate-avatar span {
  width: 22px;
  height: 27px;
  margin-bottom: 17px;
}

.candidate-next-card {
  border: 1px solid rgba(46, 229, 139, 0.26);
  background:
    linear-gradient(135deg, rgba(46, 229, 139, 0.12), rgba(26, 199, 161, 0.04)),
    var(--card);
  border-radius: 16px;
  box-shadow: none;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 12px 14px;
}

.candidate-next-card span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 950;
}

.candidate-next-card strong {
  font-size: 1.05rem;
}

.candidate-next-card p {
  color: var(--muted);
  margin: 0;
}

.profile-insights-panel {
  padding: 18px;
}

.profile-insights-panel .admin-panel-head {
  align-items: center;
  margin-bottom: 10px;
}

.profile-insights-panel .profile-insight-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-insights-panel .profile-insight-grid article {
  border-radius: 16px;
  padding: 12px;
}

.profile-insights-panel .completion-checklist {
  border-radius: 16px;
  padding: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 18px;
}

.candidate-quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.dash-card {
  padding: 22px;
  text-align: left;
  color: inherit;
  text-decoration: none;
  display: block;
}

.candidate-quick-actions .dash-card {
  border-radius: 18px;
  min-height: 132px;
  padding: 16px;
}

.dash-card span {
  color: var(--accent);
  font-weight: 950;
}

.dash-card h3 { margin: 18px 0 8px; }

.candidate-quick-actions .dash-card h3 {
  margin: 10px 0 6px;
}

.candidate-quick-actions .dash-card p {
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 0;
}

.inside-panel {
  margin-top: 18px;
  padding: 24px;
}

.module-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.entitlement-card {
  border: 1px solid var(--border);
  background: var(--card-strong);
  border-radius: 18px;
  padding: 13px 15px;
  margin-top: 14px;
}

.entitlement-card p {
  margin: 5px 0 0;
}

.entitlement-card strong {
  color: var(--accent);
}

.hr-tools,
.admin-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-tools {
  grid-template-columns: 1fr 260px;
}

.candidate-list,
.admin-list { display: grid; gap: 12px; }

.candidate-card {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.candidate-card-top,
.admin-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.candidate-card h3,
.admin-item h3 { margin: 0 0 6px; }

.candidate-card p,
.admin-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.tag {
  border: 1px solid var(--border);
  background: var(--card-strong);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.84rem;
  font-weight: 800;
}

.fit {
  min-width: 62px;
  height: 62px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #03140b;
  font-weight: 950;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.admin-stat-grid article { padding: 20px; }

.admin-stat-grid span,
.admin-stat-grid strong { display: block; }

.admin-stat-grid span {
  color: var(--muted);
  font-weight: 800;
}

.admin-stat-grid strong {
  margin-top: 8px;
  font-size: 1.7rem;
}

.admin-layout { display: grid; gap: 18px; }
.admin-panel { padding: 20px; }

.admin-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.admin-panel-head h2,
.admin-panel-head p { margin: 0; }

.admin-panel-head p {
  margin-top: 6px;
  color: var(--muted);
}

.admin-item {
  padding: 16px;
  align-items: center;
}

.admin-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.status-pill {
  border-radius: 999px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: capitalize;
}

.status-pill.approved { color: var(--accent); background: rgba(46, 229, 139, 0.1); }
.status-pill.pending { color: var(--warn); background: rgba(248, 201, 107, 0.1); }
.status-pill.rejected { color: var(--danger); background: rgba(255, 95, 95, 0.1); }
.mode-pill {
  border-style: dashed;
}

.flow-notice {
  border: 1px solid rgba(248, 201, 107, 0.34);
  background: rgba(248, 201, 107, 0.1);
  border-radius: var(--radius);
  color: var(--text);
  margin: 16px 0;
  padding: 15px 16px;
}

.flow-notice.approved {
  border-color: rgba(46, 229, 139, 0.34);
  background: rgba(46, 229, 139, 0.08);
}

.flow-notice.rejected {
  border-color: rgba(255, 95, 95, 0.34);
  background: rgba(255, 95, 95, 0.08);
}

.flow-notice strong,
.flow-notice p {
  margin: 0;
}

.flow-notice p {
  color: var(--muted);
  margin-top: 5px;
}

.file-status {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 850;
  margin-top: -6px;
}

.profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-actions .outline-btn {
  min-height: 40px;
  padding: 9px 13px;
}

.profile-form input:disabled,
.profile-form select:disabled {
  opacity: 0.78;
  cursor: not-allowed;
}

.profile-form textarea:disabled {
  opacity: 0.78;
  cursor: not-allowed;
}

.profile-insight-grid,
.activity-grid,
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
  max-width: 100%;
  min-width: 0;
}

.profile-insight-grid article,
.activity-grid article,
.hr-preview,
.completion-checklist {
  border: 1px solid var(--border);
  background: var(--card-strong);
  border-radius: var(--radius);
  padding: 16px;
}

.profile-insight-grid span,
.activity-grid span {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  font-weight: 850;
  margin-bottom: 7px;
}

.profile-insight-grid strong,
.activity-grid strong {
  color: var(--accent);
  font-size: 1.18rem;
}

.profile-insight-grid strong.pro-access {
  color: var(--warn);
}

.completion-checklist,
.skill-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.check-chip,
.skill-chip {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 850;
  padding: 8px 11px;
}

.check-chip.done,
.skill-chip {
  color: var(--accent);
  background: rgba(46, 229, 139, 0.08);
}

.checkbox-line {
  align-items: center;
  border: 1px solid var(--border);
  background: var(--card-strong);
  border-radius: 12px;
  display: flex;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  padding: 10px 11px;
  width: 100%;
}

.consent-line {
  grid-column: 1 / -1;
  min-height: auto;
  align-items: flex-start;
  background: rgba(46, 229, 139, 0.07);
  font-size: 0.84rem;
  line-height: 1.4;
  margin: 0;
  padding: 9px 11px;
}

.checkbox-line input {
  width: auto;
}

.compact-filter {
  margin-bottom: 0;
  min-height: 48px;
}

.checkbox-line a {
  color: var(--accent);
  font-weight: 950;
}

.legal-page {
  max-width: 860px;
}

.legal-page h1 {
  font-size: 2.8rem;
  margin-top: 0;
}

.legal-page p {
  color: var(--muted);
  line-height: 1.7;
}

.profile-save-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.profile-save-row .primary-btn,
.profile-save-row .outline-btn {
  flex: 1 1 220px;
}

.shortlist-note {
  width: min(100%, 360px);
}

.compact-input {
  min-height: 40px;
  width: min(100%, 180px);
}

.hr-tools .outline-btn,
.admin-tools .outline-btn {
  min-height: 48px;
}

.pagination-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-weight: 850;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 0 4px;
}

.admin-empty {
  padding: 24px;
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  transform: translateY(100px);
  opacity: 0;
  transition: 0.25s ease;
  background: var(--card-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
  max-width: 340px;
  z-index: 100;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.footer {
  width: 100%;
  margin: 42px 0 0;
  border-top: 1px solid var(--header-border);
  background: var(--header-bg);
  color: var(--header-muted);
  font-size: 0.9rem;
}

[data-theme="light"] .footer {
  background: var(--header-bg);
  border-top-color: var(--header-border);
}

.site-footer {
  width: min(var(--max), calc(100% - var(--page-gutter)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 1.45fr) minmax(170px, 0.65fr) minmax(210px, 0.72fr);
  column-gap: clamp(44px, 7vw, 96px);
  row-gap: 32px;
  align-items: start;
  padding: 48px 0 0;
}

body[data-current-page]:not([data-current-page="home"]) .home-footer {
  display: none;
}

/* =========================
   HOME MARKET CLEANUP
========================= */

#homePage {
  padding-top: 0;
}

#homePage .home-market-hero {
  display: block;
  width: 100%;
  padding: clamp(12px, 2.4vw, 24px) 0 26px;
}

.home-market-copy {
  display: grid;
  align-content: start;
  padding: 0;
  max-width: 980px;
}

.home-market-copy h1 {
  max-width: 860px;
  margin: 10px 0 10px;
  font-size: clamp(2.8rem, 6vw, 5.7rem);
  line-height: 0.95;
}

.home-market-copy .home-hero-note {
  max-width: 780px;
  font-size: 1.03rem;
}

.home-search {
  display: grid;
  gap: 10px;
  max-width: 820px;
  margin-top: 18px;
}

.home-search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.home-search-box input,
.home-search-box button {
  min-height: 54px;
  border-radius: 16px;
  font: inherit;
}

.home-search-box input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-input);
  color: var(--text);
  padding: 0 16px;
}

.home-search-box button {
  border: 0;
  background: var(--soft-action);
  color: #03140b;
  padding: 0 20px;
  font-weight: 950;
}

.home-search-box button:hover,
.home-search-box button:focus-visible {
  background: var(--soft-action-hover);
}

.home-search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-search-results a,
.home-search-results p {
  margin: 0;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  text-decoration: none;
}

.home-search-results strong,
.home-search-results span {
  display: block;
}

.home-search-results strong {
  color: var(--text);
  font-size: 0.92rem;
}

.home-search-results span,
.home-search-results p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.home-purpose-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-purpose-list li {
  border-left: 2px solid rgba(46, 229, 139, 0.65);
  color: var(--muted);
  line-height: 1.55;
  padding-left: 12px;
}

.home-paths-section,
.home-topics-section,
.home-feature-section {
  width: 100%;
}

.home-feature-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.home-feature-list a {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 122px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.home-feature-list strong {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.22;
}

.home-feature-list span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.42;
}

.home-feature-list a:hover,
.home-feature-list a:focus-visible {
  border-color: rgba(46, 229, 139, 0.42);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.home-feature-list a:hover strong,
.home-feature-list a:focus-visible strong {
  color: var(--accent);
}

.home-topic-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.home-topic-list a {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 76px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.home-topic-list strong {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.25;
}

.home-topic-list span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.home-topic-list a:hover,
.home-topic-list a:focus-visible {
  border-color: rgba(46, 229, 139, 0.42);
  background: var(--surface-hover);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

.home-topic-list a:hover strong,
.home-topic-list a:focus-visible strong {
  color: var(--accent);
}

.learning-path-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.learning-path-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 5px 10px;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
}

.learning-path-list a:nth-child(odd) {
  border-right: 1px solid var(--border);
  margin-right: 0;
}

.learning-path-list a::after {
  content: "→";
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  font-weight: 950;
}

.learning-path-list strong,
.home-workflow-list strong {
  color: var(--text);
}

.learning-path-list span,
.home-workflow-list span {
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.86rem;
}

.learning-path-list a:hover strong {
  color: var(--accent);
}

.home-workflow-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.home-workflow-list li {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 1020px) {
  .home-purpose-list,
  .home-feature-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --page-gutter: 56px;
  }

  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  #homePage {
    padding-top: 0;
    width: min(var(--max), calc(100% - var(--page-gutter)));
    max-width: calc(100% - var(--page-gutter));
    margin-inline: auto;
  }

  .home-market-copy h1 {
    font-size: clamp(1.48rem, 6.8vw, 1.72rem);
    line-height: 1.16;
  }

  .home-market-copy .home-hero-note {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .home-search-box,
  .home-search-results,
  .home-feature-list,
  .home-topic-list,
  .learning-path-list,
  .home-workflow-list li {
    grid-template-columns: 1fr;
  }

  .home-topic-list a {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .learning-path-list a:nth-child(odd) {
    border-right: 0;
    margin-right: 0;
  }
}

.home-market-copy,
.home-search,
.home-search-box,
.home-purpose-list,
.home-feature-list,
.home-topic-list,
.learning-path-list,
.home-workflow-list,
.home-market-copy h1,
.home-market-copy p {
  min-width: 0;
  max-width: 100%;
}

.home-market-copy h1,
.home-market-copy p,
.learning-path-list span {
  overflow-wrap: break-word;
}

@media (max-width: 980px) {
  .home-topic-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.footer p,
.footer span {
  margin: 0;
}

.footer-brand-block {
  display: grid;
  align-content: start;
  gap: 16px;
  max-width: 540px;
  padding-left: clamp(18px, 2vw, 34px);
  padding-right: clamp(28px, 6vw, 80px);
  padding-top: 0;
  padding-bottom: 22px;
}

.footer-brand-mark {
  color: var(--header-text);
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 4px;
}

.footer-brand-block p {
  line-height: 1.65;
  max-width: 50ch;
}

.footer-column {
  align-content: start;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.footer-column > span {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  line-height: 1.1;
  min-height: 18px;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 12px;
}

.footer-links a,
.footer-company-link,
.footer-legal a {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--header-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.3;
  padding: 0;
  text-align: left;
  text-decoration: none;
  width: fit-content;
}

.footer-links a:hover,
.footer-company-link:hover,
.footer-legal a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.footer-company {
  justify-items: start;
}

.footer-company .footer-legal {
  margin-top: 2px;
}

.footer-legal {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-bottom {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  color: var(--header-muted);
  font-size: 0.82rem;
  margin-top: 12px;
  padding: 22px 0 28px;
}

.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  border-top: 1px solid var(--header-border);
  pointer-events: none;
}

.minimal-footer {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  width: 100%;
  margin: 42px 0 0;
  border-top: 1px solid var(--header-border);
  padding: 22px max(18px, calc((100vw - var(--max)) / 2)) 28px;
}

.minimal-footer p,
.minimal-footer span {
  line-height: 1.5;
}

.minimal-footer span {
  text-align: right;
}

.protected-zone {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.protected-zone input,
.protected-zone textarea,
.protected-zone select {
  user-select: text;
  -webkit-user-select: text;
}

.protected-zone::after {
  content: attr(data-watermark);
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  color: rgba(245, 255, 249, 0.055);
  font-size: clamp(1.8rem, 7vw, 5rem);
  font-weight: 950;
  text-align: center;
  line-height: 1.15;
  transform: rotate(-18deg);
  pointer-events: none;
  z-index: 0;
}

.protected-zone > * {
  position: relative;
  z-index: 1;
}

[data-theme="light"] .protected-zone::after {
  color: rgba(7, 28, 19, 0.055);
}

@media print {
  .protected-zone {
    display: none !important;
  }

  body::before {
    content: "Printing protected content is disabled by NextuMax.";
    display: block;
    padding: 40px;
    color: #111;
    font: 700 20px system-ui, sans-serif;
  }
}

@media (max-width: 980px) {
  .hero,
  .auth-card,
  .operation-grid,
  .access-policy {
    grid-template-columns: 1fr;
  }

  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-engine-card { max-width: 620px; }

  .admin-auth-card .auth-info,
  .admin-auth-card .compact-reset-form {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }

  .nav-links {
    position: fixed;
    top: 82px;
    left: 14px;
    right: 14px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    display: grid;
    gap: 8px;
    margin-left: 0;
    background: var(--header-surface);
    border: 1px solid var(--header-border);
    box-shadow: var(--shadow);
    padding: 14px;
    border-radius: 20px;
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
    z-index: 1001;
  }

  .nav-links button,
  .nav-links a {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  [data-theme="light"] .nav-links {
    background: var(--header-surface);
    border-color: var(--header-border);
  }

  .nav-links.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .page {
    width: min(var(--max), calc(100% - var(--page-gutter)));
    padding: 24px 0 50px;
  }

  #homePage {
    width: min(var(--max), calc(100% - var(--page-gutter)));
    max-width: calc(100% - var(--page-gutter));
    margin-inline: auto;
  }

  .hero {
    min-height: auto;
    padding-top: 18px;
  }

  .hero h1,
  .auth-info h1,
  .dashboard-top h1 {
    font-size: 3.2rem;
    line-height: 1;
    letter-spacing: 0;
  }

  .hero-actions,
  .module-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-btn,
  .outline-btn,
  .ai-hero-btn,
  .danger-btn,
  .locked-btn { width: 100%; }

  #homePage .hero-actions {
    display: flex;
    justify-content: center;
  }

  #homePage .hero-actions .primary-btn,
  #homePage .hero-actions .outline-btn,
  #homePage .hero-actions .ai-hero-btn {
    width: auto;
  }

  .dashboard-grid,
  .admin-stat-grid,
  .engine-stats { grid-template-columns: 1fr; }

  .dashboard-top,
  .admin-panel-head,
  .admin-item,
  .candidate-card-top {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 26px;
    row-gap: 22px;
    align-items: start;
    padding-top: 24px;
  }

  .footer-brand-block {
    grid-column: 1 / -1;
    padding-left: 0;
    padding-right: 0;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-column {
    align-content: start;
    gap: 12px;
  }

  .footer-column > span {
    min-height: 16px;
  }

  .footer-company {
    justify-items: start;
  }

  .footer-legal {
    justify-content: flex-start;
  }

  .footer-bottom {
    grid-column: 1 / -1;
    display: grid;
    gap: 6px;
    text-align: left;
  }

  .hr-tools,
  .admin-tools { grid-template-columns: 1fr; }

  .auth-card { padding: 14px; }
  .auth-info { padding: 8px; }

  .candidate-identity {
    align-items: flex-start;
  }

  .avatar-picker {
    grid-template-columns: 1fr;
  }

  .avatar-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================
   INDEX HERO CLEANUP
   Reduced navbar gap + IC chip visual
========================= */

#homePage {
  padding-top: 12px;
}

.hero {
  min-height: calc(78vh - 88px);
  padding: clamp(14px, 3vh, 30px) 0 clamp(46px, 7vh, 72px);
  grid-template-columns: 1fr;
  gap: 26px;
  place-items: start center;
  text-align: center;
}

.hero h1 {
  max-width: 980px;
  margin-top: 14px;
}

.hero-copy {
  display: grid;
  justify-items: center;
  max-width: 1020px;
}

.hero-copy > p:not(.mini-label) {
  max-width: 760px;
}

.hero-actions {
  justify-content: center;
}

@media (max-width: 980px) {
  #homePage {
    padding-top: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 10px;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .payment-gate-actions,
  .access-code-form {
    grid-template-columns: 1fr;
  }

  #homePage {
    padding-top: 10px;
    width: 100%;
    max-width: 100%;
  }

  .hero {
    gap: 24px;
    padding-top: 4px;
  }

  .hero {
    text-align: left;
    place-items: stretch;
  }

  .hero-copy {
    justify-items: start;
    padding-inline: 0;
  }

  .hero-actions {
    justify-content: stretch;
  }

  #homePage .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: center;
    justify-self: center;
    max-width: 300px;
  }

  #homePage .hero-actions .primary-btn,
  #homePage .hero-actions .outline-btn,
  #homePage .hero-actions .ai-hero-btn {
    min-height: 38px;
    width: min(100%, 300px);
    padding: 0 14px;
    font-size: 0.86rem;
  }
}

@media (max-width: 380px) {
  .brand strong {
    font-size: 1.42rem;
  }

  .nav {
    width: min(var(--max), calc(100% - 20px));
    gap: 8px;
  }

  .theme-btn,
  .menu-btn {
    padding: 9px 11px;
  }

  .icon-theme-btn,
  .menu-btn {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    display: inline-grid;
    place-items: center;
  }

  .hero h1,
  .auth-info h1,
  .dashboard-top h1 {
    font-size: 2.35rem;
  }

  .section-head h2,
  .admin-panel-head h2 {
    font-size: 2.35rem;
  }
}


/* =========================
   HR ACCESS UPDATE
========================= */

.status-pill.active {
  color: var(--accent);
  background: rgba(46, 229, 139, 0.1);
}




/* =========================
   HR CANDIDATE SEARCH ONLY
========================= */

.hr-search-panel {
  margin-top: 18px;
}

.hr-search-panel .admin-panel-head {
  margin-bottom: 18px;
}

.candidate-card {
  transition: transform 0.2s ease, background 0.2s ease;
}

.candidate-card:hover {
  transform: translateY(-2px);
  background: var(--card-strong);
}

@media (max-width: 720px) {
  .hr-search-panel {
    padding: 18px;
  }
}

/* =========================
   PROFILE + RESUME GATED ACCESS
========================= */

.profile-panel {
  margin-top: 18px;
}

.profile-form {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.profile-form > * {
  max-width: 100%;
  min-width: 0;
}

.profile-form-section,
.avatar-picker {
  border: 1px solid var(--border);
  background: var(--card-strong);
  border-radius: 16px;
  padding: 14px;
}

.profile-form-section {
  display: grid;
  gap: 12px;
}

.profile-form-section > .section-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
}

details.profile-form-section .section-head {
  cursor: pointer;
}

details.profile-form-section .section-head::-webkit-details-marker {
  display: none;
}

details.profile-form-section .section-head::after {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  content: "+";
  display: grid;
  flex: 0 0 auto;
  font-weight: 950;
  height: 26px;
  place-items: center;
  width: 26px;
}

details.profile-form-section[open] .section-head::after {
  content: "-";
}

details.profile-form-section:not([open]) {
  gap: 0;
}

.profile-form-section > .section-head span,
.avatar-picker span {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 950;
}

.profile-form-section > .section-head p {
  color: var(--muted);
  line-height: 1.45;
  margin: 4px 0 0;
}

.compact-section-head {
  align-items: center;
}

.avatar-picker span {
  color: var(--accent);
  font-weight: 950;
}

.avatar-picker p {
  color: var(--muted);
  line-height: 1.55;
  margin: 6px 0 0;
}

.avatar-option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 310px);
}

.avatar-option-grid label {
  position: relative;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  min-width: 0;
  place-items: center;
  justify-items: center;
  padding: 8px;
}

.avatar-option-grid input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.avatar-option {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 0.78rem;
}

.avatar-option span {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #03140b;
  font-size: 0.72rem;
}

.avatar-option-grid small {
  color: var(--muted);
  font-weight: 850;
}

.avatar-option-grid label:has(input:checked) {
  border-color: rgba(46, 229, 139, 0.5);
  background: rgba(46, 229, 139, 0.1);
}

.candidate-avatar[data-avatar] {
  background-color: #ffffff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 88%;
}

.candidate-avatar[data-avatar]::before,
.candidate-avatar[data-avatar]::after,
.candidate-avatar[data-avatar] span {
  display: none;
}

.candidate-avatar[data-avatar="avatar-1"] {
  background-image: url("assets/avatars/avatar-1.jpg");
}

.candidate-avatar[data-avatar="avatar-2"] {
  background-image: url("assets/avatars/avatar-2.jpg");
}

.candidate-avatar[data-avatar="avatar-3"] {
  background-image: url("assets/avatars/avatar-3.jpg");
}

.candidate-avatar[data-avatar="avatar-4"] {
  background-image: url("assets/avatars/avatar-4.jpg");
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.candidate-profile-form label {
  margin-bottom: 0;
}

.file-rule,
.privacy-line {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: -4px 0 0;
}

input[type="file"] {
  padding: 11px;
}

input[type="file"]::file-selector-button {
  border: 0;
  background: var(--accent);
  color: #03140b;
  font-weight: 900;
  border-radius: 999px;
  padding: 9px 12px;
  margin-right: 12px;
  cursor: pointer;
}

.locked-btn {
  white-space: nowrap;
}

@media (max-width: 980px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .candidate-dashboard-top,
  .candidate-top-status {
    display: grid;
    grid-template-columns: 1fr;
  }

  .candidate-top-status {
    margin-left: 0;
    width: 100%;
  }

  .candidate-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-insights-panel .profile-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .minimal-footer {
    align-items: flex-start;
    display: grid;
    gap: 8px;
    padding-inline: 18px;
  }

  .minimal-footer span {
    text-align: left;
  }

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

  .home-section-head {
    justify-items: start;
    text-align: left;
  }

  .profile-insight-grid,
  .activity-grid,
  .privacy-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page {
    overflow-x: hidden;
  }

  .dashboard-top {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px;
  }

  .candidate-dashboard-top {
    background:
      linear-gradient(135deg, rgba(46, 229, 139, 0.12), rgba(26, 199, 161, 0.04)),
      var(--card);
  }

  .candidate-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    justify-items: start;
    text-align: left;
    width: 100%;
  }

  .candidate-avatar {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .candidate-avatar span {
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }

  .avatar-picker {
    grid-template-columns: 1fr;
  }

  .compact-section-head {
    align-items: stretch;
    display: grid;
  }

  .compact-section-head .avatar-option-grid {
    justify-self: stretch;
  }

  .avatar-option-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .avatar-option {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .dashboard-top h1 {
    font-size: clamp(1.6rem, 9vw, 2.15rem);
    line-height: 1.02;
  }

  .candidate-dashboard-top p {
    font-size: 0.92rem;
  }

  .candidate-progress-wrap {
    max-width: none;
    width: 100%;
  }

  .candidate-top-status {
    grid-template-columns: 1fr;
  }

  .candidate-top-status .danger-btn {
    min-height: 42px;
    width: 100%;
  }

  .candidate-next-card {
    padding: 10px 12px;
  }

  .candidate-quick-actions {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .candidate-quick-actions .dash-card {
    min-height: 112px;
    padding: 13px;
  }

  .candidate-quick-actions .dash-card h3 {
    font-size: 1rem;
  }

  .candidate-quick-actions .dash-card p {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .profile-insights-panel {
    padding: 14px;
  }

  .profile-insights-panel .admin-panel-head {
    align-items: stretch;
    display: grid;
  }

  .profile-insights-panel .profile-insight-grid {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-insights-panel .profile-insight-grid article {
    padding: 10px;
  }

  .profile-insights-panel .profile-insight-grid strong {
    font-size: 1rem;
  }

  details.profile-form-section .section-head::after {
    height: 24px;
    width: 24px;
  }

  .dashboard-top .outline-btn,
  .profile-actions .outline-btn,
  .profile-actions .status-pill {
    width: 100%;
  }

  .inside-panel,
  .profile-panel {
    border-radius: 18px;
    overflow: hidden;
    padding: 14px;
  }

  .profile-panel .admin-panel-head {
    display: grid;
    gap: 14px;
  }

  .profile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .profile-actions .status-pill {
    grid-column: 1 / -1;
  }

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

  .profile-form input,
  .profile-form select,
  .profile-form textarea,
  input[type="file"] {
    min-width: 0;
    width: 100%;
  }

  .checkbox-line {
    align-items: flex-start;
    font-size: 0.9rem;
  }

  .consent-line {
    font-size: 0.8rem;
  }

  .profile-save-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .profile-save-row .primary-btn,
  .profile-save-row .outline-btn {
    width: 100%;
  }
}

/* =========================
   DARK THEME SELECT COMPATIBILITY
========================= */

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: var(--text);
  background:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%),
    var(--card);
  background-position:
    calc(100% - 20px) 52%,
    calc(100% - 14px) 52%,
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%;
  background-repeat: no-repeat;
  padding-right: 44px;
  cursor: pointer;
}

select:hover {
  background-color: var(--card-strong);
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 229, 139, 0.14);
}

select option {
  background-color: #0d1a15;
  color: #f5fff9;
}

select option:checked,
select option:hover {
  background-color: #123326;
  color: #2ee58b;
}

[data-theme="light"] select {
  color: var(--text);
  background:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%),
    var(--card-strong);
  background-position:
    calc(100% - 20px) 52%,
    calc(100% - 14px) 52%,
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%;
  background-repeat: no-repeat;
}

[data-theme="light"] select option {
  background-color: #dff2e7;
  color: #071c13;
}

[data-theme="light"] select option:checked,
[data-theme="light"] select option:hover {
  background-color: #c7ead7;
  color: #0ca866;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================
   GLOBAL TYPOGRAPHY TUNING
   Compact, technical learning-platform scale
========================= */

.hero h1,
.auth-info h1,
.dashboard-top h1,
.home-market-copy h1 {
  font-size: clamp(2.15rem, 4vw, 3.45rem);
  line-height: 1.06;
}

.section-head h2,
.legal-page h1 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.12;
}

.operation-grid h3,
.access-policy h3,
.dash-card h3,
.inside-panel h2,
.admin-panel-head h2 {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.2;
}

.brand strong {
  font-size: clamp(1.35rem, 2.2vw, 1.55rem);
}

@media (max-width: 640px) {
  .hero h1,
  .auth-info h1,
  .dashboard-top h1,
  .home-market-copy h1 {
    font-size: clamp(1.48rem, 6.8vw, 1.72rem);
    line-height: 1.16;
  }

  .section-head h2,
  .legal-page h1 {
    font-size: clamp(1.28rem, 5.8vw, 1.55rem);
    line-height: 1.18;
  }

  #homePage {
    width: min(var(--max), calc(100% - var(--page-gutter)));
    max-width: calc(100% - var(--page-gutter));
    margin-inline: auto;
  }

  .learning-path-list a {
    grid-template-columns: minmax(0, 1fr);
  }

  .learning-path-list a::after {
    display: none;
  }
}

/* ============================================================
   Global Command Palette (Ctrl+K) Spotlight Search
   ============================================================ */

.command-palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 6, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(40px, 12vh, 110px) 16px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.command-palette-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.command-palette-modal {
  width: min(640px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(46, 229, 139, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(-12px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.command-palette-backdrop.open .command-palette-modal {
  transform: scale(1) translateY(0);
}

.command-palette-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-input);
}

.command-palette-search-icon {
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.command-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.05rem;
  font-family: inherit;
}

.command-palette-input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.command-palette-esc {
  font-size: 0.72rem;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--card);
  font-weight: 700;
}

.command-palette-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(46, 229, 139, 0.3) transparent;
}

.command-palette-group {
  padding: 8px 12px 4px;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
}

.command-palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.1s ease, border-color 0.1s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.command-palette-item:hover,
.command-palette-item.selected {
  background: var(--surface-hover);
  border-color: rgba(46, 229, 139, 0.35);
}

.command-palette-item-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.command-palette-item-title {
  font-size: 0.94rem;
  font-weight: 750;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.command-palette-item-detail {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.command-palette-item-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.command-palette-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.command-palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-input);
  font-size: 0.74rem;
  color: var(--muted);
}

.command-palette-footer kbd {
  font-size: 0.68rem;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
}
