/* ══════════════════════════════════════════════════════════════════
   APP V4 — Recruiting App Pages
   Warm Swiss minimalism. Replaces inline CSS on all app pages.
   ══════════════════════════════════════════════════════════════════ */

/* ═══ DESIGN TOKENS ═══ */
:root {
  --bg:          #F8F7F4;
  --bg-warm:     #F3F1EC;
  --bg-card:     #FFFFFF;
  --bg-hover:    #FAFAF7;
  --bg-elevated: #FCFBF9;
  --bg-inset:    #EFEEE9;

  --border:       #E6E3DC;
  --border-light: #EDEBE5;
  --border-hover: #D4D0C7;

  --ink:   #1B1918;
  --ink-2: #4A4643;
  --ink-3: #7A756F;
  --ink-4: #A9A39B;
  --ink-5: #CBC6BE;

  --gold:      #B8860B;
  --gold-hot:  #D4A03E;
  --gold-soft: rgba(184,134,11,0.08);
  --gold-med:  rgba(184,134,11,0.14);
  --gold-text: #8B6914;
  --gold-dark: #8B6914;
  --gold-light: #fef3c7;

  --teal:      #0D9488;
  --teal-soft: rgba(13,148,136,0.07);
  --coral:     #DC4A3A;
  --coral-soft:rgba(220,74,58,0.07);
  --amber:     #D97706;
  --amber-soft:rgba(217,119,6,0.07);
  --blue:      #2563EB;
  --blue-soft: rgba(37,99,235,0.07);
  --green:     #16a34a;

  /* Legacy aliases for JS/existing refs */
  --navy:    #1B1918;
  --slate:   #7A756F;
  --light:   #F8F7F4;
  --success: #16a34a;
  --warning: #D97706;
  --error:   #DC4A3A;
  --info:    #2563EB;

  --font-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:    'DM Sans', 'Plus Jakarta Sans', system-ui, sans-serif;

  --sh-xs: 0 1px 2px rgba(27,25,24,0.04);
  --sh-sm: 0 1px 3px rgba(27,25,24,0.05), 0 1px 2px rgba(27,25,24,0.03);
  --sh-md: 0 4px 12px rgba(27,25,24,0.06), 0 1px 3px rgba(27,25,24,0.04);
  --sh-lg: 0 8px 28px rgba(27,25,24,0.07), 0 2px 6px rgba(27,25,24,0.04);

  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-full: 9999px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur:  180ms;
}

/* ═══ DARK MODE ═══ */
:root[data-theme="dark"] {
  --bg:          #0F0E0C;
  --bg-warm:     #15130F;
  --bg-card:     #1A1814;
  --bg-hover:    #22201B;
  --bg-elevated: #1F1D18;
  --bg-inset:    #13110E;
  --border:      #2F2A22;
  --border-light:#262118;
  --border-hover:#3D3630;
  --ink:   #F5F2EA;
  --ink-2: #D4CFC3;
  --ink-3: #A9A39B;
  --ink-4: #7A756F;
  --ink-5: #4A4643;
  --gold:      #D4A03E;
  --gold-hot:  #E8BC5A;
  --gold-soft: rgba(212,160,62,0.1);
  --gold-med:  rgba(212,160,62,0.18);
  --gold-text: #D4A03E;
  --gold-dark: #D4A03E;
  --navy: #F5F2EA;
  --slate:#A9A39B;
  --light:#1A1814;
}

/* ═══ RESET & BASE ═══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
::selection { background: var(--gold-med); color: var(--ink); }

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

/* ═══ HEADER ═══ */
.header {
  background: rgba(248, 247, 244, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  box-shadow: var(--sh-xs);
}
:root[data-theme="dark"] .header {
  background: rgba(15, 14, 12, 0.85);
}

.header-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--gold), var(--gold-hot));
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(184,134,11,0.2);
}

.header-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.header-title span { color: var(--ink-3); font-weight: 400; }

.header-divider {
  color: var(--border-hover);
  font-weight: 200;
  font-size: 1.2rem;
  margin: 0 0.1rem;
}

.header-app {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-3);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-left: auto;
}

.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-xs);
  color: var(--ink-3);
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}
.header-icon-btn:hover { background: var(--bg-inset, #F0EDE8); color: var(--ink-2); }

.header-avatar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-text);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.header-avatar-btn:hover { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-hot));
  color: white;
  box-shadow: var(--sh-xs);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184,134,11,0.35);
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink-2);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-warm);
  border-color: var(--border-hover);
}

.btn-success {
  background: var(--green);
  color: white;
}
.btn-success:hover { opacity: 0.9; }

