/* ═══════════════════════════════════════════════════════════════════════════
   VLMS HR Portal — Design System
   Mirrors valiantlifecare.com brand: Teal #0F3D3A · Blue #0045AA · Green #C8F8A9
   WCAG AA compliant · DM Sans typography · Calm visual language
   ═══════════════════════════════════════════════════════════════════════════ */

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

:root {
  --vlms-teal:       #0F3D3A;
  --vlms-teal-light: #174d49;
  --vlms-teal-dark:  #0a2927;
  --vlms-blue:       #0045AA;
  --vlms-blue-light: #1a5cc4;
  --vlms-green:      #C8F8A9;
  --vlms-green-dark: #a8e882;
  --vlms-light-blue: #C1DBFF;
  --white:           #ffffff;
  --gray-50:         #f8fafc;
  --gray-100:        #f1f5f9;
  --gray-200:        #e2e8f0;
  --gray-400:        #94a3b8;
  --gray-500:        #64748b;
  --gray-700:        #334155;
  --gray-900:        #1a1a2e;
  --red-50:          #fee2e2;
  --red-700:         #b91c1c;
  --amber-50:        #fef3c7;
  --amber-700:       #92400e;
  --emerald-50:      #d1fae5;
  --emerald-700:     #065f46;
  --purple-50:       #ede9fe;
  --purple-700:      #5b21b6;
  --border:          #e2e8f0;
  --shadow-sm:       0 1px 3px rgba(0,0,0,.08);
  --shadow-md:       0 4px 16px rgba(0,0,0,.1);
  --shadow-lg:       0 8px 32px rgba(0,0,0,.14);
  --radius-sm:       6px;
  --radius-md:       10px;
  --radius-lg:       16px;
  --sidebar-w:       248px;
  --topbar-h:        60px;
  --transition:      all .18s ease;
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--vlms-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ══════════════════════════════════════════════════════════════
   PUBLIC LAYOUT (Login / Register / Careers / Screening)
   ══════════════════════════════════════════════════════════════ */
.hr-public-header {
  background: var(--vlms-teal);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.hr-public-header .logo img { height: 38px; }
.hr-public-header nav a {
  color: rgba(255,255,255,.8);
  font-size: 14px;
  font-weight: 500;
  margin-left: 24px;
  transition: var(--transition);
}
.hr-public-header nav a:hover { color: var(--vlms-green); text-decoration: none; }
.hr-public-header .header-cta {
  background: var(--vlms-green);
  color: var(--vlms-teal);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .03em;
  transition: var(--transition);
}
.hr-public-header .header-cta:hover { background: var(--vlms-green-dark); text-decoration: none; }

.hr-public-footer {
  background: var(--vlms-teal-dark);
  color: rgba(255,255,255,.55);
  text-align: center;
  padding: 28px 24px;
  font-size: 13px;
  margin-top: auto;
}
.hr-public-footer a { color: rgba(255,255,255,.7); }
.hr-public-footer a:hover { color: var(--vlms-green); }

/* ── Auth Pages ── */
.hr-auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--vlms-teal-dark) 0%, #1a4a46 50%, #0a2927 100%);
}
.hr-auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.hr-auth-card h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--vlms-teal);
  margin-bottom: 4px;
}
.hr-auth-card .subtitle {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 28px;
}
.hr-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--gray-400);
  font-size: 13px;
}
.hr-auth-divider::before,
.hr-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ══════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT (Sidebar + Main)
   ══════════════════════════════════════════════════════════════ */
