/* ============================================================
   HRMS DEMO — DESIGN TOKENS
   Palette: deep navy (authority/trust) + emerald teal (growth,
   approvals) with amber for pending states and rose-red for
   alerts. Display face Sora, body Inter, data/codes in
   IBM Plex Mono so employee codes and figures read as data.
   ============================================================ */
:root {
  --ink: #1a2233;
  --ink-soft: #4a5568;
  --ink-faint: #8a94a6;

  --surface: #f4f6f9;
  --surface-alt: #eceff4;
  --card: #ffffff;

  --primary: #1e3a5f;
  --primary-dark: #142a45;
  --primary-tint: #e7edf4;

  --accent: #0e9f84;
  --accent-tint: #e2f6f1;

  --amber: #c98a1a;
  --amber-tint: #fbf1de;

  --red: #c9483d;
  --red-tint: #fbeae8;

  --violet: #7c5cbf;

  --border: #e2e6ed;
  --border-strong: #cbd2df;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(20, 32, 55, 0.06);
  --shadow-md: 0 4px 16px rgba(20, 32, 55, 0.08);
  --shadow-lg: 0 12px 40px rgba(20, 32, 55, 0.16);

  --font-display: "Sora", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --sidebar-w: 244px;
  --header-h: 68px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hidden { display: none !important; }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
#loginScreen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--primary-dark);
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(14, 159, 132, 0.35), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(30, 58, 95, 0.6), transparent 50%),
    var(--primary-dark);
  position: relative;
  overflow: hidden;
}

.login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.login-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  margin-bottom: 56px;
  z-index: 1;
}

.login-mark .mark-dot {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #0b7562);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  color: #fff;
}

.login-brand h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 42px;
  line-height: 1.15;
  max-width: 460px;
  z-index: 1;
  letter-spacing: -0.01em;
}

.login-brand p {
  margin-top: 18px;
  max-width: 420px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  z-index: 1;
}

.login-stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  z-index: 1;
}

.login-stats div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
}

.login-stats div span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  padding: 40px;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.login-card > p {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin-bottom: 28px;
}

.role-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  margin-bottom: 12px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.role-option:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.role-option .role-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.role-option.hr .role-icon { background: var(--primary-tint); color: var(--primary); }
.role-option.mgr .role-icon { background: var(--accent-tint); color: var(--accent); }

.role-option strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
}

.role-option span {
  display: block;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.login-foot {
  margin-top: 24px;
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
}

/* ============================================================
   APP SHELL
   ============================================================ */
#app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.app-content {
  min-width: 0;
}

/* ---- Sidebar ---- */
.sidebar {
  background: var(--primary-dark);
  color: #fff;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  margin-bottom: 30px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.sidebar-brand .mark-dot {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #0b7562);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
}

.nav-group-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.38);
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav-item .nav-ico {
  width: 18px; text-align: center; font-size: 15px; flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.active {
  background: var(--accent);
  color: #fff;
}

.nav-item .soon-tag {
  margin-left: auto;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ---- Header ---- */
.topbar {
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: var(--card);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.search-box {
  flex: 1;
  max-width: 380px;
  position: relative;
  margin-left: 16px;
}

.search-box input {
  width: 100%;
  padding: 9px 14px 9px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 13px;
}

.search-box input:focus { border-color: var(--accent); background: var(--card); }

.search-box .ico {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-faint);
  font-size: 13px;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.role-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 30px;
  background: var(--surface-alt);
  font-size: 12.5px;
  font-weight: 600;
}

.role-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  position: relative;
  font-size: 14px;
}

.icon-btn .badge-dot {
  position: absolute;
  top: 6px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid var(--card);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.topbar-user .name { font-size: 13px; font-weight: 600; }
.topbar-user .title { font-size: 11.5px; color: var(--ink-soft); }

/* ---- Main content ---- */
main {
  padding: 26px 28px 60px;
  max-width: 1320px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.page-head p {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin-top: 4px;
}

/* ============================================================
   AVATARS (signature identity system — deterministic colour
   per person, keyed off department, initials instead of photos)
   ============================================================ */
.avatar {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.avatar.sz-sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.sz-md { width: 40px; height: 40px; font-size: 13px; }
.avatar.sz-lg { width: 72px; height: 72px; font-size: 22px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: filter 0.12s ease, background 0.12s ease;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.12); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(1.08); }

.btn-ghost { background: var(--card); border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-alt); }

.btn-sm { padding: 6px 11px; font-size: 12px; }

.btn-icon-only { padding: 8px; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-card {
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  margin-top: 8px;
}

.stat-card .stat-delta {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
}
.stat-delta.up { color: var(--accent); }
.stat-delta.down { color: var(--red); }
.stat-delta.flat { color: var(--ink-faint); }

.stat-card .stat-ico {
  position: absolute;
  right: 16px; top: 16px;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}

/* ============================================================
   DASHBOARD GRID / PANELS
   ============================================================ */
.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  align-items: start;
}

.panel {
  padding: 20px 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-head h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.panel-head .link-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* department bar chart (pure CSS/SVG, no library) */
.bar-row {
  display: grid;
  grid-template-columns: 128px 1fr 34px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 12.5px;
}

.bar-row .bar-label {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink-soft);
  font-weight: 500;
}

.bar-row .bar-label .sw {
  width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0;
}

.bar-track {
  height: 8px;
  border-radius: 6px;
  background: var(--surface-alt);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
}

.bar-row .bar-count {
  text-align: right;
  font-family: var(--font-mono);
  color: var(--ink-soft);
}

/* approvals / activity list */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }

.list-row .lr-body { flex: 1; min-width: 0; }
.list-row .lr-title { font-size: 13px; font-weight: 600; }
.list-row .lr-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.list-row .lr-actions { display: flex; gap: 6px; flex-shrink: 0; }

.empty-note {
  padding: 24px 0;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
}

/* ============================================================
   BADGES / CHIPS
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.chip-active { background: var(--accent-tint); color: var(--accent); }
.chip-leave { background: var(--amber-tint); color: var(--amber); }
.chip-probation { background: #eef0f8; color: var(--violet); }
.chip-exited { background: var(--red-tint); color: var(--red); }
.chip-pending { background: var(--amber-tint); color: var(--amber); }
.chip-approved { background: var(--accent-tint); color: var(--accent); }
.chip-rejected { background: var(--red-tint); color: var(--red); }

.dept-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.dept-chip .sw { width: 7px; height: 7px; border-radius: 2px; }

/* ============================================================
   TOOLBAR / FILTERS (directory page)
   ============================================================ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.toolbar .search-box { margin-left: 0; max-width: 320px; }

.select-input {
  padding: 9px 30px 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6"><path d="M0 0l5 6 5-6z" fill="%238a94a6"/></svg>') no-repeat right 12px center;
  appearance: none;
  font-size: 12.5px;
  color: var(--ink);
}

.toolbar-spacer { flex: 1; }

.view-count {
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  font-weight: 700;
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr {
  cursor: pointer;
  transition: background 0.1s ease;
}
.data-table tbody tr:hover { background: var(--surface); }

.emp-cell { display: flex; align-items: center; gap: 10px; }
.emp-cell .emp-name { font-weight: 600; font-size: 13px; }
.emp-cell .emp-code { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

.text-mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }
.text-soft { color: var(--ink-soft); }

/* ============================================================
   DRAWER (employee profile)
   ============================================================ */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 32, 55, 0.42);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 460px;
  max-width: 92vw;
  background: var(--card);
  z-index: 41;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  padding: 22px 24px 0;
}