.btn-danger {
  background: var(--coral);
  color: white;
}
.btn-danger:hover { opacity: 0.9; }

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

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* ═══ LAYOUT ═══ */
.layout {
  min-height: 100vh;
  padding-top: 60px;
}

#sidebar-partial { display: contents; }

/* ═══ SIDEBAR ═══ */
.sidebar {
  width: 220px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-light);
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
  transition: width 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed { width: 56px; }

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  overflow-y: auto;
  padding: 1rem 0 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-section {
  margin-bottom: 0.75rem;
}

.sidebar-title {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 1rem 0.375rem;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 180ms;
}
.sidebar.collapsed .sidebar-title { opacity: 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  margin: 1px 6px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-3);
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-link:hover {
  background: var(--bg-hover);
  color: var(--ink);
}
.sidebar-link.active {
  background: var(--gold-soft);
  color: var(--gold-text);
  font-weight: 600;
  margin-left: 0;
  padding-left: calc(1rem - 3px);
  box-shadow: inset 3px 0 0 var(--gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.sidebar-link.active svg { opacity: 1; }

.sidebar-link-text {
  overflow: hidden;
  transition: opacity 180ms, width 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: opacity 120ms;
}
.sidebar-link:hover .sidebar-icon,
.sidebar-link.active .sidebar-icon { opacity: 1; }

/* ── Collapsed ── */
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-link-text,
.sidebar.collapsed .sidebar-user-name,
.sidebar.collapsed .sidebar-user-role {
  opacity: 0;
  width: 0;
  overflow: hidden;
}
.sidebar.collapsed .sidebar-link {
  margin: 1px 4px;
  justify-content: center;
  padding: 0.5rem;
}
.sidebar.collapsed .sidebar-link.active {
  padding-left: 0.5rem;
  margin-left: 0;
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
}
.sidebar.collapsed .sidebar-user {
  justify-content: center;
  padding: 0.75rem 0.25rem;
}
.sidebar.collapsed .sidebar-user-info { display: none; }
.sidebar.collapsed .sidebar-logout-btn { display: none; }

/* ── Collapse button ── */
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.625rem;
  background: none;
  border: none;
  border-top: 1px solid var(--border-light);
  cursor: pointer;
  color: var(--ink-4);
  transition: color 120ms, background 120ms;
  flex-shrink: 0;
}
.sidebar-collapse-btn:hover { color: var(--ink-2); background: var(--bg-hover); }

/* ── Onboarding Link ── */
.sidebar-onboarding-wrap {
  padding: 8px 8px 0;
}
.sidebar-onboarding-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-med);
  border-radius: var(--r-xs);
  color: var(--gold-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms var(--ease), box-shadow 120ms var(--ease);
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}
.sidebar-onboarding-btn:hover {
  background: var(--gold-med);
  box-shadow: var(--sh-xs);
}
.sidebar.collapsed .sidebar-onboarding-btn {
  padding: 8px;
  justify-content: center;
}
.sidebar-collapse-btn svg { transition: transform 220ms cubic-bezier(0.4,0,0.2,1); }
.sidebar.collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }

/* ── User section ── */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
  cursor: pointer;
  transition: background 120ms;
  overflow: hidden;
}
.sidebar-user:hover { background: var(--bg-hover); }
.sidebar.collapsed .sidebar-user { justify-content: center; padding: 0.75rem 0.5rem; }

.sidebar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  transition: opacity 180ms;
}
.sidebar.collapsed .sidebar-user-info { opacity: 0; width: 0; }

.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.6875rem;
  color: var(--ink-4);
}

