/* ═══════════════════════════════════════════════════════════
   JOLAG Manpower Portal — Global Design System
   Typeface: Outfit (Google Fonts)
   Brand extracted from JOLAG logo files
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  /* Brand */
  --brand:            #2E9EA6;
  --brand-hover:      #268D94;
  --brand-light:      #48B8BC;
  --brand-pale:       #EDF8F9;
  --brand-pale-hover: #DFF3F5;

  /* Dark (sidebar + login) */
  --bg-dark:        #1D3038;
  --bg-dark-alt:    #243A44;
  --bg-dark-hover:  #2A4452;
  --bg-dark-active: rgba(46,158,166,.18);
  --border-dark:    rgba(255,255,255,.08);

  /* Light surfaces */
  --surface:        #F3F7F8;
  --surface-alt:    #E9EFF0;
  --white:          #FFFFFF;
  --border:         #D0E4E6;
  --border-light:   #E5ECED;

  /* Text */
  --ink:        #1E2528;
  --ink-soft:   #3D5559;
  --ink-muted:  #6B8A8D;
  --ink-faint:  #9DB5B8;

  /* Layout */
  --sidebar-w:    240px;
  --topbar-h:     60px;
  --content-pad:  24px;

  /* Radius */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-pill: 20px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(30,37,40,.06);
  --shadow-sm: 0 1px 4px rgba(30,37,40,.08);
  --shadow-md: 0 3px 10px rgba(30,37,40,.10);
  --shadow-lg: 0 8px 24px rgba(30,37,40,.14);

  /* Timing */
  --t: 150ms ease;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.5;
}
a   { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ─── Typography ─────────────────────────────────────────── */
h1 { font-size: 1.25rem; font-weight: 600; }
h2 { font-size: 1.125rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }

.t-display { font-size: 1.75rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.t-title   { font-size: 1.375rem; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.t-label   { font-size: .8125rem; font-weight: 500; line-height: 1.4; }
.t-small   { font-size: .75rem;   font-weight: 400; line-height: 1.4; }
.t-muted   { color: var(--ink-muted); }
.t-soft    { color: var(--ink-soft); }

/* ─── Status Pills ───────────────────────────────────────── */
/* Each of the 12 workflow stages gets a distinct color */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: var(--r-pill);
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.6;
}
.status::before {
  content: '';
  flex-shrink: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .75;
}

.s-cv_submitted          { background: #F0F4F5; color: #526669; }
.s-under_review          { background: #FFF5E6; color: #9A6000; }
.s-selected              { background: #E8EEFF; color: #2C4EC9; }
.s-selection_confirmed   { background: #EDE8FF; color: #5A30C8; }
.s-offer_letter_issued   { background: #F4E8FF; color: #7A28B8; }
.s-offer_letter_signed   { background: #FFE8F5; color: #B82880; }
.s-documents_submitted   { background: #E8F4ED; color: #1E7D3E; }
.s-payment_50_confirmed  { background: #E5F5EC; color: #1A6E3A; }
.s-visa_applied          { background: #FFF0E8; color: #C04A00; }
.s-visa_approved         { background: #E6F5F7; color: #1A7880; }
.s-full_payment_received { background: #E0F4F5; color: #167580; }
.s-tickets_issued        { background: var(--brand-pale); color: var(--brand); }

/* ─── Form Elements ──────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .9375rem;
  color: var(--ink);
  background: #FAFCFC;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.field input:focus,
.field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(46,158,166,.14);
  background: var(--white);
}
.field input::placeholder { color: var(--ink-faint); }
.field .error-msg {
  margin-top: 5px;
  font-size: .75rem;
  color: #C0392B;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  transition: background var(--t), color var(--t), box-shadow var(--t);
  cursor: pointer;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}
.btn:active:not(:disabled) { opacity: .9; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); box-shadow: 0 2px 8px rgba(46,158,166,.35); }

.btn-secondary { background: var(--surface-alt); color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--border); }

.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-alt); color: var(--ink); }

.btn-danger { background: #FFF0EE; color: #C0392B; }
.btn-danger:hover:not(:disabled) { background: #FFE2DE; }

.btn-sm { padding: 6px 12px; font-size: .8125rem; }
.btn-lg { padding: 12px 24px; font-size: .9375rem; }
.btn-block { width: 100%; }

/* ─── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}

/* ─── App Shell (Sidebar + Main) ─────────────────────────── */
.app {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.sidebar-logo {
  padding: 18px 20px 15px;
  border-bottom: 1px solid var(--border-dark);
  flex-shrink: 0;
}
.sidebar-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.sidebar-logo-fallback {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo-circles {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-logo-circle {
  border-radius: 50%;
  flex-shrink: 0;
}
.lc-lg { width: 14px; height: 14px; background: var(--brand); }
.lc-sm { width: 9px;  height: 9px;  background: var(--brand-light); }
.lc-xs { width: 6px;  height: 6px;  background: rgba(46,158,166,.4); }
.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.slt-top    { font-size: .9375rem; font-weight: 700; color: var(--white); letter-spacing: .01em; }
.slt-bottom { font-size: .75rem;   font-weight: 400; color: rgba(255,255,255,.45); }

.nav {
  flex: 1;
  padding: 10px 10px;
  overflow-y: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav-section { margin-bottom: 2px; }
.nav-section-label {
  padding: 10px 10px 4px;
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: rgba(255,255,255,.25);
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 400;
  color: rgba(255,255,255,.60);
  cursor: pointer;
  transition: background var(--t), color var(--t);
  margin-bottom: 1px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover {
  background: var(--bg-dark-hover);
  color: rgba(255,255,255,.88);
}
.nav-item.active {
  background: var(--bg-dark-active);
  color: var(--brand-light);
  font-weight: 500;
}
.nav-item svg { flex-shrink: 0; width: 20px; height: 20px; }
.nav-badge {
  margin-left: auto;
  background: rgba(46,158,166,.2);
  color: var(--brand-light);
  font-size: .625rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 10px 10px 14px;
  border-top: 1px solid var(--border-dark);
  flex-shrink: 0;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.user-chip:hover { background: var(--bg-dark-hover); }
.user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(46,158,166,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 600;
  color: var(--brand-light);
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: .8125rem;
  font-weight: 500;
  color: rgba(255,255,255,.88);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: .6875rem;
  color: rgba(255,255,255,.35);
  line-height: 1.2;
}

/* ─── Main Content Area ──────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Topbar ─────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  padding: 0 var(--content-pad);
  gap: 12px;
}
.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
}

.search-wrap { position: relative; }
.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ink-muted);
  flex-shrink: 0;
}
.search-wrap input {
  padding: 7px 13px 7px 33px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-pill);
  font-size: .875rem;
  color: var(--ink);
  outline: none;
  width: 220px;
  transition: border-color var(--t), width var(--t);
}
.search-wrap input:focus {
  border-color: var(--brand);
  width: 280px;
  box-shadow: 0 0 0 3px rgba(46,158,166,.10);
}
.search-wrap input::placeholder { color: var(--ink-faint); }

/* ─── Content ────────────────────────────────────────────── */
.content {
  flex: 1;
  padding: var(--content-pad);
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* ─── Stats Row ──────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
}
.stat-icon {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--brand-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}
.stat-label {
  font-size: .75rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}
.stat-sub {
  font-size: .75rem;
  color: var(--ink-muted);
}

/* ─── Filter Bar ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 5px 13px;
  border-radius: var(--r-pill);
  font-size: .8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  background: var(--white);
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
  font-family: inherit;
}
.filter-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-pale); }
.filter-chip.active { background: var(--brand); border-color: var(--brand); color: var(--white); }

.filter-sep { width: 1px; height: 22px; background: var(--border); flex-shrink: 0; }

/* ─── Table ──────────────────────────────────────────────── */
.table-wrap {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }

thead { background: var(--surface); border-bottom: 1px solid var(--border-light); }
th {
  padding: 10px 16px;
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
  letter-spacing: .01em;
}
td {
  padding: 13px 16px;
  font-size: .875rem;
  color: var(--ink);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFCFC; }

.cand-name { font-weight: 500; color: var(--ink); line-height: 1.3; }
.cand-role { font-size: .8125rem; color: var(--ink-muted); margin-top: 1px; }

.partner-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}
.partner-flag { font-size: 1.1rem; line-height: 1; }

.action-btn {
  padding: 5px 11px;
  border-radius: var(--r-sm);
  font-size: .8125rem;
  font-weight: 500;
  transition: background var(--t);
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.action-view { background: var(--brand-pale); color: var(--brand); }
.action-view:hover { background: var(--brand-pale-hover); }

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-top: 1px solid var(--border-light);
  font-size: .8125rem;
  color: var(--ink-muted);
}
.pagination { display: flex; gap: 3px; }
.page-btn {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  font-size: .8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background var(--t);
  color: var(--ink-soft);
  background: transparent;
  font-family: inherit;
}
.page-btn:hover { background: var(--surface-alt); }
.page-btn.active { background: var(--brand); color: var(--white); font-weight: 600; }

/* ─── Workflow Rail ───────────────────────────────────────── */
/* The distinctive 12-step progress rail on candidate detail */
.workflow-rail {
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  margin-bottom: 20px;
}
.workflow-rail-title {
  font-size: .75rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.workflow-track {
  position: relative;
  display: flex;
  align-items: flex-start;
}
.workflow-line {
  position: absolute;
  top: 11px;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--border-light);
  z-index: 0;
}
.workflow-line-fill {
  height: 100%;
  background: var(--brand);
  transition: width 400ms cubic-bezier(.4,0,.2,1);
  border-radius: 1px;
}
.workflow-steps {
  display: flex;
  justify-content: space-between;
  flex: 1;
  position: relative;
  z-index: 1;
  gap: 2px;
}
.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  cursor: default;
}
.step-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 7px;
  transition: all 200ms ease;
  flex-shrink: 0;
}
.step-dot svg { display: none; }
.workflow-step.done .step-dot {
  background: var(--brand);
  border-color: var(--brand);
}
.workflow-step.done .step-dot svg { display: block; }
.workflow-step.current .step-dot {
  background: var(--white);
  border-color: var(--brand);
  border-width: 3px;
  box-shadow: 0 0 0 4px rgba(46,158,166,.14);
}
.step-label {
  font-size: .625rem;
  font-weight: 500;
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.3;
  max-width: 56px;
}
.workflow-step.done .step-label { color: var(--brand); }
.workflow-step.current .step-label { color: var(--ink); font-weight: 600; }

/* ─── Modal / Overlay ─────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16,26,30,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn 150ms ease;
}
.modal {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 180ms ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
}
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.close-btn {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  transition: background var(--t);
  cursor: pointer;
  border: none;
  background: none;
}
.close-btn:hover { background: var(--surface-alt); color: var(--ink); }

/* ─── Toast ──────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-md);
  font-size: .875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideUp 180ms ease;
  min-width: 220px;
  max-width: 340px;
}
.toast.success { background: #1A7540; }
.toast.error   { background: #B53030; }
.toast.info    { background: var(--bg-dark); }

/* ─── Empty State ─────────────────────────────────────────── */
.empty-state {
  padding: 56px 20px;
  text-align: center;
}
.empty-state svg { margin: 0 auto 14px; color: var(--ink-faint); }
.empty-state h3  { font-size: 1rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.empty-state p   { font-size: .875rem; color: var(--ink-muted); max-width: 280px; margin: 0 auto; }

/* ─── Loading Spinner ─────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 500ms linear infinite;
  flex-shrink: 0;
}
.spinner.dark {
  border-color: rgba(46,158,166,.2);
  border-top-color: var(--brand);
}

/* ─── Utility ─────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.w-full { width: 100%; }
.text-right { text-align: right; }

/* ─── Keyframes ───────────────────────────────────────────── */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 220ms ease; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px; }
  .workflow-steps { gap: 0; }
  .step-label { display: none; }
}
@media (max-width: 540px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .filter-bar { gap: 4px; }
}

/* ─── Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   ALIAS + MISSING CLASS FIXES
   The HTML was written with different class names than main.css defines.
   These rules bridge the gap without touching either the HTML or the
   original CSS rules above.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Layout aliases ───────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}
.main-area {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--surface);
}

/* ── Sidebar aliases ──────────────────────────────────────── */
.sidebar-nav {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-user {
  padding: 10px 10px 14px;
  border-top: 1px solid var(--border-dark);
  flex-shrink: 0;
}

.user-logout {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  color: rgba(255,255,255,.45);
  cursor: pointer;
  transition: background var(--t), color var(--t);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  margin-top: 4px;
  font-family: inherit;
}
.user-logout:hover { background: var(--bg-dark-hover); color: rgba(255,255,255,.75); }

/* ── Topbar extras ────────────────────────────────────────── */
.topbar-toggle {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-muted);
  transition: background var(--t);
}
.topbar-toggle:hover { background: var(--surface-alt); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Status pill alias ────────────────────────────────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
}
.status-pill.s-cv_submitted    { background: rgba(46,158,166,.12);  color: var(--brand); }
.status-pill.s-under_review    { background: rgba(234,179,8,.12);   color: #A16207; }
.status-pill.s-shortlisted     { background: rgba(59,130,246,.12);  color: #1D4ED8; }
.status-pill.s-interview       { background: rgba(168,85,247,.12);  color: #7E22CE; }
.status-pill.s-offer_extended  { background: rgba(249,115,22,.12);  color: #C2410C; }
.status-pill.s-offer_accepted  { background: rgba(34,197,94,.12);   color: #15803D; }
.status-pill.s-medical_fitness { background: rgba(20,184,166,.12);  color: #0F766E; }
.status-pill.s-visa_processing { background: rgba(99,102,241,.12);  color: #4338CA; }
.status-pill.s-flight_booking  { background: rgba(236,72,153,.12);  color: #BE185D; }
.status-pill.s-arrived         { background: rgba(34,197,94,.12);   color: #15803D; }
.status-pill.s-onboarding      { background: rgba(234,179,8,.12);   color: #A16207; }
.status-pill.s-active          { background: rgba(34,197,94,.12);   color: #15803D; }
.status-pill.s-rejected        { background: rgba(239,68,68,.12);   color: #B91C1C; }

/* ── Modal aliases ────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16,26,30,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn 150ms ease;
}
.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.modal-close {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  transition: background var(--t);
  cursor: pointer;
  border: none;
  background: none;
}
.modal-close:hover { background: var(--surface-alt); color: var(--ink); }

/* ── Table aliases ────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #FAFCFC; }
.candidate-name { font-weight: 500; color: var(--ink); line-height: 1.3; }
.candidate-meta { font-size: .8125rem; color: var(--ink-muted); margin-top: 1px; }
.action-cell    { text-align: right; white-space: nowrap; }
.btn-row-action {
  padding: 5px 11px;
  border-radius: var(--r-sm);
  font-size: .8125rem;
  font-weight: 500;
  background: var(--brand-pale);
  color: var(--brand);
  border: none;
  cursor: pointer;
  transition: background var(--t);
  font-family: inherit;
}
.btn-row-action:hover { background: var(--brand-pale-hover); }
.table-empty {
  text-align: center;
  padding: 40px;
  color: var(--ink-muted);
  font-size: .875rem;
}

/* ── Filter / search bar ──────────────────────────────────── */
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.select-compact {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .8125rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  outline: none;
  transition: border-color var(--t);
}
.select-compact:focus { border-color: var(--brand); }

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input {
  width: 220px;
  padding: 7px 10px 7px 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: .875rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color var(--t);
}
.search-input::placeholder { color: var(--ink-faint); }
.search-input:focus { border-color: var(--brand); }
.search-icon {
  position: absolute;
  left: 9px;
  color: var(--ink-faint);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* ── Meta separator ───────────────────────────────────────── */
.meta-sep { color: var(--ink-faint); margin: 0 3px; }

/* ── Candidate detail view ────────────────────────────────── */
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}
.detail-name {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.detail-meta {
  font-size: .875rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.detail-section {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 20px;
}
.detail-section-title {
  font-size: .75rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
  font-size: .8125rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-row-label { color: var(--ink-muted); flex-shrink: 0; }
.detail-row-value { color: var(--ink); text-align: right; }

/* ── Workflow card wrapper ────────────────────────────────── */
.workflow-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
}

/* ── Two-column form row ──────────────────────────────────── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Empty state aliases ──────────────────────────────────── */
.empty-icon {
  display: flex;
  justify-content: center;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  text-align: center;
}
.empty-body {
  font-size: .875rem;
  color: var(--ink-muted);
  max-width: 280px;
  margin: 0 auto;
  text-align: center;
}

/* ── Back button ──────────────────────────────────────────── */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--t), color var(--t);
  font-family: inherit;
  margin-bottom: 16px;
}
.btn-back:hover { background: var(--surface-alt); color: var(--ink); }

/* ── Responsive overrides for new aliases ─────────────────── */
@media (max-width: 768px) {
  .main-area    { margin-left: 0; }
  .detail-grid  { grid-template-columns: 1fr; }
  .field-row    { grid-template-columns: 1fr; }
  .search-input { width: 160px; }
}
@media (max-width: 540px) {
  .detail-grid { grid-template-columns: 1fr; }
}