.hr-app {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.hr-sidebar {
  width: var(--sidebar-w);
  background: var(--vlms-teal);
  min-height: 100vh;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 50;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.hr-sidebar::-webkit-scrollbar { width: 4px; }
.hr-sidebar::-webkit-scrollbar-track { background: transparent; }
.hr-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.sidebar-logo {
  padding: 22px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.sidebar-logo img { height: 34px; width: auto; }
.sidebar-logo .portal-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--vlms-green);
  text-transform: uppercase;
  margin-top: 4px;
}

.sidebar-user {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--vlms-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-user .user-info .name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.sidebar-user .user-info .role-label {
  font-size: 11px;
  color: var(--vlms-green);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}

.sidebar-nav { padding: 12px 0; flex: 1; }

.sidebar-section {
  padding: 10px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,.3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.72);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
  position: relative;
}
.sidebar-nav a svg { width: 16px; height: 16px; opacity: .7; flex-shrink: 0; }
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-left-color: var(--vlms-green);
  text-decoration: none;
}
.sidebar-nav a.active svg { opacity: 1; }
.sidebar-nav a .badge-count {
  margin-left: auto;
  background: var(--vlms-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.sidebar-nav a .badge-count.red { background: #dc2626; }
.sidebar-nav a .badge-count.amber { background: #d97706; }

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 13px;
  color: rgba(255,255,255,.45);
  flex-shrink: 0;
}
.sidebar-footer a {
  color: rgba(255,255,255,.55);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  transition: var(--transition);
}
.sidebar-footer a:hover { color: var(--vlms-green); text-decoration: none; }
.sidebar-footer a svg { width: 14px; height: 14px; }

/* ── Main Area ── */
.hr-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hr-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
}
.hr-topbar h1 {
  font-size: 17px;
  font-weight: 700;
  color: var(--vlms-teal);
}
.hr-topbar .breadcrumb {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 1px;
}
.hr-topbar .breadcrumb a { color: var(--gray-500); }
.hr-topbar .breadcrumb span { margin: 0 4px; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-actions .notif-btn {
  position: relative;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-500);
  transition: var(--transition);
}
.topbar-actions .notif-btn:hover { border-color: var(--vlms-blue); color: var(--vlms-blue); }
.topbar-actions .notif-btn .dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #dc2626;
  border-radius: 50%;
  border: 2px solid #fff;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
}
.topbar-user .avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--vlms-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.hr-content { padding: 28px; flex: 1; }

/* ══════════════════════════════════════════════════════════════
   COMPONENTS
   ══════════════════════════════════════════════════════════════ */

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-header h2 { font-size: 14px; font-weight: 700; color: var(--vlms-teal); }
.card-header .card-actions { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--gray-50);
  font-size: 13px;
  color: var(--gray-500);
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon.teal { background: rgba(15,61,58,.1); color: var(--vlms-teal); }
.stat-icon.blue { background: rgba(0,69,170,.1); color: var(--vlms-blue); }
.stat-icon.green { background: rgba(200,248,169,.4); color: #166534; }
.stat-icon.amber { background: #fef3c7; color: #d97706; }
.stat-icon.red   { background: #fee2e2; color: #dc2626; }
.stat-icon.purple{ background: #ede9fe; color: #7c3aed; }
.stat-info .value { font-size: 26px; font-weight: 800; color: var(--gray-900); line-height: 1.1; }
.stat-info .label { font-size: 12px; color: var(--gray-500); margin-top: 2px; font-weight: 500; }
.stat-info .trend { font-size: 11px; font-weight: 600; margin-top: 4px; }
.stat-info .trend.up   { color: #16a34a; }
.stat-info .trend.down { color: #dc2626; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  background: var(--gray-50);
  white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; color: var(--gray-900); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbfd; }

/* ── Badges / Status Pills ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.badge-new        { background: #dbeafe; color: #1d4ed8; }
.badge-active     { background: var(--emerald-50); color: var(--emerald-700); }
.badge-pending    { background: var(--amber-50); color: var(--amber-700); }
.badge-flagged    { background: var(--red-50); color: var(--red-700); }
.badge-verifying  { background: var(--purple-50); color: var(--purple-700); }
.badge-hired      { background: var(--vlms-blue); color: #fff; }
.badge-rejected   { background: var(--red-50); color: var(--red-700); }
.badge-shortlisted{ background: var(--emerald-50); color: var(--emerald-700); }
.badge-reviewing  { background: var(--amber-50); color: var(--amber-700); }
.badge-expired    { background: #f3f4f6; color: #6b7280; }
.badge-info       { background: #e0f2fe; color: #0369a1; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary { background: var(--vlms-blue); color: #fff; }
.btn-primary:hover { background: var(--vlms-blue-light); color: #fff; text-decoration: none; }
.btn-teal { background: var(--vlms-teal); color: #fff; }
.btn-teal:hover { background: var(--vlms-teal-light); color: #fff; text-decoration: none; }
.btn-green { background: var(--vlms-green); color: var(--vlms-teal); }
.btn-green:hover { background: var(--vlms-green-dark); color: var(--vlms-teal); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--vlms-blue);
  border: 1px solid var(--vlms-blue);
}
.btn-outline:hover { background: var(--vlms-blue); color: #fff; text-decoration: none; }
.btn-ghost { background: var(--gray-100); color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-200); text-decoration: none; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-label .req { color: #dc2626; margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--vlms-blue);
  box-shadow: 0 0 0 3px rgba(0,69,170,.08);
}
.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 5px; }
.form-error { font-size: 12px; color: #dc2626; margin-top: 5px; }

/* ── Alerts / Flash ── */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--emerald-50); color: var(--emerald-700); border: 1px solid #bbf7d0; }
.alert-error   { background: var(--red-50); color: var(--red-700); border: 1px solid #fecaca; }
.alert-warning { background: var(--amber-50); color: var(--amber-700); border: 1px solid #fde68a; }
.alert-info    { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

/* ── Progress Bars ── */
.progress-wrap { margin: 4px 0; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray-500); margin-bottom: 5px; }
.progress-bar {
  height: 7px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .6s ease;
}
.progress-fill.teal   { background: var(--vlms-teal); }
.progress-fill.blue   { background: var(--vlms-blue); }
.progress-fill.green  { background: #16a34a; }
.progress-fill.amber  { background: #d97706; }
.progress-fill.red    { background: #dc2626; }
.progress-fill.gradient { background: linear-gradient(90deg, var(--vlms-blue), var(--vlms-teal)); }

/* ── Accuracy Gauge ── */
.gauge-wrap { text-align: center; padding: 10px 0; }
.gauge-value { font-size: 36px; font-weight: 800; color: var(--vlms-teal); line-height: 1; }
.gauge-value.good  { color: #16a34a; }
.gauge-value.warn  { color: #d97706; }
.gauge-value.bad   { color: #dc2626; }
.gauge-label { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.gauge-bar {
  width: 100%;
  height: 10px;
  background: var(--gray-200);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 10px;
}
.gauge-fill { height: 100%; border-radius: 6px; transition: width .8s ease; }
.gauge-fill.good   { background: linear-gradient(90deg, #16a34a, #22c55e); }
.gauge-fill.warn   { background: linear-gradient(90deg, #d97706, #f59e0b); }
.gauge-fill.bad    { background: linear-gradient(90deg, #dc2626, #ef4444); }

/* ── Kanban Board ── */
.kanban-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kanban-col {
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 14px;
  min-height: 300px;
}
.kanban-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.kanban-col-header .count {
  background: var(--white);
  color: var(--gray-500);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.kanban-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 12px;
  margin-bottom: 8px;
  cursor: grab;
  transition: var(--transition);
}
.kanban-card:hover { box-shadow: var(--shadow-md); border-color: var(--vlms-blue); }
.kanban-card .candidate-name { font-size: 13.5px; font-weight: 600; color: var(--gray-900); }
.kanban-card .credential-tag { font-size: 11px; color: var(--vlms-blue); font-weight: 600; margin-top: 3px; }
.kanban-card .card-meta { font-size: 11px; color: var(--gray-400); margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.kanban-card .fit-score { margin-left: auto; font-weight: 700; font-size: 12px; }
.kanban-card .fit-score.high { color: #16a34a; }
.kanban-card .fit-score.mid  { color: #d97706; }
.kanban-card .fit-score.low  { color: #dc2626; }

/* ── Credential Verify Badge ── */
.cred-verify {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
.cred-verify svg { width: 13px; height: 13px; }
.cred-verify.verified  { background: var(--emerald-50); color: var(--emerald-700); border: 1px solid #bbf7d0; }
.cred-verify.verifying { background: var(--purple-50); color: var(--purple-700); border: 1px solid #ddd6fe; }
.cred-verify.failed    { background: var(--red-50); color: var(--red-700); border: 1px solid #fecaca; }
.cred-verify.lapsed    { background: var(--amber-50); color: var(--amber-700); border: 1px solid #fde68a; }

/* ── CEU Tracker ── */
.ceu-tracker {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0;
}
.ceu-item .ceu-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ceu-item .ceu-name { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.ceu-item .ceu-count { font-size: 12px; color: var(--gray-500); }
.ceu-deadline { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.ceu-deadline.urgent { color: #dc2626; font-weight: 600; }

/* ── Chatbot / Screening Agent ── */
.chat-container {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px - 80px);
}
.chat-header {
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 14px;
}
.chat-header .agent-avatar {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--vlms-teal), var(--vlms-blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
}
.chat-header .agent-info .name { font-size: 15px; font-weight: 700; color: var(--vlms-teal); }
.chat-header .agent-info .status { font-size: 12px; color: #16a34a; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.chat-header .agent-info .status::before { content: ''; width: 6px; height: 6px; background: #16a34a; border-radius: 50%; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  background: var(--gray-50);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}
.msg { display: flex; gap: 10px; max-width: 85%; }
.msg.agent { align-self: flex-start; }
.msg.user  { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
}
.msg.agent .msg-avatar { background: linear-gradient(135deg, var(--vlms-teal), var(--vlms-blue)); color: #fff; }
.msg.user  .msg-avatar { background: var(--gray-200); color: var(--gray-700); }
.msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
}
.msg.agent .msg-bubble {
  background: var(--white);
  color: var(--gray-900);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
}
.msg.user .msg-bubble {
  background: var(--vlms-blue);
  color: #fff;
  border-top-right-radius: 4px;
}
.msg-time { font-size: 10px; color: var(--gray-400); margin-top: 4px; text-align: right; }
.typing-indicator { display: flex; gap: 4px; align-items: center; padding: 8px 0; }
.typing-indicator .dot {
  width: 7px;
  height: 7px;
  background: var(--gray-400);
  border-radius: 50%;
  animation: typing-bounce 1.3s ease infinite;
}
.typing-indicator .dot:nth-child(2) { animation-delay: .2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: .4s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-6px); }
}
.chat-input-area {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  outline: none;
  transition: var(--transition);
}
.chat-input:focus { border-color: var(--vlms-blue); box-shadow: 0 0 0 3px rgba(0,69,170,.08); }
.chat-send-btn {
  background: var(--vlms-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.chat-send-btn:hover { background: var(--vlms-blue-light); }
.chat-quick-replies { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.quick-reply {
  padding: 6px 14px;
  border: 1px solid var(--vlms-blue);
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--vlms-blue);
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
  font-weight: 500;
}
.quick-reply:hover { background: var(--vlms-blue); color: #fff; }

/* ── Step Progress (Screening) ── */
.step-progress { display: flex; align-items: center; gap: 0; margin-bottom: 24px; }
.step-item {
  flex: 1;
  text-align: center;
  position: relative;
}
.step-item::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.step-item:last-child::after { display: none; }
.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  position: relative;
  z-index: 1;
  transition: var(--transition);
}
.step-item.completed .step-circle { background: var(--vlms-teal); color: #fff; }
.step-item.active .step-circle    { background: var(--vlms-blue); color: #fff; box-shadow: 0 0 0 4px rgba(0,69,170,.18); }
.step-item.completed::after       { background: var(--vlms-teal); }
.step-label { font-size: 11px; color: var(--gray-400); font-weight: 500; }
.step-item.active .step-label    { color: var(--vlms-blue); font-weight: 700; }
.step-item.completed .step-label { color: var(--vlms-teal); }

/* ── Org Chart ── */
.org-tree { overflow-x: auto; padding: 20px 0; }
.org-node {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  text-align: center;
  font-size: 12.5px;
  min-width: 120px;
}
.org-node .node-name { font-weight: 700; color: var(--vlms-teal); }
.org-node .node-role { color: var(--gray-500); font-size: 11px; margin-top: 2px; }

/* ── Compliance Countdown ── */
.countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.countdown-badge.critical { background: var(--red-50); color: var(--red-700); }
.countdown-badge.warning  { background: var(--amber-50); color: var(--amber-700); }
.countdown-badge.ok       { background: var(--emerald-50); color: var(--emerald-700); }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--gray-400); }
.empty-state svg { width: 48px; height: 48px; opacity: .3; margin: 0 auto 12px; display: block; }
.empty-state p { font-size: 14px; }

/* ── Utility ── */
.text-teal   { color: var(--vlms-teal); }
.text-blue   { color: var(--vlms-blue); }
.text-muted  { color: var(--gray-500); }
.text-danger { color: #dc2626; }
.text-success{ color: #16a34a; }
.text-sm     { font-size: 12px; }
.font-bold   { font-weight: 700; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2       { gap: 8px; }
.gap-3       { gap: 12px; }
.mt-1        { margin-top: 4px; }
.mt-2        { margin-top: 8px; }
.mt-3        { margin-top: 16px; }
.mb-2        { margin-bottom: 8px; }
.mb-3        { margin-bottom: 16px; }
.w-100       { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hr-sidebar { width: 200px; }
  :root { --sidebar-w: 200px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hr-app { flex-direction: column; }
  .hr-sidebar { width: 100%; height: auto; position: relative; min-height: auto; }
  .hr-sidebar .sidebar-nav { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kanban-board { grid-template-columns: 1fr; }
  .hr-content { padding: 16px; }
  .hr-topbar { padding: 0 16px; }
  .chat-container { height: calc(100vh - 64px - 120px); }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hr-auth-card { padding: 24px 20px; }
  .step-label { display: none; }
}