.sidebar-logout-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-4);
  padding: 0.3rem;
  border-radius: var(--r-xs);
  transition: color 120ms, background 120ms;
  display: flex;
  align-items: center;
}
.sidebar-logout-btn:hover { color: var(--coral, #DC4A3A); background: rgba(220,74,58,0.07); }
.sidebar.collapsed .sidebar-logout-btn { display: none; }

/* ═══ MAIN CONTENT ═══ */
.main {
  min-width: 0;
  margin-left: 220px;
  padding: 2rem;
  transition: margin-left 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar.collapsed + .main { margin-left: 56px; }

/* ═══ PAGE HEADER ═══ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  gap: 1rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-top: 0.25rem;
}

/* ═══ CARDS ═══ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.5rem;
  box-shadow: var(--sh-xs);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-top: 0.2rem;
}

/* ═══ STATS GRID ═══ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-xs);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.stat-card.success::before { background: var(--green); }
.stat-card.warning::before { background: var(--amber); }
.stat-card.info::before    { background: var(--blue); }

.stat-label {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.stat-change {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: var(--ink-4);
}
.stat-change.positive { color: var(--green); }
.stat-change.negative { color: var(--coral); }

/* ═══ DASHBOARD GRID ═══ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.dashboard-grid.full { grid-template-columns: 1fr; }

/* ═══ BADGES / STATUS ═══ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-new       { background: var(--blue-soft);  color: var(--blue); }
.badge-screening { background: var(--gold-soft);  color: var(--gold-text); }
.badge-interview { background: rgba(139,92,246,0.08); color: #7c3aed; }
.badge-offer     { background: var(--teal-soft);  color: var(--teal); }
.badge-hired     { background: rgba(22,163,74,0.08); color: var(--green); }
.badge-rejected  { background: var(--coral-soft); color: var(--coral); }
.badge-draft     { background: var(--bg-inset);   color: var(--ink-3); }
.badge-active    { background: rgba(22,163,74,0.08); color: var(--green); }
.badge-closed    { background: var(--coral-soft); color: var(--coral); }
.badge-paused    { background: var(--amber-soft); color: var(--amber); }

/* ═══ TABLES ═══ */
.table-container { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg);
}
tr:hover td { background: var(--bg-hover); }
tr:last-child td { border-bottom: none; }

/* ═══ FORMS ═══ */
.form-group { margin-bottom: 1.25rem; }

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.375rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="url"],
select,
textarea,
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--bg-card);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  outline: none;
}
input:focus, select:focus, textarea:focus,
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
input::placeholder, textarea::placeholder { color: var(--ink-4); }

/* ═══ EMPTY STATE ═══ */
.empty-state {
  text-align: center;
  padding: 2.5rem 2rem;
  color: var(--ink-3);
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

/* ═══ JOB ITEMS ═══ */
.job-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border-radius: var(--r-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--dur) var(--ease);
  box-shadow: var(--sh-xs);
}
.job-item:hover {
  background: var(--gold-soft);
  border-color: var(--gold);
  box-shadow: var(--sh-sm);
}
.job-item { margin-bottom: 0.5rem; }
.job-item:last-child { margin-bottom: 0; }
.job-info { flex: 1; min-width: 0; }
.job-title { font-weight: 600; font-size: 0.9375rem; color: var(--ink); }
.job-meta  { font-size: 0.8125rem; color: var(--ink-3); margin-top: 0.2rem; }
.job-stats { display: flex; gap: 1rem; align-items: center; }
.job-stat  { text-align: center; }
.job-stat-value { font-size: 1.125rem; font-weight: 700; color: var(--ink); }
.job-stat-label { font-size: 0.6875rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }

/* ═══ ACTIVITY LIST ═══ */
.activity-list { max-height: 300px; overflow-y: auto; }
.activity-item {
  display: flex;
  gap: 0.875rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  background: var(--bg-inset);
  flex-shrink: 0;
}
.activity-icon.new      { background: var(--blue-soft); }
.activity-icon.interview{ background: rgba(139,92,246,0.08); }
.activity-icon.hired    { background: rgba(22,163,74,0.08); }
.activity-icon.rejected { background: var(--coral-soft); }
.activity-content { flex: 1; min-width: 0; }
.activity-text   { font-size: 0.875rem; color: var(--ink-2); }
.activity-text strong { font-weight: 600; color: var(--ink); }
.activity-time   { font-size: 0.75rem; color: var(--ink-4); margin-top: 0.2rem; }

