/* =========================================================
   PORTAL & ADMIN — Shared Styles
   ========================================================= */

.portal-body {
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Portal Header ─── */
.portal-header {
  background: rgba(6, 9, 20, 0.95);
  border-bottom: 1px solid var(--surface-line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.portal-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-primary);
}
.portal-brand svg { flex-shrink: 0; }
.portal-brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  line-height: 1;
}
.portal-brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.portal-nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
  position: relative;
}
.portal-nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}
.portal-nav-link.active {
  color: var(--text-primary);
  background: rgba(26, 77, 255, 0.1);
}
.portal-nav-logout {
  color: var(--text-muted) !important;
  font-size: 0.82rem;
}
.notif-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: var(--brand-red);
  color: white;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
}
.btn-sm {
  padding: 8px 14px !important;
  font-size: 0.82rem !important;
}

/* ─── Portal Main ─── */
.portal-main {
  flex: 1;
  padding: 50px 24px 80px;
}
.portal-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ─── Page heads ─── */
.portal-page-head {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--surface-line);
}
.portal-page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.portal-page-head p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin: 0;
}
.portal-page-head .breadcrumb {
  margin-bottom: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}
.portal-page-head .breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.portal-page-head .breadcrumb a:hover { color: var(--brand-blue-light); }

/* ─── Cards ─── */
.portal-card {
  background: var(--surface-glass);
  border: 1px solid var(--surface-line);
  border-radius: 18px;
  padding: 32px;
  margin-bottom: 24px;
}
.portal-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--surface-line);
}
.portal-card-head h2,
.portal-card-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

/* ─── Forms ─── */
.portal-form { display: flex; flex-direction: column; gap: 20px; }
.portal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.portal-form-row.full { grid-template-columns: 1fr; }
@media (max-width: 640px) { .portal-form-row { grid-template-columns: 1fr; } }

.portal-form-group label,
.portal-field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.portal-form-group label .required { color: var(--brand-red-light); }

.portal-form-group input[type="text"],
.portal-form-group input[type="email"],
.portal-form-group input[type="tel"],
.portal-form-group input[type="url"],
.portal-form-group input[type="number"],
.portal-form-group input[type="password"],
.portal-form-group input[type="date"],
.portal-form-group select,
.portal-form-group textarea {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-line);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
}
.portal-form-group textarea {
  min-height: 110px;
  resize: vertical;
  font-family: var(--font-sans);
  line-height: 1.55;
}
.portal-form-group input:focus,
.portal-form-group select:focus,
.portal-form-group textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  background: rgba(26, 77, 255, 0.04);
}
.portal-form-group .hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.portal-form-group .err {
  color: var(--brand-red-light);
  font-size: 0.8rem;
  margin-top: 6px;
}

.portal-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--surface-line);
}

/* File input styled */
.file-input {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--surface-line);
  border-radius: 10px;
}
.file-input input[type="file"] {
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.88rem;
}
.file-input input[type="file"]::file-selector-button {
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-red));
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  margin-right: 12px;
}
.file-current {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-family: var(--font-mono);
}
.file-current a { color: var(--brand-blue-light); }

/* ─── Flash messages ─── */
.flash-stack { margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.flash {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  border-left: 3px solid;
}
.flash-success {
  background: rgba(110, 233, 168, 0.06);
  border-color: #6ee9a8;
  color: #d1f5e0;
}
.flash-error {
  background: rgba(255, 36, 64, 0.06);
  border-color: var(--brand-red);
  color: #ffc8d0;
}
.flash-info {
  background: rgba(26, 77, 255, 0.06);
  border-color: var(--brand-blue);
  color: #c8d8ff;
}

/* ─── Stats grid (dashboard) ─── */
.portal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}
@media (max-width: 880px) { .portal-stats { grid-template-columns: repeat(2, 1fr); } }
.portal-stat {
  padding: 22px;
  background: var(--surface-glass);
  border: 1px solid var(--surface-line);
  border-radius: 14px;
}
.portal-stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--brand-blue-light), var(--brand-red-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.portal-stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ─── Application card ─── */
.app-card {
  padding: 24px;
  background: var(--surface-glass);
  border: 1px solid var(--surface-line);
  border-radius: 14px;
  margin-bottom: 16px;
  transition: all 0.2s;
}
.app-card:hover {
  border-color: rgba(26, 77, 255, 0.3);
  transform: translateY(-2px);
}
.app-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 20px;
}
.app-card-head h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
}
.app-card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.app-card-meta span + span { margin-left: 8px; }
.app-card-meta span + span::before { content: "·"; margin-right: 8px; opacity: 0.4; }