.drawer-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: none;
  color: var(--ink-soft);
  font-size: 14px;
}

.drawer-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-profile .name { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.drawer-profile .title { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.drawer-profile .meta { display: flex; gap: 8px; margin-top: 8px; align-items: center; }

.drawer-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 24px 0;
  border-bottom: 1px solid var(--border);
}

.drawer-tab {
  padding: 8px 4px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-faint);
  border-bottom: 2px solid transparent;
  background: none;
  border-left: none; border-right: none; border-top: none;
  margin-right: 18px;
}
.drawer-tab.active { color: var(--primary); border-bottom-color: var(--accent); }

.drawer-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .k { color: var(--ink-soft); }
.detail-row .v { font-weight: 600; text-align: right; }

.leave-balance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.leave-mini {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}
.leave-mini .n { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.leave-mini .l { font-size: 10.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }

/* ============================================================
   MODAL (add employee)
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 32, 55, 0.42);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 520px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px);
  transition: transform 0.16s ease;
}
.modal-backdrop.open .modal { transform: translateY(0); }

.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; }

.modal-body { padding: 22px 24px; }
.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.form-field input, .form-field select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--surface);
}
.form-field input:focus, .form-field select:focus { border-color: var(--accent); background: var(--card); }

/* ============================================================
   TOAST
   ============================================================ */
#toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
  display: flex; align-items: center; gap: 8px;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ============================================================
   SUBTABS (module-level tab strip, e.g. Attendance / Leave)
   ============================================================ */
.subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.subtab {
  padding: 10px 4px 12px;
  margin-right: 22px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-faint);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
}
.subtab.active { color: var(--primary); border-bottom-color: var(--accent); }
.subtab .count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--surface-alt);
  font-size: 10.5px;
  color: var(--ink-soft);
}
.subtab.active .count { background: var(--accent-tint); color: var(--accent); }

/* ============================================================
   PROGRESS BAR (generic — payroll runs, goal completion)
   ============================================================ */
.progress-track {
  height: 7px;
  border-radius: 6px;
  background: var(--surface-alt);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 6px;
  background: var(--accent);
}

/* ============================================================
   RATING BADGE (performance)
   ============================================================ */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}
.rating-badge .star { color: var(--amber); font-size: 12px; }
.rating-badge.unrated { color: var(--ink-faint); font-weight: 600; font-size: 12px; font-family: var(--font-body); }

/* ============================================================
   KANBAN BOARD (recruitment pipeline)
   ============================================================ */
.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(180px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--border-strong);
  margin-bottom: 10px;
}

.kanban-col-head .count {
  font-family: var(--font-mono);
  color: var(--ink-faint);
  font-weight: 600;
}

.kanban-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.kanban-card .kc-name { font-size: 13px; font-weight: 600; }
.kanban-card .kc-meta { font-size: 11.5px; color: var(--ink-soft); margin-top: 4px; }
.kanban-card .kc-src {
  display: inline-block;
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--surface-alt);
  color: var(--ink-soft);
}

.kanban-empty {
  font-size: 12px;
  color: var(--ink-faint);
  padding: 10px 4px;
  text-align: center;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
}

@media (max-width: 980px) {
  .kanban { grid-template-columns: repeat(6, 220px); }
}

/* ============================================================
   PLACEHOLDER / COMING SOON MODULES
   ============================================================ */
.coming-soon {
  padding: 70px 30px;
  text-align: center;
}
.coming-soon .cs-ico {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--primary-tint);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin: 0 auto 18px;
}
.coming-soon h3 { font-family: var(--font-display); font-size: 17px; margin-bottom: 8px; }
.coming-soon p { color: var(--ink-soft); font-size: 13.5px; max-width: 380px; margin: 0 auto; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  #app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 220px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 30;
  }
  .sidebar.open { transform: translateX(0); }
  #menuToggleBtn { display: flex !important; }
  #loginScreen { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  main { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