/* ═══ INTERVIEW ITEMS ═══ */
.interview-item {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  border-radius: var(--r-sm);
  background: var(--bg);
  margin-bottom: 0.5rem;
  gap: 1rem;
  border: 1px solid var(--border-light);
}
.interview-item.unscheduled {
  background: var(--amber-soft);
  border-color: var(--amber);
}
.interview-date-col { min-width: 70px; text-align: center; }
.interview-date { font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.interview-time { font-size: 0.75rem; color: var(--ink-3); }
.interview-info { flex: 1; min-width: 0; }
.interview-candidate { font-weight: 600; color: var(--ink); }
.interview-job  { font-size: 0.8125rem; color: var(--ink-3); }
.interview-type { font-size: 0.75rem; color: var(--ink-4); margin-top: 0.2rem; }

/* ═══ PIPELINE ═══ */
.pipeline-section {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.pipeline-title { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; color: var(--ink); }
.pipeline-subtitle { font-size: 0.875rem; color: var(--ink-3); margin-top: 0.2rem; }
.pipeline-total { font-family: var(--font-display); font-size: 2.25rem; font-weight: 800; color: var(--gold-text); }
.pipeline-total-label { font-size: 0.75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.pipeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.875rem;
  margin-top: 0.75rem;
}
.pipeline-stage { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pipeline-icon {
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  margin-bottom: 0.625rem;
  transition: transform var(--dur) var(--ease);
}
.pipeline-stage:hover .pipeline-icon { transform: scale(1.08); }
.pipeline-stage:nth-child(1) .pipeline-icon { background: linear-gradient(135deg, #fef3c7, #fcd34d); }
.pipeline-stage:nth-child(2) .pipeline-icon { background: linear-gradient(135deg, var(--blue-soft), #93c5fd); }
.pipeline-stage:nth-child(3) .pipeline-icon { background: linear-gradient(135deg, rgba(139,92,246,0.1), #c4b5fd); }
.pipeline-stage:nth-child(4) .pipeline-icon { background: linear-gradient(135deg, var(--amber-soft), #fcd34d); }
.pipeline-stage:nth-child(5) .pipeline-icon { background: linear-gradient(135deg, rgba(22,163,74,0.08), #86efac); }
.pipeline-stage:nth-child(6) .pipeline-icon { background: linear-gradient(135deg, var(--coral-soft), #fca5a5); }
.pipeline-count { font-family: var(--font-display); font-size: 1.375rem; font-weight: 700; color: var(--ink); margin-bottom: 0.2rem; }
.pipeline-label { font-size: 0.6875rem; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.pipeline-bar-container {
  width: 100%; height: 90px;
  background: var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-top: 0.625rem;
  display: flex; align-items: flex-end;
}
.pipeline-bar { width: 100%; border-radius: var(--r-sm) var(--r-sm) 0 0; transition: height 0.5s var(--ease); }
.pipeline-stage:nth-child(1) .pipeline-bar { background: linear-gradient(180deg, var(--gold) 0%, var(--gold-hot) 100%); }
.pipeline-stage:nth-child(2) .pipeline-bar { background: linear-gradient(180deg, #60a5fa 0%, var(--blue) 100%); }
.pipeline-stage:nth-child(3) .pipeline-bar { background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%); }
.pipeline-stage:nth-child(4) .pipeline-bar { background: linear-gradient(180deg, #fbbf24 0%, var(--amber) 100%); }
.pipeline-stage:nth-child(5) .pipeline-bar { background: linear-gradient(180deg, #4ade80 0%, var(--green) 100%); }
.pipeline-stage:nth-child(6) .pipeline-bar { background: linear-gradient(180deg, #f87171 0%, #dc2626 100%); }

/* ═══ ANALYTICS ═══ */
.analytics-section {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.analytics-title { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; color: var(--ink); }
.analytics-subtitle { font-size: 0.875rem; color: var(--ink-3); margin-top: 0.2rem; }
.analytics-controls { display: flex; gap: 0.75rem; align-items: center; }
.analytics-controls .form-select { width: auto; }
.analytics-chart-container {
  height: 280px;
  position: relative;
  background: var(--bg-card);
  border-radius: var(--r-sm);
  padding: 1rem;
  box-shadow: var(--sh-xs);
}
.analytics-legend { display: flex; justify-content: center; gap: 2rem; margin-top: 1rem; }
.legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--ink-3); }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; }
.legend-dot.views       { background: linear-gradient(135deg, #60a5fa, var(--blue)); }
.legend-dot.applications{ background: linear-gradient(135deg, var(--gold), var(--gold-hot)); }

/* ═══ USER MENU DROPDOWN ═══ */

/* ═══ MOBILE NAV ═══ */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 0.375rem;
  cursor: pointer;
  color: var(--ink-3);
  border-radius: var(--r-sm);
  transition: all var(--dur) var(--ease);
}
.mobile-menu-btn:hover { background: var(--bg-hover); color: var(--ink); }
.mobile-menu-btn svg { width: 22px; height: 22px; }

.mobile-nav {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0; bottom: 0;
  background: var(--bg-card);
  padding: 1rem;
  z-index: 300;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--ink-3);
  font-weight: 500;
  transition: all var(--dur) var(--ease);
}
.mobile-nav a:hover, .mobile-nav a.active {
  background: var(--bg-hover);
  color: var(--ink);
}
.mobile-nav-divider { height: 1px; background: var(--border); margin: 0.5rem 0; }
.mobile-logout  { color: var(--coral) !important; }
.mobile-onboarding { color: var(--ink) !important; }
.mobile-onboarding-btn { display: none; }

/* ═══ MODALS ═══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27,25,24,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
}
.modal-close {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: none; background: none;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.modal-close:hover { background: var(--bg-hover); color: var(--ink); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ═══ TOASTS ═══ */
#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--sh-md);
  opacity: 0;
  transform: translateX(1rem);
  transition: all var(--dur) var(--ease);
  max-width: 320px;
}
.toast.show { opacity: 1; transform: none; }
.toast-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.toast-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.toast-info    { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }
.toast-warning { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }

/* ═══ LOADING ═══ */
#global-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248,247,244,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  flex-direction: column;
  gap: 0.75rem;
}
#global-loading-overlay.active { display: flex; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ KANBAN ═══ */
.kanban-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  min-height: calc(100vh - 160px);
}
.kanban-column {
  flex: 0 0 280px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 160px);
}
.kanban-column-header {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}
.kanban-column-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink-2);
}
.kanban-count {
  display: flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 0.375rem;
  background: var(--bg-inset);
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-3);
}
.kanban-cards {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.875rem;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  box-shadow: var(--sh-xs);
}
.kanban-card:hover {
  border-color: var(--gold);
  box-shadow: var(--sh-sm);
  transform: translateY(-1px);
}
.kanban-card.dragging { opacity: 0.5; }
.kanban-card-name { font-weight: 600; font-size: 0.9375rem; color: var(--ink); margin-bottom: 0.375rem; }
.kanban-card-job  { font-size: 0.8125rem; color: var(--ink-3); margin-bottom: 0.5rem; }
.kanban-card-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.drop-zone-active { background: var(--gold-soft); border-color: var(--gold); }

/* ═══ APPLICANT CARDS / TABLE ═══ */
.applicant-row { cursor: pointer; }
.applicant-name  { font-weight: 600; color: var(--ink); }
.applicant-meta  { font-size: 0.8125rem; color: var(--ink-3); margin-top: 0.1rem; }
.applicant-email { font-size: 0.8125rem; color: var(--ink-3); }

/* ═══ SEARCH / FILTER BAR ═══ */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.5rem 0.75rem;
  box-shadow: var(--sh-xs);
}
.filter-bar input,
.filter-bar select {
  flex: 1 1 140px;
  min-width: 0;
  height: 34px;
  padding: 0 0.625rem;
  font-size: 0.8125rem;
  background: var(--bg-inset);
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-soft);
  background: var(--bg-card);
  outline: none;
}
.filter-bar input[type="search"],
.filter-bar input[type="text"] {
  flex: 2 1 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%237A756F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.625rem center;
  padding-left: 2.125rem;
}
.filter-bar .checkbox-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
  cursor: pointer;
  white-space: nowrap;
  padding: 0 0.25rem;
}

/* ═══ PAGINATION ═══ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 1.5rem;
}
.pagination-btn {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-card);
  font-size: 0.875rem;
  color: var(--ink-3);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.pagination-btn:hover { border-color: var(--gold); color: var(--gold-text); }
.pagination-btn.active { background: var(--gold); border-color: var(--gold); color: white; font-weight: 600; }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ═══ TABS ═══ */
.tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-inset);
  border-radius: var(--r-sm);
  padding: 0.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.tab {
  padding: 0.4375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: var(--r-xs);
  transition: all var(--dur) var(--ease);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  line-height: 1;
}
.tab:hover { color: var(--ink); background: var(--bg-hover); }
.tab.active { background: var(--gold); color: white; font-weight: 600; box-shadow: var(--sh-xs); }
.tab .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.2);
  color: inherit;
}
.tab:not(.active) .count {
  background: var(--border);
  color: var(--ink-4);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══ MOBILE SIDEBAR OVERLAY ═══ */
.sidebar-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
  backdrop-filter: blur(2px);
}
.sidebar-mobile-overlay.visible { display: block; }

@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: 260px !important;
    transform: translateX(-100%);
    transition: transform 280ms cubic-bezier(0.4,0,0.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
    z-index: 1000;
    overflow-y: auto;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-collapse-btn { display: none; }
  .sidebar.collapsed .sidebar-link-text,
  .sidebar.collapsed .sidebar-title,
  .sidebar.collapsed .sidebar-user-name,
  .sidebar.collapsed .sidebar-user-role { opacity: 1; width: auto; overflow: visible; }
  .sidebar.collapsed .sidebar-link { justify-content: flex-start; padding: 8px 16px; }
  .sidebar.collapsed .sidebar-user { justify-content: flex-start; }
  .sidebar.collapsed .sidebar-user-info { display: block; }
  .sidebar.collapsed .sidebar-logout-btn { display: flex; }
  .header { padding: 0 0.875rem; }
  .mobile-menu-btn { display: flex; }
  .user-name { display: none; }
  .onboarding-link { display: none; }
  .user-menu .btn-secondary { display: none; }
  .main { padding: 1rem; margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-value { font-size: 1.5rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .card { padding: 1rem; }
  .card-header { flex-direction: column; align-items: flex-start; gap: 0.625rem; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .page-title { font-size: 1.25rem; }
  .job-item { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .job-stats { width: 100%; justify-content: space-between; }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .pipeline-bar-container { height: 60px; }
  .analytics-header { flex-direction: column; gap: 0.75rem; }
  .analytics-chart-container { height: 220px; }
  .kanban-board { padding-bottom: 1.5rem; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar input, .filter-bar select { min-width: unset; }
  .mobile-onboarding-btn { display: block; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ═══ EMPTY STATE (erweitert) ═══ */
.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 0.375rem;
}
.empty-state-description {
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-bottom: 1rem;
}
.empty-state-action { margin-top: 1rem; }

/* ═══ LOADING ═══ */
.loading-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 0.75rem;
}
.loading-text { font-size: 0.875rem; color: var(--ink-3); text-align: center; }

/* ═══ BULK ACTIONS ═══ */
.bulk-actions-bar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--gold-soft);
  border: 1px solid var(--gold-med);
  border-radius: var(--r-sm);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.bulk-actions-bar.visible { display: flex; }
.count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold-text);
}

/* ═══ CHECKBOX ═══ */
.applicant-checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: var(--gold); }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-2);
  cursor: pointer;
}

/* ═══ DATE / STATUS BADGES ═══ */
.date-critical { color: var(--coral); font-weight: 600; }
.date-cell { font-size: 0.875rem; color: var(--ink-3); white-space: nowrap; }

.deleted-row { opacity: 0.5; }
.deleted-badge {
  display: inline-flex; align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-full);
  font-size: 0.6875rem; font-weight: 600;
  background: var(--coral-soft); color: var(--coral);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.selected-row td { background: var(--gold-soft) !important; }

.waiting-badge {
  display: inline-flex; align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 600;
  background: var(--bg-inset); color: var(--ink-3);
}
.waiting-badge.critical { background: var(--coral-soft); color: var(--coral); }

.status-since { font-size: 0.75rem; color: var(--ink-4); margin-top: 0.2rem; }

/* ═══ STATUS WORKFLOW (Jobs) ═══ */
.status-badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 600;
}
.workflow-badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--r-full);
  font-size: 0.8125rem; font-weight: 600;
  background: var(--bg-inset); color: var(--ink-2);
}
.workflow-status { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }

/* Workflow stage colours */
.new       { background: var(--blue-soft); color: var(--blue); }
.screening { background: var(--gold-soft); color: var(--gold-text); }
.interview { background: rgba(139,92,246,0.08); color: #7c3aed; }
.offer     { background: var(--teal-soft); color: var(--teal); }
.hired     { background: rgba(22,163,74,0.08); color: var(--green); }
.rejected  { background: var(--coral-soft); color: var(--coral); }
.deadline  { font-size: 0.8125rem; color: var(--ink-3); }
.deadline.overdue { color: var(--coral); font-weight: 600; }

/* ═══ JOB GRID / DETAILS ═══ */
.job-grid {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.job-details { font-size: 0.875rem; color: var(--ink-3); margin-top: 0.25rem; }
.job-actions { display: flex; gap: 0.5rem; flex-shrink: 0; margin-left: 1rem; flex-wrap: wrap; align-items: flex-start; }

/* ═══ KANBAN (erweitert) ═══ */
.kanban-container { display: flex; flex-direction: row; gap: 1rem; overflow-x: auto; height: calc(100vh - 120px); padding-bottom: 1rem; }
.kanban-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; flex-shrink: 0;
}
.kanban-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.kanban-icon  { margin-right: 0.5rem; }
.kanban-empty {
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  color: var(--ink-4); font-size: 0.875rem; text-align: center;
}

.kanban-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.5rem; }
.kanban-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; }
.kanban-card-email  { font-size: 0.75rem; color: var(--ink-4); margin-bottom: 0.375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-card-date   { font-size: 0.75rem; color: var(--ink-4); }
.kanban-card-date.overdue { color: var(--coral); }
.kanban-card-interview { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: var(--teal); margin-top: 0.375rem; }
.kanban-card-status-info { font-size: 0.75rem; color: var(--ink-4); margin-top: 0.2rem; }
.kanban-action-badge {
  display: inline-flex; align-items: center;
  padding: 0.125rem 0.375rem;
  border-radius: var(--r-full);
  font-size: 0.6875rem; font-weight: 600;
  background: var(--gold-soft); color: var(--gold-text);
}
.interview-icon { color: var(--teal); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }

/* ═══ CONTEXT MENU ═══ */
.context-menu {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-lg);
  z-index: 600;
  min-width: 180px;
  overflow: hidden;
  display: none;
}
.context-menu.open { display: block; }
.context-menu-item {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem; color: var(--ink-2);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.context-menu-item:hover { background: var(--bg-hover); color: var(--ink); }
.context-menu-icon { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.6; }

/* ═══ CLOSE BUTTON ═══ */
.close-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border: none; background: none;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  font-size: 1.25rem; line-height: 1;
}
.close-btn:hover { background: var(--bg-hover); color: var(--ink); }

/* ═══ PAGINATION (erweitert) ═══ */
.pagination-controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1.5rem; flex-wrap: wrap; gap: 0.75rem;
}
.pagination-info { font-size: 0.875rem; color: var(--ink-3); }
.page-indicator { font-size: 0.875rem; color: var(--ink-3); }

/* ═══ MODAL (alias) ═══ */
/* .modal als Overlay-Alias entfernt — Seiten nutzen .modal als Content-Box */

/* ═══ ROLLEN-SICHTBARKEIT (aus main.css) ═══ */
.hr-only-section,
.hr-only-link { display: none !important; }

body.role-hr .hr-only-section,
body.role-admin .hr-only-section,
body.role-master-admin .hr-only-section { display: block !important; }

body.role-hr .hr-only-link,
body.role-admin .hr-only-link,
body.role-master-admin .hr-only-link { display: flex !important; }

/* ═══ ERROR STATE ═══ */
.error-state {
  text-align: center;
  padding: 2rem;
  background: var(--coral-soft);
  border: 1px solid rgba(220,74,58,0.2);
  border-radius: var(--r-sm);
  margin: 1rem 0;
}
.error-state-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.error-state-message { color: var(--coral); font-size: 0.875rem; margin-bottom: 1rem; }
.error-state-action { margin-top: 0.5rem; }

/* ═══ SKELETON LOADING ═══ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-inset) 25%, var(--border) 50%, var(--bg-inset) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-xs);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text  { height: 1rem; margin-bottom: 0.5rem; }
.skeleton-text.short { width: 60%; }
.skeleton-title { height: 1.5rem; width: 40%; margin-bottom: 1rem; }
.skeleton-card  { height: 80px; margin-bottom: 1rem; }

/* ═══ BTN LOADING ═══ */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  top: 50%; left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.btn-secondary.btn-loading::after {
  border-color: rgba(0,0,0,0.1);
  border-top-color: var(--ink);
}

/* ═══ TABLE / CARD LOADING ═══ */
.table-loading { position: relative; min-height: 200px; }
.table-loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 32px; height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.card-loading { position: relative; }
.card-loading::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(248,247,244,0.8);
  backdrop-filter: blur(2px);
  z-index: 10; border-radius: inherit;
}
.card-loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 11;
}