/* Stage badge */
.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}
.stage-badge.info {
  background: rgba(26, 77, 255, 0.12);
  color: #9ab8ff;
  border: 1px solid rgba(26, 77, 255, 0.25);
}
.stage-badge.success {
  background: rgba(110, 233, 168, 0.1);
  color: #6ee9a8;
  border: 1px solid rgba(110, 233, 168, 0.3);
}
.stage-badge.error {
  background: rgba(255, 36, 64, 0.1);
  color: #ff8497;
  border: 1px solid rgba(255, 36, 64, 0.3);
}
.stage-badge.muted {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--surface-line);
}

/* Progress bar (application stage) */
.stage-progress {
  height: 6px;
  background: var(--surface-line);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 14px;
}
.stage-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-red));
  border-radius: 100px;
  transition: width 0.6s ease;
}

/* Timeline */
.timeline {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--surface-line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.timeline-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
}
.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-red));
  flex-shrink: 0;
  margin-top: 4px;
  box-shadow: 0 0 0 4px rgba(26, 77, 255, 0.1);
}
.timeline-text { flex: 1; }
.timeline-text strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  margin-bottom: 4px;
}
.timeline-text small {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.timeline-note {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border-left: 2px solid var(--brand-blue);
}

/* ─── Empty state ─── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  border: 1px dashed var(--surface-line);
  border-radius: 14px;
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(26, 77, 255, 0.12), rgba(255, 36, 64, 0.12));
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-blue-light);
}
.empty-state h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 500;
}
.empty-state p {
  color: var(--text-secondary);
  margin: 0 auto 24px;
  max-width: 420px;
  font-size: 0.94rem;
}

/* ─── Auth pages (login, signup) — branded full-bleed layout ─── */
.auth-page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  /* Use 'contain' so the full branded image (with NEXVORIA + KINVIYO logos at edges)
     is always visible, never cropped at top or sides. The dark background-color fills
     any leftover space when viewport aspect ratio doesn't match the image. */
  background-image: url('/assets/img/auth-bg.jpg');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #060914;
}
/* On narrow mobile viewports, switch to cover (since the card overlay covers most
   of the screen anyway and the logo edges are less critical than full coverage). */
@media (max-width: 768px) {
  .auth-page-bg {
    background-size: cover;
  }
}