/* ═══ MISC ═══ */
.fade-in { animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.form-hint { font-size: 0.75rem; color: var(--ink-3); margin-top: 0.25rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); margin-bottom: 0.375rem; }

.content { padding: 0; max-width: 1400px; margin: 0 auto; width: 100%; }
body > .main { padding: 2rem; max-width: 1400px; margin: 0 auto; }

.badge-withdrawn { background: var(--bg-inset); color: var(--ink-3); }
.btn-warning { background: var(--amber); color: white; }

/* ═══ EDITOR TOOLBAR (shared: applicant, templates) ═══ */
.editor-toolbar {
  display: flex; gap: 0.25rem; flex-wrap: wrap;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.editor-btn {
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--ink-2);
  transition: all var(--dur) var(--ease);
}
.editor-btn:hover { background: var(--gold-soft); border-color: var(--gold-med); color: var(--gold-text); }

/* ═══ CHECKBOX GROUP (shared: jobs-new, jobs-edit) ═══ */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.checkbox-text {
  font-size: 0.875rem;
  color: var(--ink-2);
}
.custom-field-checkbox,
.custom-field-required {
  width: 16px; height: 16px;
  cursor: pointer;
  accent-color: var(--gold);
}

/* ═══ MSG (applicant page) ═══ */
.msg {
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
}
.msg-error {
  background: var(--coral-soft);
  border: 1px solid rgba(220,74,58,0.2);
  color: var(--coral);
}
.msg-success {
  background: rgba(22,163,74,0.07);
  border: 1px solid rgba(22,163,74,0.2);
  color: var(--green);
}

/* ═══ STAR RATING ═══ */
.star {
  cursor: pointer;
  transition: color var(--dur) var(--ease);
  font-size: 1.25rem;
}
.star:hover, .star.active { color: var(--gold) !important; }

/* ═══ DOC ITEM ═══ */
.doc-item {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

/* ═══ HILFE & KONTAKT ═══ */
.sidebar-help-wrap { padding: 6px 8px; }
.sidebar-help-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 16px;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: var(--r-xs, 6px);
  color: var(--ink-3);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: color 120ms, background 120ms, border-color 120ms;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-help-btn:hover { color: var(--ink-2); background: var(--bg-hover); border-color: var(--border); }
.sidebar.collapsed .sidebar-help-btn .sidebar-link-text { display: none; }
.sidebar.collapsed .sidebar-help-btn { padding: 8px; justify-content: center; }

.help-options { display: flex; flex-direction: column; gap: 8px; }
.help-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--r-xs);
  text-decoration: none;
  color: var(--ink);
  transition: background 120ms, border-color 120ms;
}
.help-option:hover { background: var(--bg-inset); border-color: var(--border); }
.help-option-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-xs);
  background: var(--bg-inset);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--ink-2);
}
.help-option-body { flex: 1; min-width: 0; }
.help-option-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.help-option-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.help-option-arrow { color: var(--ink-4); flex-shrink: 0; }