.auth-center-only {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-wrap {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
}

/* When body has .auth-branded class, override portal-body chrome */
body.auth-branded { min-height: 100vh; }

.auth-card {
  padding: 40px;
  background: rgba(10, 18, 48, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.auth-card * { box-sizing: border-box; }
.auth-card .portal-form-group { width: 100%; }
.auth-card label { max-width: 100%; }
.auth-card h1 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0 0 8px;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}
.auth-card .sub {
  color: var(--text-secondary);
  margin: 0 0 32px;
  font-size: 0.94rem;
}
.auth-divider {
  text-align: center;
  margin: 28px 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 30px);
  height: 1px;
  background: var(--surface-line);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-foot {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-foot a { color: var(--brand-blue-light); text-decoration: none; }

/* ─── Portal footer ─── */
.portal-footer {
  background: var(--bg-base);
  border-top: 1px solid var(--surface-line);
  padding: 24px 0;
}
.portal-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.portal-footer-links { display: flex; gap: 18px; }
.portal-footer-links a { color: var(--text-muted); text-decoration: none; }
.portal-footer-links a:hover { color: var(--brand-blue-light); }

@media (max-width: 640px) {
  .portal-footer-inner { flex-direction: column; text-align: center; }
}

/* =========================================================
   ADMIN — slight variations
   ========================================================= */

.admin-body { background: #050811; }

.admin-header {
  background: rgba(5, 8, 17, 0.98);
  border-bottom: 1px solid var(--surface-line);
}
.admin-header .portal-brand-sub { color: var(--brand-red-light); }

.admin-sidebar {
  width: 240px;
  background: var(--bg-base);
  border-right: 1px solid var(--surface-line);
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-sidebar a {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s;
}
.admin-sidebar a:hover { background: rgba(255, 255, 255, 0.03); color: var(--text-primary); }
.admin-sidebar a.active {
  background: rgba(255, 36, 64, 0.1);
  color: var(--text-primary);
  border-left: 2px solid var(--brand-red);
}
.admin-sidebar-section {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 14px 8px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
@media (max-width: 880px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
}
.admin-content { padding: 36px 32px; max-width: 100%; }

/* Data tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-glass);
  border: 1px solid var(--surface-line);
  border-radius: 14px;
  overflow: hidden;
}
.data-table th,
.data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--surface-line);
  font-size: 0.9rem;
}
.data-table th {
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.data-table .row-actions {
  display: flex;
  gap: 8px;
}
.data-table .row-actions a {
  font-size: 0.8rem;
  color: var(--brand-blue-light);
  text-decoration: none;
}
.data-table .row-actions a.danger { color: var(--brand-red-light); }

.btn-mini {
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  border-radius: 6px;
  border: 1px solid var(--surface-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-mini:hover { color: var(--text-primary); border-color: var(--brand-blue); }
.btn-mini.danger:hover { border-color: var(--brand-red); color: var(--brand-red-light); }
.btn-mini.primary {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-red));
  color: white;
  border: 0;
}

/* Pipeline view (kanban-ish) */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
}
@media (max-width: 1200px) { .pipeline-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .pipeline-grid { grid-template-columns: 1fr; } }

.pipeline-col {
  background: var(--surface-glass);
  border: 1px solid var(--surface-line);
  border-radius: 12px;
  padding: 14px;
  min-height: 200px;
}
.pipeline-col-head {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}
.pipeline-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--surface-line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 0.85rem;
}
.pipeline-card a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}
.pipeline-card small {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* =========================================================
   ONBOARDING — Candidate portal
   ========================================================= */
.onboarding-progress {
  margin: 0 0 30px;
  padding: 20px 22px;
  background: linear-gradient(135deg, rgba(26, 77, 255, 0.06), rgba(255, 36, 64, 0.04));
  border: 1px solid var(--surface-line);
  border-radius: 14px;
}
.onboarding-progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 100px;
  overflow: hidden;
}
.onboarding-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3ec85a, #1a8f3f);
  border-radius: 100px;
  transition: width 0.6s ease;
}
.onboarding-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
}
.onboarding-progress-meta strong { color: var(--text-primary); }

.onboarding-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.onboarding-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 28px;
  background: var(--surface-glass);
  border: 1px solid var(--surface-line);
  border-radius: 16px;
  transition: all 0.25s;
}
.onboarding-step:hover { border-color: rgba(26, 77, 255, 0.25); }
.onboarding-step.is-done {
  background: rgba(110, 233, 168, 0.04);
  border-color: rgba(110, 233, 168, 0.3);
}

.onboarding-step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  background: rgba(26, 77, 255, 0.12);
  color: var(--brand-blue-light);
  border: 2px solid rgba(26, 77, 255, 0.25);
  font-size: 0.95rem;
}
.onboarding-step.is-done .onboarding-step-num {
  background: #1a8f3f;
  border-color: #1a8f3f;
  color: white;
}

.onboarding-step-body h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
}
.onboarding-step-body p {
  margin: 0 0 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}
.onboarding-step-status {
  font-size: 0.85rem;
  color: #6ee9a8;
  margin: 0 0 14px !important;
  font-family: var(--font-mono);
}
.onboarding-policies {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.onboarding-policy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--surface-line);
  border-radius: 10px;
  flex-wrap: wrap;
}
.onboarding-policy-row.is-acked {
  background: rgba(110, 233, 168, 0.04);
  border-color: rgba(110, 233, 168, 0.2);
}
.onboarding-policy-title {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
}
.onboarding-policy-meta {
  display: block;
  font-size: 0.78rem;
  color: #6ee9a8;
  font-family: var(--font-mono);
  margin-top: 4px;
}
.onboarding-complete {
  margin-top: 30px;
  padding: 36px 32px;
  background: linear-gradient(135deg, rgba(110, 233, 168, 0.06), rgba(26, 77, 255, 0.04));
  border: 1px solid rgba(110, 233, 168, 0.3);
  border-radius: 16px;
  text-align: center;
}
.onboarding-complete h2 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0 0 12px;
}