/* ═══ EMAIL BODY ═══ */
.email-body {
  padding: 0.875rem;
  background: var(--bg);
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  line-height: 1.6;
  max-height: 300px;
  overflow-y: auto;
}

/* ══════════════════════════════════════════════════════════════════
   USER SETTINGS MODAL (.us-*)
   ══════════════════════════════════════════════════════════════════ */

.us-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.us-overlay.open { display: flex; }

.us-panel {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  width: 100%;
  max-width: 400px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
}

.us-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.us-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700;
  flex-shrink: 0;
}
.us-header-info { flex: 1; min-width: 0; }
.us-name {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.us-role { font-size: 12px; color: var(--ink-4); margin-top: 1px; }
.us-close {
  flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  color: var(--ink-4); padding: 6px;
  border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  transition: color 120ms, background 120ms;
}
.us-close:hover { color: var(--ink); background: var(--bg-hover); }

.us-body {
  flex: 1; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.us-body::-webkit-scrollbar { width: 4px; }
.us-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.us-sub-block { padding: 12px 20px; background: var(--gold-soft); }
.us-sub-inner { display: flex; align-items: center; justify-content: space-between; }
.us-sub-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.us-sub-status {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px;
  background: var(--teal-soft); color: var(--teal);
}

.us-divider { height: 1px; background: var(--border); margin: 0; }

.us-section { padding: 14px 20px; }
.us-section-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}

.us-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 6px 0;
}
.us-row-info { flex: 1; min-width: 0; }
.us-row-title { font-size: 13px; font-weight: 500; color: var(--ink); }
.us-row-sub { font-size: 11px; color: var(--ink-4); margin-top: 1px; }

.us-toggle {
  position: relative;
  width: 40px; height: 22px;
  border-radius: 11px;
  background: var(--border);
  border: none; cursor: pointer; padding: 0;
  flex-shrink: 0; transition: background 200ms;
}
.us-toggle[aria-checked="true"] { background: var(--teal); }
.us-toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%; background: #fff;
  transition: transform 200ms;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  pointer-events: none;
}
.us-toggle[aria-checked="true"] .us-toggle-thumb { transform: translateX(18px); }

.us-accordion-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 6px 0;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--ink-2); text-align: left; border-radius: var(--r-xs);
  transition: color 120ms;
}
.us-accordion-btn:hover { color: var(--ink); }
.us-chevron { margin-left: auto; flex-shrink: 0; transition: transform 200ms; }
.us-accordion-btn[aria-expanded="true"] .us-chevron { transform: rotate(180deg); }
.us-accordion-body { display: none; padding: 8px 0 2px; }
.us-accordion-body.open { display: block; }

.us-field { margin-bottom: 10px; }
.us-field label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--ink-3); margin-bottom: 4px;
}
.us-field input[type="password"] {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--r-xs);
  font-family: var(--font-body); font-size: 13px;
  color: var(--ink); background: var(--bg-card);
  outline: none; box-sizing: border-box; transition: border-color 120ms;
}
.us-field input[type="password"]:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft);
}
.us-pw-error { font-size: 12px; color: var(--coral); margin-bottom: 8px; }
.us-pw-actions { display: flex; justify-content: flex-end; }

.us-btn-primary {
  padding: 7px 16px; background: var(--ink); color: #fff;
  border: none; border-radius: var(--r-xs);
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: opacity 120ms;
}
.us-btn-primary:hover { opacity: 0.85; }
.us-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.us-action-row {
  display: flex; align-items: center; gap: 8px;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 7px 0; font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  color: var(--ink-2); text-align: left; border-radius: var(--r-xs);
  transition: color 120ms;
}
.us-action-row:hover { color: var(--ink); }

.us-footer {
  padding: 12px 20px; border-top: 1px solid var(--border); flex-shrink: 0;
}
.us-logout-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 8px 10px; font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  color: var(--coral); border-radius: var(--r-xs); transition: background 120ms;
}
.us-logout-btn:hover { background: var(--coral-soft); }

:root[data-theme="dark"] .us-panel { background: var(--bg-card); border-color: var(--border); }
:root[data-theme="dark"] .us-overlay { background: rgba(0,0,0,0.65); }