@media (max-width: 640px) {
  .onboarding-step { grid-template-columns: 1fr; gap: 16px; padding: 22px 20px; }
}

/* Notification badge in nav for onboarding */
.notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 100px;
  background: var(--brand-red);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  font-family: var(--font-mono);
}


/* =========================================================
   ONBOARDING FORM — Candidate-facing
   ========================================================= */
.form-sec-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.1em;
  margin-right: 10px;
  vertical-align: 2px;
}
.docs-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.doc-upload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--surface-line);
  border-radius: 10px;
  flex-wrap: wrap;
}
.doc-upload-row.is-uploaded {
  background: rgba(110, 233, 168, 0.05);
  border-color: rgba(110, 233, 168, 0.25);
}
.doc-upload-info { flex: 1; min-width: 240px; }
.doc-upload-label {
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.doc-upload-meta {
  font-size: 0.78rem;
  color: #6ee9a8;
  font-family: var(--font-mono);
}
.doc-upload-row input[type="file"] {
  max-width: 220px;
  font-size: 0.82rem;
  padding: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--surface-line);
  border-radius: 6px;
  color: var(--text-secondary);
}
@media (max-width: 640px) {
  .doc-upload-row { flex-direction: column; align-items: stretch; }
  .doc-upload-row form { width: 100%; flex-direction: column; }
  .doc-upload-row input[type="file"] { max-width: 100%; }
}

/* Onboarding form row full-width helper */
.portal-form-row.full { grid-template-columns: 1fr !important; }


/* =========================================================
   DPDP FORM CONSENT BLOCKS (inside onboarding form)
   ========================================================= */
.dpdp-form-consent {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}
.dpdp-form-check {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--surface-line);
  border-radius: 10px;
  cursor: pointer;
  align-items: flex-start;
  transition: border-color 0.15s, background 0.15s;
}
.dpdp-form-check:hover { border-color: rgba(26, 77, 255, 0.3); }
.dpdp-form-check input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--brand-blue);
  cursor: pointer;
}
.dpdp-form-check input[type="checkbox"]:checked + div {
  color: var(--text-primary);
}
.dpdp-form-check strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.dpdp-form-check small {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.dpdp-form-check small a { color: var(--brand-blue-light); }
.dpdp-form-check:has(input:checked) {
  background: rgba(110, 233, 168, 0.04);
  border-color: rgba(110, 233, 168, 0.2);
}


.admin-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-red));
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  font-family: var(--font-mono);
  vertical-align: 1px;
}

/* =========================================================
   CURSOR — portal always shows native cursor (separate from website)
   ========================================================= */
body.portal-body, body.portal-body * { cursor: auto !important; }
body.portal-body a, body.portal-body button, body.portal-body select, body.portal-body [role="button"], body.portal-body .btn-mini, body.portal-body .btn-primary, body.portal-body .btn-ghost, body.portal-body input[type="submit"], body.portal-body input[type="button"], body.portal-body input[type="checkbox"], body.portal-body input[type="radio"], body.portal-body label { cursor: pointer !important; }
body.portal-body input[type="text"], body.portal-body input[type="email"], body.portal-body input[type="password"], body.portal-body input[type="number"], body.portal-body input[type="tel"], body.portal-body input[type="date"], body.portal-body textarea { cursor: text !important; }
body.portal-body input[disabled], body.portal-body button[disabled] { cursor: not-allowed !important; }
body.portal-body .cursor-dot, body.portal-body .cursor-ring { display: none !important; }

/* =========================================================
   AUTH BRANDED PAGES — mobile responsive overrides
   ========================================================= */
@media (max-width: 768px) {
  /* On small screens, scale the image to focus on the centre, dim it for legibility */
  .auth-page-bg {
    background-position: center center;
  }
  .auth-page-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 9, 20, 0.55) 0%, rgba(6, 9, 20, 0.4) 50%, rgba(6, 9, 20, 0.55) 100%);
  }
  .auth-center-only { padding: 20px 14px; }
  .auth-card { padding: 28px 24px; border-radius: 18px; }
  .auth-card h1 { font-size: 1.55rem; }
}

/* Branded auth pages: hide top header chrome */
body.auth-branded .portal-header,
body.auth-branded .portal-footer {
  display: none;
}

/* (Auth side-panel grid removed — image now provides side branding directly) */


/* =========================================================
   IN-PORTAL POLICY DOCUMENT VIEWER
   ========================================================= */
.policy-document {
  max-height: 60vh;
  overflow-y: auto;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--surface-line);
  border-radius: 12px;
  line-height: 1.75;
  font-size: 0.94rem;
  color: var(--text-secondary);
  scroll-behavior: smooth;
}
.policy-document::-webkit-scrollbar { width: 8px; }
.policy-document::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); border-radius: 4px; }
.policy-document::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
.policy-document::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.policy-document h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--surface-line);
}
.policy-document h2:first-child { margin-top: 0; }
.policy-document h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 22px 0 10px;
}
.policy-document h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 18px 0 8px;
}
.policy-document p { margin: 0 0 12px; }
.policy-document ul {
  margin: 8px 0 16px;
  padding-left: 24px;
}
.policy-document li { margin-bottom: 6px; }
.policy-document strong { color: var(--text-primary); }

/* =========================================================
   ONBOARDING — PREMIUM POLISH (Round 3)
   ========================================================= */

/* Lift step cards with subtle shadow + gradient border on hover */
.onboarding-step {
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  overflow: hidden;
}
.onboarding-step::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(26,77,255,0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.onboarding-step:hover {
  border-color: rgba(26, 77, 255, 0.4);
  box-shadow: 0 8px 24px rgba(26, 77, 255, 0.1);
  transform: translateY(-1px);
}
.onboarding-step:hover::before { opacity: 1; }
.onboarding-step.is-done::before {
  background: linear-gradient(90deg, transparent, rgba(110, 233, 168, 0.5), transparent);
  opacity: 0.7;
}

/* Step number — premium 3D feel */
.onboarding-step-num {
  box-shadow: inset 0 0 0 1px rgba(26,77,255,0.1), 0 2px 8px rgba(26,77,255,0.15);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.onboarding-step.is-done .onboarding-step-num {
  box-shadow: inset 0 0 0 1px rgba(110,233,168,0.3), 0 2px 12px rgba(110, 233, 168, 0.3);
}

/* Progress bar — animated stripes when not at 100% */
.onboarding-progress-fill {
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-red));
  background-size: 200% 100%;
  animation: progressFlow 3s ease infinite;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes progressFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Onboarding policies row — premium hover */
.onboarding-policy-row {
  transition: all 0.2s;
  position: relative;
}
.onboarding-policy-row:hover:not(.is-acked) {
  background: rgba(26, 77, 255, 0.04);
  border-color: rgba(26, 77, 255, 0.3);
  transform: translateX(2px);
}
.onboarding-policy-row.is-acked .onboarding-policy-title::before {
  content: "✓ ";
  color: #6ee9a8;
  font-weight: 600;
}

/* Completion banner — celebratory */
.onboarding-complete {
  padding: 36px 32px;
  text-align: center;
  background: linear-gradient(135deg, rgba(26,77,255,0.08), rgba(255,36,64,0.08));
  border: 1px solid rgba(26,77,255,0.3);
  border-radius: 18px;
  margin-top: 24px;
  animation: completeSlideIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes completeSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.onboarding-complete h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 12px;
  background: linear-gradient(135deg, var(--brand-blue-light), var(--brand-red-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Step body buttons get clearer focus */
.onboarding-step .btn-primary,
.onboarding-step .btn-mini {
  transition: all 0.2s;
}
.onboarding-step .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(26, 77, 255, 0.35);
}

/* Form section number badge — premium */
.form-sec-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(26,77,255,0.15), rgba(26,77,255,0.05));
  border: 1px solid rgba(26,77,255,0.25);
  color: var(--brand-blue-light);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 14px;
  vertical-align: middle;
}

/* Form section card heads — better separation */
.portal-card-head {
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--surface-line);
}
.portal-card-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 0;
  display: flex;
  align-items: center;
}

/* Pending items list — punchy */
.portal-card ul li {
  position: relative;
  transition: all 0.2s;
}

/* Application card with offer banner — pulse animation */
@keyframes offerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 77, 255, 0); }
  50% { box-shadow: 0 0 0 4px rgba(26, 77, 255, 0.08); }
}
