/* ─── Fonts ─────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;0,14..32,900&display=swap');

/* ─── Design Tokens ────────────────────────────────────────────────────────── */
@import './theme.css';

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

/* The `hidden` attribute means hidden, whatever else a class says. Without this,
   any rule that sets `display` — `.btn { display: inline-flex }` most of all —
   outranks the user-agent's `[hidden] { display: none }`, and an element the JS
   believes is hidden renders as an empty shape. */
[hidden] { display: none !important; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Canvas background */
.app-shell {
  background: var(--bg);
}
html.dark .app-shell {
  background: #0F172A;
}

/* ─── App Shell (sidebar layout) ───────────────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: clip;
  padding: 10px;
  gap: 10px;
  position: relative;
}

/* ─── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  background: #2B2140;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.18),
    0 2px 8px rgba(0,0,0,0.10);
  display: flex;
  flex-direction: column;
  padding: 0 12px 16px;
  z-index: 1000;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  transition: width .22s cubic-bezier(.4,0,.2,1);
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-header {
  padding: 20px 4px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-bottom: 8px;
  position: relative;
  flex-shrink: 0;
}

/* Collapse toggle button — direct child of .app-shell, floats on sidebar's right border */
.sidebar-toggle {
  position: absolute;
  left: calc(10px + 240px - 11px);  /* shell-padding + sidebar-width - half-button-width */
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid rgba(167, 139, 250, 0.4);
  color: #A78BFA;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1100;
  transition: background var(--transition), color var(--transition), opacity var(--transition), left .22s cubic-bezier(.4,0,.2,1);
  opacity: 0;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(167,139,250,0.20);
}
.app-shell:hover .sidebar-toggle              { opacity: 1; }
.sidebar--collapsed ~ .sidebar-toggle         { left: calc(10px + 64px - 11px); opacity: 1; }
.sidebar--collapsed ~ .sidebar-toggle svg     { transform: rotate(180deg); }
.sidebar-toggle:hover { background: #fff; color: #8B5CF6; }
.sidebar-toggle svg { display: block; transition: transform .22s; }

.sidebar-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(167,139,250,0.15);
}

.sidebar-wordmark {
  display: none;
}

/* ─── Collapsed sidebar ──────────────────────────────────────────────────────
   Width shrinks to 64px; text fades out; icons stay centered.                */
.sidebar--collapsed {
  width: 64px;
  padding: 0 4px 16px;
}
.sidebar--collapsed .nav-label               { opacity: 0; flex: 0 0 0px; width: 0; max-width: 0; overflow: hidden; pointer-events: none; }
.sidebar--collapsed .nav-item                { justify-content: center; padding: 9px 0; gap: 0; }
.sidebar--collapsed .nav-icon                { width: 24px; opacity: .8; }
.sidebar--collapsed .nav-item:hover .nav-icon { opacity: 1; }
.sidebar--collapsed .sidebar-footer .btn,
.sidebar--collapsed .sidebar-signout .nav-label,
.sidebar--collapsed .sidebar-brand,
.sidebar--collapsed .sidebar-version        { opacity: 0; max-width: 0; padding: 0; overflow: hidden; pointer-events: none; }
.sidebar--collapsed .sidebar-signout         { justify-content: center; padding: 10px 0; gap: 0; }
.sidebar--collapsed .sidebar-footer          { align-items: center; }
.sidebar--collapsed .nav-menu--bottom        { align-items: center; }

/* Tooltip on collapsed nav items */
.sidebar--collapsed .nav-item                { position: relative; }
.sidebar--collapsed .nav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #0f172a;
  color: #e2e8f0;
  font-size: .76rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.sidebar--collapsed .nav-item:hover::after   { opacity: 1; }

/* Nav section label */
.nav-section-label {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9c8fbf;
  padding: 16px 12px 6px;
  margin-top: 4px;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu--bottom {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  margin-top: 8px;
}

.nav-sep { height: 1px; background: rgba(255,255,255,0.08); margin: 6px 12px; list-style: none; }
.sidebar--collapsed .nav-sep { margin: 6px 6px; }
.nav-item--placeholder { opacity: 0.45; cursor: default; pointer-events: none; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 1px 0;
  cursor: pointer;
  color: #a99bd9;
  font-weight: 500;
  font-size: .875rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  user-select: none;
  position: relative;
}
.nav-item:hover {
  background: rgba(167, 139, 250, 0.10);
  color: #A78BFA;
}
.nav-item.active {
  background: #A78BFA;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(167, 139, 250, 0.40);
}
.nav-item.active::before {
  display: none;
}
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
  color: inherit;
  opacity: .75;
}
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { opacity: 1; }
.nav-icon .lucide-icon { display: block; }

.nav-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .18s, width .22s;
  opacity: 1;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 0 0;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-signout {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.40);
  font-size: 0.78rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
  width: 100%;
  box-sizing: border-box;
}
.sidebar-signout:hover { background: rgba(239,68,68,0.12); color: #f87171; }

.sidebar-brand {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .22s, max-width .22s, padding .22s;
}

.sidebar-version {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.25);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  margin-top: 1px;
  transition: opacity .22s, max-width .22s, padding .22s;
}

/* Dark mode sidebar */
html.dark .sidebar        { background: #1c1530; border-color: rgba(167, 139, 250, 0.15); }
html.dark .nav-item       { color: #7d6ba8; }
html.dark .nav-item:hover { background: rgba(167,139,250,0.10); color: #A78BFA; }
html.dark .nav-item.active { background: #A78BFA; color: #fff !important; box-shadow: 0 4px 14px rgba(167, 139, 250, 0.40); }
html.dark .nav-item.active::before { background: #A78BFA; }
html.dark .sidebar-wordmark { color: #FFFFFF; }
html.dark .sidebar-wordmark span { color: #A78BFA; }
html.dark .nav-menu--bottom { border-color: rgba(255,255,255,0.08); }
html.dark .sidebar-brand  { color: rgba(255,255,255,0.35); }
html.dark .sidebar-toggle { background: rgba(30,41,59,0.9); border-color: rgba(167,139,250,0.3); color: #A78BFA; }
html.dark .sidebar-toggle:hover { background: #1E293B; color: #8B5CF6; }

/* ─── Main Wrapper ─────────────────────────────────────────────────────────── */
.main-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
}

.topbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  border-radius: 0;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.page-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
  letter-spacing: -.01em;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.topbar-logo {
  height: 28px;
  width: auto;
  max-width: 120px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

/* User avatar chip */
.user-info-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 99px;
  border: 1px solid var(--topbar-border);
  cursor: pointer;
  background: rgba(255,255,255,0.40);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background var(--transition), box-shadow var(--transition);
}
.user-info-badge:hover { background: rgba(255,255,255,0.60); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.user-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.user-info-name  { font-size: .75rem; font-weight: 600; color: #F1F5F9; }
.user-info-role  { font-size: .65rem; font-weight: 500; color: #CBD5E1; opacity: 0.85; }

.content-area {
  padding: 28px 32px 40px;
  overflow-y: auto;
  flex-grow: 1;
  background: transparent;
  scrollbar-width: thin;
  scrollbar-color: rgba(167,139,250,0.35) transparent;
}
.content-area::-webkit-scrollbar       { width: 6px; }
.content-area::-webkit-scrollbar-track { background: transparent; }
.content-area::-webkit-scrollbar-thumb { background: rgba(167,139,250,0.35); border-radius: 3px; }

html.dark .topbar       { background: #080E1A; border-bottom-color: #1E293B; }
html.dark .user-info-badge { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.10); }
html.dark .user-info-badge:hover { background: rgba(255,255,255,0.10); }
html.dark .content-area { background: transparent; }
html.dark .main-wrapper  { background: rgba(15,23,42,0.95); border-color: #1E293B; }

/* ─── Login ────────────────────────────────────────────────────────────────── */
.login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 50% at 85% 5%,  rgba(167,139,250,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 90%, rgba(167,139,250,0.04) 0%, transparent 60%),
    linear-gradient(160deg, #F8FAFC 0%, #F1F5F9 100%);
  gap: 24px;
  padding: 1rem;
}

.login-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.10), 0 4px 16px rgba(0,0,0,0.06);
  padding: 48px 44px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin: 0 auto 20px;
  display: block;
  object-fit: contain;
}

.login-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  letter-spacing: -.02em;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: .85rem;
  margin-bottom: 6px;
}

.login-notice {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  margin-bottom: 28px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 500;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.login-footer {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: .04em;
  margin-top: 24px;
}

/* ─── Dev quick-login panel (DEV only, never shipped in prod build) ─────────── */
.dev-panel {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed var(--color-border);
}
.dev-panel-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #f59e0b;
  margin-bottom: 12px;
}
.dev-panel-accounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.dev-account-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 2px;
  padding: 10px 14px !important;
  border: 1px solid var(--color-border) !important;
}
.dev-account-btn:hover { border-color: #f59e0b !important; background: #fffbeb !important; }
.dev-account-role  { font-weight: 800; font-size: .78rem; color: var(--text-dark); }
.dev-account-email { font-size: .72rem; color: var(--text-muted); }
.dev-panel-hint { font-size: .72rem; color: var(--text-muted); }
.dev-panel-hint code { font-family: monospace; background: var(--bg-mint); padding: 1px 5px; border-radius: 4px; }

html.dark .dev-account-btn:hover { background: #1c1500 !important; border-color: #92400e !important; }

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .45rem .9rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition),
              box-shadow var(--transition), transform var(--transition-bounce);
  white-space: nowrap;
  line-height: 1.4;
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn:active:not(:disabled) { transform: scale(.97); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: .5rem 1.1rem;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(167,139,250,.25), 0 0 0 0 rgba(167,139,250,0);
}
.btn--primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(167,139,250,.30);
}

.btn--danger {
  background: var(--color-danger);
  color: #fff;
}
.btn--danger:hover:not(:disabled) { background: var(--color-danger-hover); }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--color-border);
}
.btn--ghost:hover:not(:disabled) { background: rgba(167,139,250,0.07); color: var(--text-dark); border-color: rgba(167,139,250,0.3); }

.btn--full { width: 100%; }
.btn--sm  { font-size: .78rem; padding: .3rem .7rem; }
.btn--xs  { font-size: .7rem;  padding: .18rem .5rem; }

.btn--success {
  background: var(--color-success);
  color: #fff;
}
.btn--success:hover:not(:disabled) { background: #059669; }

/* Ghost danger variant (border only) */
.btn--danger-ghost {
  background: transparent;
  color: var(--color-danger);
  border-color: #fca5a5;
}
.btn--danger-ghost:hover:not(:disabled) { background: #fef2f2; border-color: var(--color-danger); }

/* ─── Sign-in button (dark Microsoft style) ────────────────────────────────── */
.btn--signin {
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 28px;
  font-size: .9rem;
  font-weight: 600;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn--signin:hover:not(:disabled) { background: #1e293b; }

html.dark .btn--ghost { background: transparent; border-color: #1f2937; color: #64748b; }
html.dark .btn--ghost:hover:not(:disabled) { background: #1f2937; color: #94a3b8; border-color: #374151; }
html.dark .btn--danger-ghost:hover:not(:disabled) { background: #450a0a; border-color: var(--color-danger); }

/* ─── Forms ────────────────────────────────────────────────────────────────── */
.input {
  padding: 9px 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--glass-bg-input);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-dark);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .875rem;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(167,139,250,.12);
}
.input::placeholder { color: #94a3b8; }
.input[readonly], .input:disabled { background: var(--bg-surface); color: var(--text-muted); cursor: default; }
.input--sm { padding: 6px 10px; font-size: .8rem; }
.form-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.form-row .input { flex: 1; min-width: 180px; }

html.dark .input { background: #111827; border-color: #1f2937; color: #f1f5f9; }
html.dark .input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,233,.15); }
html.dark .input[readonly], html.dark .input:disabled { background: #0a0f1a; color: #475569; }
html.dark .input::placeholder { color: #374151; }

/* ─── Card ─────────────────────────────────────────────────────────────────── */
.card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid #E2E8F0;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 1px 2px rgba(0,0,0,0.03);
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow:
    0 4px 16px rgba(0,0,0,0.06),
    0 2px 6px rgba(0,0,0,0.04);
}

html.dark .card { background: var(--glass-bg); border-color: var(--glass-border); box-shadow: 0 8px 32px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04); }

/* High-contrast isolator card (for active tasks, alerts, key highlights) */
.card--dark {
  background: #0f172a !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: #1e293b !important;
  color: #f1f5f9;
}
.card--dark .dash-stat-value,
.card--dark .dash-stat-label { color: inherit; }

/* ─── Tables ───────────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table th {
  padding: 11px 18px;
  border-bottom: 2px solid #E2E8F0;
  text-align: left;
  background: #F8FAFC;
  color: #64748B;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  box-shadow: 0 1px 0 #E2E8F0;
}

.data-table td {
  padding: 13px 18px;
  border-bottom: 1px solid #F1F5F9;
  text-align: left;
  color: var(--text-dark);
}
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr {
  transition: background var(--transition);
}
.data-table tbody tr:hover { background: rgba(167, 139, 250, 0.04); }
.data-table-row--clickable { cursor: pointer; }
.data-table-row--clickable:hover td { background: rgba(167, 139, 250, 0.04); }

/* Helix-only: which row a below-the-table detail panel belongs to. */
.data-table-row--selected td {
  background: rgba(167, 139, 250, 0.06);
  box-shadow: inset 3px 0 0 var(--primary);
}

html.dark .data-table th { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); color: #475569; box-shadow: none; }
html.dark .data-table td { border-color: rgba(255,255,255,0.06); }
html.dark .data-table tbody tr:hover { background: rgba(167,139,250,0.06); }
html.dark .data-table-row--selected td { background: rgba(167,139,250,0.10); }

/* ─── Table Container (glass wrapper for tables/lists) ─────────────────────── */
.table-container {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  overflow: hidden;
}
html.dark .table-container {
  background: rgba(30, 41, 59, 0.70);
  border-color: rgba(255, 255, 255, 0.08);
}

.table-row {
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.table-row:last-child {
  border-bottom: none;
}

/* ─── Stat Divider ──────────────────────────────────────────────────────────── */
.stat-divider {
  width: 1px;
  background: rgba(148, 163, 184, 0.25);
  align-self: stretch;
}
html.dark .stat-divider {
  background: rgba(255, 255, 255, 0.08);
}

/* ─── Admin ────────────────────────────────────────────────────────────────── */
.admin-section { margin-bottom: 2rem; }
.admin-section h2 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
}

/* ─── Toast ────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: .85rem;
  font-weight: 500;
  color: #fff;
  background: #0f172a;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.12);
  opacity: 0;
  transform: translateY(10px) scale(.96);
  transition: opacity .2s ease, transform .25s cubic-bezier(.34,1.3,.64,1);
  max-width: 360px;
  pointer-events: auto;
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast::before { font-size: 1rem; flex-shrink: 0; }
.toast--visible { opacity: 1; transform: translateY(0) scale(1); }
.toast--success { background: #064e3b; border-color: rgba(16,185,129,.3); }
.toast--success::before { content: '✓'; color: #34d399; }
.toast--error   { background: #450a0a; border-color: rgba(239,68,68,.3); }
.toast--error::before   { content: '✕'; color: #fca5a5; }
.toast--warning { background: #1c1200; border-color: rgba(245,158,11,.3); color: #fde68a; }
.toast--warning::before { content: '⚠'; color: #fbbf24; }
.toast--info    { background: #0c1e4a; border-color: rgba(59,130,246,.3); }
.toast--info::before    { content: 'ℹ'; color: #60a5fa; }

/* ─── Dark Mode (global) ───────────────────────────────────────────────────── */
html.dark body { background-color: var(--bg); }
html.dark .login-card   { background: #111827; border-color: #1f2937; }
html.dark .login-notice { background: #1c1200; color: #fbbf24; border-color: #92400e; }

/* ─── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.modal-overlay.active { display: flex; }

@keyframes modal-in {
  from { opacity:0; transform: scale(.97) translateY(8px); }
  to   { opacity:1; transform: scale(1)  translateY(0); }
}
.modal-content {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-radius: var(--radius-lg);
  width: 580px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  border: 1px solid var(--card-border);
  animation: modal-in .18s ease;
}

html.dark .modal-content { background: rgba(17,24,39,0.88); border-color: rgba(255,255,255,0.07); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--color-border);
}
.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 7px;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--bg-surface); color: var(--text-dark); }

#dynamic-modal-body {
  overflow-y: auto;
  padding: 20px 26px;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px;
  flex-shrink: 0;
  border-top: 1px solid var(--color-border);
  background: var(--bg-surface);
}

.modal-label {
  font-weight: 600;
  font-size: 0.72rem;
  display: block;
  margin-bottom: 5px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.modal-field  { display: flex; flex-direction: column; }

html.dark .modal-overlay { background: rgba(0,0,0,0.65); }
html.dark .modal-content { background: var(--color-surface); border-color: var(--color-border); }
html.dark .modal-footer  { background: var(--bg); border-color: var(--color-border); }
html.dark .modal-close:hover { background: #1f2937; color: #f1f5f9; }

/* ─── Badge ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: .01em;
  white-space: nowrap;
}
.badge--green  { background: #dcfce7; color: #15803d; }
.badge--red    { background: #fee2e2; color: #b91c1c; }
.badge--amber  { background: #fef9c3; color: #a16207; }
.badge--blue   { background: #dbeafe; color: #1d4ed8; }
.badge--teal   { background: #e0f2fe; color: #0369a1; }
.badge--purple { background: #f3e8ff; color: #7c3aed; }
.badge--orange { background: #ffedd5; color: #c2410c; }
.badge--pink   { background: #fce7f3; color: #be185d; }
.badge--muted  { background: #e2e8f0; color: var(--text-muted); border: 1px solid var(--color-border); }
.badge--info   { background: #dbeafe; color: #1d4ed8; }
.badge--self   { background: #e0f2fe; color: #0369a1; font-size: 0.65rem; padding: 2px 8px; margin-left: 6px; }

html.dark .badge--green  { background: #052e16; color: #4ade80; }
html.dark .badge--red    { background: #450a0a; color: #fca5a5; }
html.dark .badge--amber  { background: #1c1200; color: #fbbf24; }
html.dark .badge--blue   { background: #0c1e4a; color: #60a5fa; }
html.dark .badge--teal   { background: #0c2a3d; color: #38bdf8; }
html.dark .badge--purple { background: #1e0a38; color: #c084fc; }
html.dark .badge--orange { background: #1c0a00; color: #fb923c; }
html.dark .badge--pink   { background: #2d0520; color: #f472b6; }
html.dark .badge--muted  { background: #111827; border-color: #1f2937; color: #475569; }
html.dark .badge--info   { background: #0c1e4a; color: #60a5fa; }

/* ─── Payroll run lifecycle stepper (Approval page) — helix-only ────────────── */
.run-stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.run-stepper-arrow { color: var(--text-muted); }

/* ─── Payslip breakdown (Approval page's expandable payslip detail) ─────────── */
.slip-panel { padding: 10px 12px; background: var(--bg-surface); border-radius: 8px; }
.slip-meta { margin: 0 0 6px; color: var(--text-muted); font-size: .72rem; }
.slip-table { width: 100%; table-layout: fixed; font-size: .8rem; border-collapse: collapse; }
.slip-table-amount-col { width: 120px; }
.slip-row-label { padding: 3px 8px 3px 0; }
.slip-row-note { color: var(--text-muted); font-size: .72rem; line-height: 1.35; }
.slip-amount { padding: 3px 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; vertical-align: top; }
.slip-heading { padding: 10px 0 2px; font-weight: 700; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.slip-total .slip-total-label, .slip-total .slip-amount {
  padding-top: 5px; padding-bottom: 5px; border-top: 1px solid var(--card-border); font-weight: 600; vertical-align: middle;
}
.slip-total .slip-total-label { padding-right: 8px; }
.slip-total--strong .slip-total-label, .slip-total--strong .slip-amount { font-weight: 700; }

/* ─── Pending invites banner ───────────────────────────────────────────────── */
.invite-banner {
  margin-bottom: 25px;
  border: 2px dashed #fbbf24;
  background: #fffbeb;
  border-radius: var(--radius-lg);
  padding: 20px 25px;
}
.invite-banner-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 16px;
}
.invite-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.invite-chip {
  background: white;
  border: 1px solid #fde68a;
  border-radius: 16px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.invite-chip-name { font-weight: 700; font-size: 0.85rem; color: var(--text-dark); }
.invite-chip-email { font-size: 0.75rem; color: #92400e; }

html.dark .invite-banner { background: #1c1500; border-color: #92400e; }
html.dark .invite-chip { background: #1e293b; border-color: #92400e; }

/* ─── Misc ─────────────────────────────────────────────────────────────────── */
.error { color: var(--color-danger); }

/* ─── Employees Module ────────────────────────────────────────────────────── */

/* Loading placeholder */
.emp-loading {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: .9rem;
}

/* Dashboard "Needs attention" list — helix-only, not part of orbit's port */
.attention-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 0;
  color: var(--text-muted);
}

/* Prepare page: a row already released/locked and no longer selectable. */
.row--locked { opacity: .62; }

/* ─── Dashboard reports — ported from orbit's reports.js/app.css:5027-5103 ──── */
.rpt-kpi-row {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; max-width: 1100px;
}
.rpt-kpi-card {
  background: var(--bg-card); border: 1px solid var(--color-border);
  border-radius: 10px; padding: 16px 20px; flex: 1; min-width: 130px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.rpt-kpi-value {
  font-size: 1.9rem; font-weight: 800; line-height: 1;
  margin-bottom: 4px; letter-spacing: -.03em;
}
.rpt-kpi-label { font-size: .78rem; font-weight: 500; color: var(--text-muted); }
.rpt-kpi-sub   { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

.rpt-section { margin-bottom: 16px; max-width: 1100px; }
.rpt-section-sub { font-size: .78rem; color: var(--text-muted); margin: -6px 0 12px; }
.rpt-empty { color: var(--text-muted); font-size: .875rem; margin: 8px 0; }

.rpt-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; max-width: 1100px;
}
@media (max-width: 700px) { .rpt-grid-2 { grid-template-columns: 1fr; } }

.rpt-hbar-list { display: flex; flex-direction: column; gap: 10px; }
.rpt-hbar-row  { display: flex; align-items: center; gap: 10px; min-height: 26px; }
.rpt-hbar-label {
  font-size: .8rem; color: var(--text-dark); min-width: 160px; max-width: 200px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0;
}
.rpt-hbar-track {
  flex: 1; height: 10px; background: var(--bg-surface);
  border-radius: 999px; overflow: hidden;
}
.rpt-hbar-fill {
  height: 100%; border-radius: 999px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.rpt-hbar-val {
  font-size: .8rem; font-weight: 600; color: var(--text-dark);
  min-width: 28px; text-align: right; flex-shrink: 0;
}

.rpt-donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rpt-legend      { display: flex; flex-direction: column; gap: 8px; }
.rpt-legend-item { display: flex; align-items: center; gap: 8px; }
.rpt-legend-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.rpt-legend-label { font-size: .8rem; color: var(--text-dark); flex: 1; }
.rpt-legend-val  { font-size: .8rem; font-weight: 600; color: var(--text-dark); }

html.dark .rpt-kpi-card { background: var(--bg-surface); border-color: var(--color-border); }

/* Upcoming-payroll rows (Dashboard) */
.upcoming-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--card-border); flex-wrap: wrap;
}
.upcoming-row:last-child { border-bottom: none; }
.upcoming-client { font-weight: 600; color: var(--text-dark); }
.upcoming-date { font-size: .78rem; color: var(--text-muted); }
.upcoming-estimate { text-align: right; }
.upcoming-estimate-value { font-weight: 700; color: var(--text-dark); }
.upcoming-estimate-label { font-size: .68rem; color: var(--warning); }

/* Page header */
.emp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding: 0 2px;
}
.emp-title {
  margin: 0;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--text-dark);
}
.emp-subtitle {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: .9rem;
}

/* Inline header metrics strip */
.page-header-metrics {
  display: flex;
  align-items: stretch;
  background: rgba(255,255,255,0.32);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.65),
    0 4px 20px rgba(0,0,0,0.07);
  overflow: hidden;
}
.page-header-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  min-width: 72px;
  position: relative;
  gap: 1px;
}
.page-header-metric + .page-header-metric::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(148,163,184,0.35);
}
.page-header-metric-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
  letter-spacing: -0.03em;
}
.page-header-metric-label {
  font-size: 0.67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 3px;
}
html.dark .page-header-metrics {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}
html.dark .page-header-metric + .page-header-metric::before {
  background: rgba(255,255,255,0.12);
}

/* Filter bar */
.emp-filter-bar {
  padding: 10px 16px !important;
  margin-bottom: 0;
  box-shadow: none !important;
}
.emp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.emp-filters .input {
  flex: 1;
  min-width: 130px;
  max-width: 220px;
  font-size: .8rem;
  height: 34px;
  padding: 0 10px;
}
.emp-filters .btn { flex-shrink: 0; }

/* Endorsements sub-tabs */
.cp-subtab-bar {
  display: flex;
  align-items: center;
  padding: 6px 16px 0;
  border-bottom: 2px solid var(--glass-border);
  background: var(--canvas-bg, #fff);
}
.cp-subtab-tabs {
  display: flex;
  gap: 4px;
}
.cp-subtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  border-radius: 4px 4px 0 0;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.cp-subtab:hover { color: var(--primary); }
.cp-subtab--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.cp-subtab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--glass-border);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
}
.cp-subtab--active .cp-subtab-badge {
  background: var(--primary);
  color: #fff;
}

/* Empty state */
.list-empty {
  text-align: center;
  padding: 60px 20px;
}
.list-empty-icon  { font-size: 2.4rem; opacity: .35; margin-bottom: 12px; }
.list-empty-title { font-size: .95rem; font-weight: 600; color: var(--text-dark); margin: 0 0 6px; }
.list-empty-sub   { font-size: .82rem; color: var(--text-muted); margin: 0; }

/* Pagination */
.emp-pagination { margin-top: 0; }  /* spacing handled by .page-pager */
.emp-paging-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

/* ─── Pager (shared by every list) ────────────────────────────────────────── */
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}
.pager__count {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-right: 8px;
}
.pager__pages {
  display: flex;
  align-items: center;
  gap: 2px;
}
.pager__nav,
.pager__page {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: transparent;
  color: var(--text, #1e293b);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.pager__nav:hover:not(:disabled),
.pager__page:hover:not(.is-current) {
  background: var(--accent-bg, #eff6ff);
  border-color: var(--accent, #2563eb);
  color: var(--accent, #2563eb);
}
.pager__nav:disabled {
  opacity: .45;
  cursor: default;
}
/* The current page is a state, not a target — flat, and not clickable-looking. */
.pager__page.is-current {
  background: var(--accent, #2563eb);
  border-color: var(--accent, #2563eb);
  color: #fff;
  cursor: default;
}
.pager__gap {
  padding: 0 2px;
  color: var(--text-muted);
  user-select: none;
}
.pager__jump {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
}
.pager__jump-label {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.pager__jump-input {
  width: 62px;
  height: 32px;
  text-align: center;
}
/* Narrow screens: the numbers matter more than the count label. */
@media (max-width: 720px) {
  .pager { justify-content: center; }
  .pager__count { width: 100%; text-align: center; margin: 0 0 4px; }
  .pager__jump { margin-left: 0; }
}

/* ─── Employee Profile Layout ─────────────────────────────────────────────── */

/* Profile header card */
.emp-profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 32px !important;
  margin-bottom: 0 !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  border-bottom: none !important;
}

/* Avatar circle */
.emp-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-teal, #2d9da6);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Profile name / sub-line */
.emp-profile-meta { flex: 1; }
.emp-profile-name {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
}
/* Deployed client — sits directly under the name, above position/dept/ID.
   Weighted heavier than the sub line because it is the first thing HR looks
   for on an employee. */
.emp-profile-client {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary);
}
.emp-profile-client svg { flex-shrink: 0; }
/* No deployment is still worth stating, but it should not read as a client. */
.emp-profile-client--none {
  font-weight: 600;
  color: var(--text-muted);
}

.emp-profile-sub  {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.emp-profile-badges { display: flex; gap: 8px; flex-wrap: wrap; }

/* Two-column profile body */
.emp-profile-body {
  display: block;
}
.emp-profile-form  > .card { border-radius: var(--radius-lg) !important; border: 1px solid var(--card-border) !important; }
.emp-profile-form  > .card:last-child { border-radius: var(--radius-lg) !important; }

/* Bottom section cards (Deployment History, Activity Log) */
.ep-bottom-card { margin-top: 24px; border-radius: var(--radius-lg) !important; border: 1px solid var(--card-border) !important; }

/* Activity Log */
.ep-act-log { display: flex; flex-direction: column; gap: 0; }
.ep-act-entry {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}
.ep-act-entry:last-child { border-bottom: none; }
.ep-act-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-teal, #10b981);
  flex-shrink: 0;
  margin-top: 5px;
}
.ep-act-dot--create { background: var(--primary-teal, #10b981); }
.ep-act-dot--update { background: #6366f1; }
.ep-act-dot--system { background: var(--text-muted); }
.ep-act-body { flex: 1; min-width: 0; }
.ep-act-action { font-size: .875rem; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; }
.ep-act-meta { font-size: .775rem; color: var(--text-muted); margin-bottom: 6px; }
.ep-act-changes { display: flex; flex-direction: column; gap: 4px; }
.ep-act-change {
  font-size: .78rem;
  background: var(--bg-mint);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: baseline;
}
.ep-act-change-field { font-weight: 700; color: var(--text-dark); min-width: 120px; }
.ep-act-change-from  { color: var(--text-muted); text-decoration: line-through; }
.ep-act-change-arrow { color: var(--text-muted); }
.ep-act-change-to    { color: var(--primary-teal, #10b981); font-weight: 600; }

html.dark .ep-act-change { background: #0a0f1a; border-color: #1f2937; }

/* Phone numbers widget */
#ep-phones-list { display: flex; flex-direction: column; gap: 8px; }
.ep-phone-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ep-phone-row .ep-phone-type { max-width: 130px; flex-shrink: 0; }
.ep-phone-row .ep-phone-num  { flex: 1; }
.ep-phone-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.ep-phone-remove:hover { color: var(--danger); background: var(--danger-bg); }

/* Read-only phone list */
.ep-phones-list { display: flex; flex-direction: column; gap: 0; }
.ep-phone-row--ro {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}
.ep-phone-row--ro:last-child { border-bottom: none; }
.ep-phone-type-tag {
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--accent-bg);
  color: var(--accent-text);
  border-radius: 20px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.ep-phone-number { font-size: .875rem; color: var(--text-dark); }

/* Section headings inside profile cards */
.emp-section-title {
  margin: 0 0 20px;
  font-size: .85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
}

/* Deployment history */
.deploy-history-list { display: flex; flex-direction: column; gap: 12px; }
.deploy-history-item {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--bg-mint);
}
.deploy-history-client { font-weight: 700; font-size: .9rem; color: var(--text-dark); margin-bottom: 4px; }
.deploy-history-meta   { font-size: .8rem; color: var(--text-muted); margin-bottom: 4px; }
.deploy-history-dates  { font-size: .78rem; color: var(--text-muted); }

/* Responsive: profile is already single-column */
@media (max-width: 900px) {
  .emp-profile-form  > .card:last-child { border-radius: var(--radius-lg) !important; }
}

/* Dark mode */
html.dark .deploy-history-item { background: #0a0f1a; border-color: #1f2937; }
html.dark .emp-profile-header  { background: #111827; }

/* ─── Employee Profile Layout (sticky header + inner scroll) ────────────── */

/* When the profile page is active, content-area stops being the scroll host */
.content-area:has(.ep-layout) {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.ep-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.ep-sticky-header {
  flex-shrink: 0;
  padding: 20px 32px 0;
  background: transparent;
  border-bottom: 1px solid rgba(186,213,254,0.4);
}

.ep-tab-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 24px 32px 40px;
  scrollbar-width: thin;
  scrollbar-color: rgba(16,185,129,0.25) transparent;
}
.ep-tab-body::-webkit-scrollbar       { width: 6px; }
.ep-tab-body::-webkit-scrollbar-track { background: transparent; }
.ep-tab-body::-webkit-scrollbar-thumb { background: rgba(16,185,129,0.25); border-radius: 3px; }

html.dark .ep-sticky-header { background: transparent; border-bottom-color: rgba(255,255,255,0.06); }

/* ─── Generic page layout (sticky header + inner scroll) ────────────────── */
/* Used by Employees, Onboarding, Users, etc. */
.content-area:has(.page-layout) {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.page-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.page-sticky-header {
  flex-shrink: 0;
  padding: 20px 32px 16px;
  border-bottom: 1px solid rgba(186,213,254,0.4);
}

.page-scroll-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 20px 32px 40px;
  scrollbar-width: thin;
  scrollbar-color: rgba(167,139,250,0.25) transparent;
}
.page-scroll-body::-webkit-scrollbar       { width: 6px; }
.page-scroll-body::-webkit-scrollbar-track { background: transparent; }
.page-scroll-body::-webkit-scrollbar-thumb { background: rgba(167,139,250,0.25); border-radius: 3px; }

html.dark .page-sticky-header { border-bottom-color: rgba(255,255,255,0.06); }

/* ─── Table page variant ───────────────────────────────────────────────── */
.page-layout--table .page-sticky-header {
  padding-bottom: 12px;
  border-bottom: none;
}
.page-layout--table .page-scroll-body {
  padding-top: 0;
  padding-bottom: 0;        /* pager handles bottom space */
  scrollbar-gutter: stable;
}

/* Pagination zone — always visible, never scrolls away */
.page-pager {
  flex-shrink: 0;
  padding: 10px 32px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid rgba(186,213,254,0.35);
  background: transparent;
}
/* When pagination is empty, collapse the zone */
.page-pager:empty,
.page-pager > *:empty { display: none; }

/* ─── Table cards: thead sticky, no backdrop-filter ──────────────────────── */
/* backdrop-filter creates a stacking context that traps position:sticky     */
.card.table-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.03);
}

/* ─── Employee Profile Tabs ──────────────────────────────────────────────── */
.ep-tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0;
}
.ep-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 20px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ep-tab:hover              { color: var(--text-dark); }
.ep-tab--active            { color: var(--primary); border-bottom-color: var(--primary); }
.ep-tab-panel              { display: block; }

html.dark .ep-tab-bar      { border-bottom-color: #1f2937; }
html.dark .ep-tab:hover    { color: var(--text-dark); }
html.dark .ep-tab--active  { color: var(--primary); border-bottom-color: var(--primary); }

/* ─── Onboarding List ────────────────────────────────────────────────────── */
/* ─── Onboarding metrics ticker ──────────────────────────────────────────── */
.ob-header {
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* FAB-style + button */
.btn--fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.55);
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 12px;
  box-shadow:
    0 4px 18px rgba(5,150,105,0.40),
    0 0 0 4px rgba(16,185,129,0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn--fab:hover {
  transform: scale(1.12);
  box-shadow:
    0 6px 24px rgba(5,150,105,0.50),
    0 0 0 6px rgba(16,185,129,0.20);
}
.btn--fab:active {
  transform: scale(0.96);
}
.ob-ticker {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition), box-shadow var(--transition);
  min-width: 200px;
}
.ob-ticker:hover {
  background: #F8FAFC;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.ob-ticker-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16,185,129,0.2);
  animation: ob-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes ob-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(16,185,129,0.2); }
  50%       { box-shadow: 0 0 0 5px rgba(16,185,129,0.08); }
}
.ob-ticker-content {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  overflow: hidden;
}
.ob-ticker-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.ob-ticker-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.ob-ticker--exit  { opacity: 0 !important; transform: translateY(-6px) !important; }
.ob-ticker--enter { animation: ob-enter 0.25s ease forwards; }
@keyframes ob-enter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ob-ticker-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}
.ob-ticker-pip {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255, 107, 107, 0.2);
  transition: background 0.25s;
}
.ob-ticker-pip--active { background: #FF6B6B; }

.ob-progress-wrap  { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ob-progress-bar   { width: 120px; height: 6px; background: var(--color-border); border-radius: 99px; overflow: hidden; }
.ob-progress-fill  { height: 100%; background: var(--primary-teal); border-radius: 99px; transition: width .3s ease; }
.ob-progress-label { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }

/* ─── HR Handler tag (shared across Onboarding / Offboarding / Disciplinary) ─ */
.proc-handler {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--primary-teal);
  background: color-mix(in srgb, var(--primary-teal) 12%, transparent);
  border-radius: 99px;
  padding: 2px 10px;
}
html.dark .proc-handler {
  background: color-mix(in srgb, var(--primary-teal) 18%, transparent);
}

/* ─── Applicant Onboarding Detail ───────────────────────────────────────── */
.aob-header-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 32px !important;
  flex-wrap: wrap;
}
.aob-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-teal);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.aob-header-info   { flex: 1; min-width: 200px; }
.aob-header-name   { font-size: 1.25rem; font-weight: 800; color: var(--text-dark); margin-bottom: 4px; }
.aob-header-meta   { font-size: .88rem; color: var(--text-muted); margin-bottom: 8px; }
.aob-header-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: .8rem;
  color: var(--text-muted);
}
.aob-header-right  { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.aob-progress-block { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.aob-progress-block .ob-progress-bar { width: 180px; }
.aob-progress-block .ob-progress-label { text-align: right; }

/* ─── Horizontal Stepper ──────────────────────────────────────────────────── */
.aob-hstepper {
  display: flex;
  align-items: center;
  padding: 20px 28px;
  gap: 0;
}

.aob-hstep {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: default;
  flex-shrink: 0;
}
.aob-hstep[data-goto] { cursor: pointer; }
.aob-hstep[data-goto]:hover .aob-hstep-circle { border-color: var(--primary-teal); color: var(--primary-teal); }

.aob-hstep-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.aob-hstep--done  .aob-hstep-circle { background: #10b981; border-color: #10b981; color: #fff; }
.aob-hstep--active .aob-hstep-circle { background: var(--primary-teal); border-color: var(--primary-teal); color: #fff; }
.aob-hstep--locked .aob-hstep-circle { opacity: .45; }

.aob-hstep-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
}
.aob-hstep--locked .aob-hstep-label { opacity: .45; }
.aob-hstep-sub {
  font-size: .7rem;
  font-weight: 500;
  color: var(--text-muted);
}
.aob-hstep--done  .aob-hstep-sub  { color: #10b981; }
.aob-hstep--active .aob-hstep-label { color: var(--primary-teal); }

.aob-hstep-line {
  flex: 1;
  height: 2px;
  margin: 0 12px;
  border-radius: 2px;
  min-width: 32px;
}
.aob-hstep-line--done    { background: #10b981; }
.aob-hstep-line--pending { background: var(--color-border); }

.aob-step-done-banner {
  padding: 12px 16px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: .875rem;
  font-weight: 600;
}
html.dark .aob-step-done-banner { background: #052e16; border-color: #166534; color: #4ade80; }

.aob-proceed-warn {
  font-size: .8rem;
  font-weight: 600;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 5px 10px;
}
html.dark .aob-proceed-warn { background: #1c1200; border-color: #854d0e; color: #fbbf24; }

.aob-ori-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.aob-ori-item { margin-bottom: 2px; }

.aob-contract-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
}

html.dark .aob-hstep-circle { background: #1e293b; border-color: #334155; }

/* ─── Audit log ──────────────────────────────────────────────────────────── */
.aob-audit-card { padding: 20px 24px; }
.aob-audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .825rem;
}
.aob-audit-table thead th {
  text-align: left;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px 10px;
  border-bottom: 1px solid var(--border);
}
.aob-audit-table tbody tr { border-bottom: 1px solid var(--border); }
.aob-audit-table tbody tr:last-child { border-bottom: none; }
.aob-audit-table tbody td {
  padding: 9px 8px;
  vertical-align: top;
  color: var(--text-secondary);
}
.aob-audit-table tbody td:first-child { color: var(--text-muted); white-space: nowrap; }
.aob-audit-detail {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.aob-audit-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: .85rem;
}

.aob-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.aob-section-title { font-size: 1rem; font-weight: 800; color: var(--text-dark); }
.aob-section-count {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-mint);
  border: 1px solid var(--color-border);
  border-radius: 99px;
  padding: 3px 12px;
}

.aob-checklist { display: flex; flex-direction: column; gap: 2px; }

.aob-check-item {
  display: flex;
  flex-direction: column;
  padding: 2px 12px;
  border-radius: 10px;
  transition: background var(--transition);
}
.aob-check-item:hover { background: var(--bg-mint); }
.aob-check-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
}
.aob-check-item--done .aob-check-name { color: var(--text-muted); text-decoration: line-through; text-decoration-color: #10b981; }

.aob-check-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.aob-check-btn:hover:not(:disabled) { border-color: #10b981; color: #10b981; }
.aob-check-btn--checked { background: #10b981; border-color: #10b981; color: #fff; }
.aob-check-btn--checked:hover:not(:disabled) { background: #059669; border-color: #059669; }
.aob-check-btn:disabled { opacity: .5; cursor: default; }

.aob-check-label { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.aob-check-name  { font-size: .9rem; font-weight: 600; color: var(--text-dark); }
.aob-check-date  { font-size: .75rem; color: #10b981; font-weight: 500; }

/* ─── Document data fields (inline encoding) ──────────────────────────── */
.aob-data-form {
  margin: 0 0 8px 42px;
  padding: 10px 14px;
  background: var(--bg-mint);
  border-left: 3px solid var(--color-border);
  border-radius: 0 8px 8px 0;
}
.aob-data-form--collapsed { display: none; }

/* ─── Details toggle button ────────────────────────────────────────────── */
.aob-details-toggle {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  margin-left: 4px;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.aob-details-toggle:hover { background: var(--bg-mint); border-color: var(--primary-teal); color: var(--primary-teal); }
.aob-check-item--expanded .aob-details-toggle { border-color: var(--primary-teal); color: var(--primary-teal); }

/* ─── Missing badge ─────────────────────────────────────────────────────── */
.aob-req-missing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 10px;
}
html.dark .aob-req-missing-badge { background: #1c1200; border-color: #854d0e; color: #fbbf24; }

/* ─── Submitted divider ─────────────────────────────────────────────────── */
.aob-req-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.aob-req-divider::before, .aob-req-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Optional section toggle ───────────────────────────────────────────── */
.aob-optional-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: color var(--transition);
}
.aob-optional-toggle:hover { color: var(--primary-teal); }
.aob-optional-count {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 8px;
}
.aob-optional-arrow { color: var(--text-muted); display: flex; align-items: center; }
.aob-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 16px;
}
.aob-data-field { display: flex; flex-direction: column; gap: 4px; }
.aob-seg-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.aob-seg-sep {
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
}
.aob-seg-input {
  text-align: center;
  width: calc(var(--seg-len, 3) * 1ch + 28px);
  padding-left: 6px !important;
  padding-right: 6px !important;
  /* Hold the declared width. These are flex items in a grid cell that is often
     narrower than the row needs, and without this they shrink to fit — which is
     what made the 4-character boxes too small to read once PhilHealth went to
     three of them. */
  flex-shrink: 0;
}
/* size each segment by its maxlength */
.aob-seg-input[maxlength="1"] { width: 46px; }
.aob-seg-input[maxlength="2"] { width: 58px; }
.aob-seg-input[maxlength="3"] { width: 70px; }
.aob-seg-input[maxlength="4"] { width: 82px; }
.aob-seg-input[maxlength="6"] { width: 106px; }
.aob-seg-input[maxlength="7"] { width: 118px; }

/* A segmented field needs the whole row: three 4-character boxes plus their
   separators do not fit the grid's 160px minimum column. Each government-ID
   requirement has a single field, so nothing gets displaced. */
.aob-data-field--segmented { grid-column: 1 / -1; }
.aob-data-field--segmented .aob-seg-group { flex-wrap: wrap; row-gap: 6px; }
.input--sm { padding: 5px 9px !important; font-size: .8rem !important; }
.aob-check-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.aob-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--primary-teal);
  background: var(--bg-mint);
  color: var(--primary-teal);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.aob-upload-label:hover {
  background: var(--primary-teal);
  color: #fff;
  box-shadow: 0 2px 8px rgba(20,184,166,.25);
}

.aob-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  max-width: 200px;
  transition: background var(--transition);
  white-space: nowrap;
}
.aob-file-chip:hover { background: #bae6fd; }
.aob-file-chip-name  { overflow: hidden; text-overflow: ellipsis; }

.aob-file-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.aob-file-delete:hover { background: #fee2e2; color: var(--color-danger); }

.aob-upload-progress {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

@keyframes aob-spin { to { transform: rotate(360deg); } }
.aob-spin { animation: aob-spin .8s linear infinite; }

html.dark .aob-file-chip  { background: #0c2a3d; color: #38bdf8; }
html.dark .aob-file-chip:hover { background: #0c3d57; }
html.dark .aob-file-delete:hover { background: #450a0a; color: #fca5a5; }

html.dark .aob-section-count { background: #0a0f1a; }
html.dark .aob-check-item:hover { background: #0a0f1a; }
html.dark .aob-check-btn { background: #111827; border-color: #1f2937; }
html.dark .aob-data-form { background: #0a0f1a; border-color: #1f2937; }

/* ─── Employee prefill notice ──────────────────────────────────────── */
.prefill-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: .85rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 20px;
}
html.dark .prefill-notice { background: #1c1500; border-color: #92400e; color: #fbbf24; }

/* ─── Offboarding List ────────────────────────────────────────────────────── */

.off-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.off-card:hover { box-shadow: var(--shadow-card); border-color: var(--primary-teal); }

.off-card-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary-teal);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.off-card-body  { flex: 1; min-width: 0; }
.off-card-name  { font-weight: 700; font-size: .95rem; color: var(--text-dark); margin-bottom: 2px; }
.off-card-meta  { font-size: .8rem; color: var(--text-muted); margin-bottom: 8px; }
.off-card-progress { display: flex; align-items: center; gap: 10px; }

.off-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.off-card-date { font-size: .78rem; color: var(--text-muted); font-weight: 500; }

/* ─── Offboarding Detail ─────────────────────────────────────────────────── */

.off-detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px !important;
  margin-bottom: 0 !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  border-bottom: none !important;
  flex-wrap: wrap;
}

.off-detail-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-teal);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.off-detail-meta  { flex: 1; min-width: 200px; }
.off-detail-name  { margin: 0 0 4px; font-size: 1.35rem; font-weight: 800; color: var(--text-dark); }
.off-detail-sub   { font-size: .85rem; color: var(--text-muted); margin-bottom: 4px; }

/* Clearance checklist rows */
.off-clearance-list   { display: flex; flex-direction: column; gap: 2px; }

.off-clearance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background var(--transition);
}
.off-clearance-row:hover { background: var(--bg-mint); }

.off-clearance-icon  { font-size: 1.1rem; flex-shrink: 0; width: 28px; text-align: center; }
.off-clearance-info  { flex: 1; min-width: 0; }
.off-clearance-label { font-weight: 600; font-size: .9rem; color: var(--text-dark); }
.off-clearance-meta  { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.off-clearance-notes { font-size: .75rem; color: var(--text-muted); font-style: italic; margin-top: 1px; }

.off-clearance-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Dark mode overrides */
html.dark .off-card           { background: #111827; border-color: #1f2937; }
html.dark .off-card:hover     { border-color: var(--primary-teal); }
html.dark .off-detail-header  { background: #111827; }
html.dark .off-clearance-row:hover { background: #0a0f1a; }
html.dark .btn--danger-ghost:hover:not(:disabled) { background: #450a0a; }

/* ─── Disciplinary ─────────────────────────────────────────────────────────── */

/* Badges */
.badge--orange { background: #fff7ed; color: #c2410c; }
.badge--pink   { background: #fdf2f8; color: #be185d; }
.badge--muted  { background: var(--color-border); color: var(--text-muted); }

/* List cards */
.disc-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.disc-card:hover { box-shadow: var(--shadow-card); border-color: var(--primary-teal); }
.disc-card-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; color: #fff;
  flex-shrink: 0;
}
.disc-card-body  { flex: 1; min-width: 0; }
.disc-card-name  { font-weight: 700; font-size: .95rem; color: var(--text-dark); margin-bottom: 2px; }
.disc-card-meta  { font-size: .8rem; color: var(--text-muted); margin-bottom: 4px; }
.disc-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }

/* Timeline */
.disc-timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 16px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  overflow-x: auto;
}
.disc-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.disc-step-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--color-border);
  border: 2px solid var(--color-border);
  transition: background var(--transition);
}
.disc-step--done .disc-step-dot  { background: var(--color-success); border-color: var(--color-success); }
.disc-step--current .disc-step-dot { background: var(--primary-teal); border-color: var(--primary-teal); box-shadow: 0 0 0 3px rgba(90,169,230,.25); }
.disc-step--done    { color: var(--color-success); }
.disc-step--current { color: var(--primary-teal); }
.disc-step-line {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  min-width: 24px;
  margin-bottom: 20px;
  align-self: flex-start;
  margin-top: 27px; /* vertically centres on the dot row */
}

/* NTE / explanation / hearing content blocks */
.disc-nte-block  { background: var(--bg-mint); border-radius: var(--radius-sm); padding: 14px 16px; }
.disc-nte-content {
  font-size: .875rem;
  color: var(--text-dark);
  background: var(--bg-mint);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Activity log */
.disc-log-entry {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.disc-log-entry:last-child { border-bottom: none; }
.disc-log-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary-teal);
  flex-shrink: 0;
  margin-top: 5px;
}
.disc-log-action { font-size: .875rem; color: var(--text-dark); }
.disc-log-meta   { font-size: .75rem;  color: var(--text-muted); margin-top: 2px; }

/* Dark mode */
html.dark .disc-card           { background: #111827; border-color: #1f2937; }
html.dark .disc-card:hover     { border-color: var(--primary-teal); }
html.dark .disc-nte-block      { background: #0a0f1a; }
html.dark .disc-nte-content    { background: #0a0f1a; }
html.dark .badge--orange       { background: #1c0500; color: #fb923c; }
html.dark .badge--pink         { background: #2d0520; color: #f472b6; }
html.dark .badge--muted        { background: #111827; border-color: #1f2937; }
html.dark .disc-timeline       { background: #111827; border-color: #1f2937; }
html.dark .disc-step-line      { background: #1f2937; }

/* ─── Employee Files Tab ─────────────────────────────────────────────────── */
.ep-files-upload-card  { margin-bottom: 20px; }
.ep-files-upload-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.ep-files-upload-pick  { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 200px; }

.ep-files-table-wrap   { overflow-x: auto; }
.ep-files-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.ep-files-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.ep-files-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
  background: var(--color-surface);
  backdrop-filter: none;
}
.ep-files-table td           { padding: 12px 16px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.ep-file-row:last-child td   { border-bottom: none; }
.ep-file-row:hover td        { background: rgba(255,107,107,0.05); }
.ep-file-td-name             { max-width: 240px; }
.ep-file-td-meta             { color: var(--text-muted); font-size: .8rem; white-space: nowrap; }

/* ─── Dashboard ──────────────────────────────────────────────────────────── */

/* Welcome Banner — glassmorphic with SVG decoration */
.dash-welcome {
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1.5px solid rgba(200, 148, 142, 0.30);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.65),
    0 8px 32px rgba(0,0,0,0.07),
    0 2px 8px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 110px;
}
.dash-welcome-content {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}
.dash-welcome-greeting {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -.025em;
  margin-bottom: 6px;
  line-height: 1.1;
}
.dash-welcome-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.dash-welcome-role-badge {
  background: rgba(14,165,233,0.13);
  border: 1px solid rgba(14,165,233,0.28);
  color: var(--primary);
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 10px;
  border-radius: 99px;
  flex-shrink: 0;
}
.dash-welcome-date {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 400;
}
.dash-welcome-insight {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.dash-welcome-insight strong {
  color: var(--text-dark);
  font-weight: 700;
}
.dash-welcome-svg {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: auto;
  max-width: 320px;
  pointer-events: none;
  flex-shrink: 0;
}

/* ─── Metric Cards Grid ──────────────────────────────────────────────────── */
.dash-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.dash-metric-card {
  background: rgba(255,255,255,0.20);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1.5px solid rgba(200, 148, 142, 0.30);
  border-radius: var(--radius-md);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 200ms cubic-bezier(.34,1.2,.64,1), box-shadow 200ms ease, background 150ms ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  user-select: none;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.58),
    0 6px 24px rgba(0,0,0,0.06),
    0 2px 6px rgba(0,0,0,0.04);
}
.dash-metric-card:hover {
  background: rgba(255,255,255,0.32);
  transform: translateY(-4px);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.68),
    0 16px 48px rgba(0,0,0,0.11),
    0 4px 14px rgba(0,0,0,0.07);
}
.dash-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.dash-metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 107, 0.10);
  border: 1px solid rgba(255, 107, 107, 0.20);
  color: var(--primary);
  flex-shrink: 0;
}
.dash-metric-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
  letter-spacing: -.04em;
}
.dash-metric-label {
  font-size: .67rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.3;
}
.dash-metric-bg-icon {
  position: absolute;
  bottom: -10px;
  right: -8px;
  opacity: 0.05;
  pointer-events: none;
  color: var(--text-dark);
  line-height: 1;
}

/* ─── Quick Access ───────────────────────────────────────────────────────── */
.dash-qa-section {
  margin-bottom: 24px;
}
.dash-qa-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.dash-qa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1.5px solid rgba(200, 148, 142, 0.30);
  border-radius: 99px;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  color: var(--text-dark);
  font-size: .8rem;
  font-weight: 600;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.52),
    0 2px 8px rgba(0,0,0,0.05);
}
.dash-qa-btn:hover {
  background: rgba(255,255,255,0.38);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.62),
    0 6px 20px rgba(0,0,0,0.10);
}
.dash-qa-btn:active { transform: translateY(0); }
.dash-qa-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
}
.dash-qa-label { white-space: nowrap; }

/* Kept for backward compat (other pages may still use these) */
.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.dash-stat-card {
  background: rgba(255, 255, 255, 0.60);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(200, 160, 150, 0.30);
  border-radius: 12px;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow var(--transition), transform var(--transition);
  user-select: none;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.dash-stat-card:hover { box-shadow: var(--shadow-card); transform: translateY(-3px); }
.dash-stat-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.35);
  color: var(--primary);
  flex-shrink: 0;
}
.dash-stat-icon .lucide-icon { display: block; }
.dash-stat-value { font-size: 2rem; font-weight: 800; color: var(--text-dark); line-height: 1; }
.dash-stat-label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.dash-section-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* ─ Onboarding Doughnut Widget ─────────────────────────────────────────────── */
.dash-bottom-row {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .dash-bottom-row { grid-template-columns: 1fr; }
}
.dash-doughnut-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.dash-doughnut-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  align-self: flex-start;
}
.dash-doughnut-wrap {
  position: relative;
  width: 160px; height: 160px;
  flex-shrink: 0;
}
.dash-doughnut-wrap svg { display: block; }
.dash-doughnut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.dash-doughnut-pct {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
}
.dash-doughnut-sub {
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 2px;
}
.dash-doughnut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.dash-doughnut-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
}
.dash-doughnut-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dash-doughnut-legend-label { flex: 1; color: var(--text-muted); font-weight: 500; }
.dash-doughnut-legend-val   { font-weight: 700; color: var(--text-dark); }

.dash-client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.dash-client-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-glass);
  transition: box-shadow var(--transition), transform var(--transition);
}
.dash-client-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.dash-client-name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-client-counts { display: flex; gap: 16px; align-items: flex-end; }
.dash-client-count  { display: flex; flex-direction: column; gap: 3px; }
.dash-client-num    { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); line-height: 1; }
.dash-client-num--active { color: #10b981; }
.dash-client-num--leave  { color: #f59e0b; }
.dash-client-lbl {
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

html.dark .dash-welcome       {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 32px rgba(0,0,0,0.25);
}
html.dark .dash-welcome-role-badge {
  background: rgba(14,165,233,0.12);
  border-color: rgba(14,165,233,0.22);
}
html.dark .dash-metric-card   {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 6px 24px rgba(0,0,0,0.20);
}
html.dark .dash-metric-card:hover {
  background: rgba(255,255,255,0.10);
}
html.dark .dash-metric-icon   {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.15);
}
html.dark .dash-qa-btn        {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
}
html.dark .dash-qa-btn:hover  { background: rgba(255,255,255,0.12); }
html.dark .dash-stat-card     { background: var(--glass-bg); border-color: var(--glass-border); }
html.dark .dash-client-card   { background: var(--glass-bg); border-color: var(--glass-border); }
html.dark .dash-doughnut-card { background: var(--glass-bg); border-color: var(--glass-border); }

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD REDESIGN — Zen Header · Action Chips · Active Stream
   Engagement Strip · Client Pulse
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Scroll wrapper ─────────────────────────────────────────────────────────── */
.dash-scroll-wrap { padding: 20px 24px 40px; }

/* ── Zen quote ──────────────────────────────────────────────────────────────── */
.dash-zen-quote {
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
  opacity: .85;
}

/* ── Action chips ───────────────────────────────────────────────────────────── */
.dash-action-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.dash-action-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  min-width: 140px;
  cursor: pointer;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1.5px solid rgba(200, 148, 142, 0.30);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.58), var(--shadow-card);
  transition: transform 120ms, box-shadow 120ms;
  border-left: 3px solid transparent;
}
.dash-action-chip:hover { transform: translateY(-2px); box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.58), var(--shadow-glass); }
.dash-action-chip--warning {
  border-left: 3px solid #f59e0b;
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.58), 0 0 0 2px rgba(245,158,11,0.15), var(--shadow-card);
}
.dash-action-chip--urgent {
  border-left: 3px solid #ef4444;
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.58), 0 0 0 2px rgba(239,68,68,0.18), inset 0 0 16px rgba(239,68,68,0.06), var(--shadow-card);
}
.dash-chip-count  { font-size: 2rem; font-weight: 800; color: var(--text-dark); line-height: 1; }
.dash-chip-label  { font-size: .67rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-top: 4px; }
.dash-chip-arrow  { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); opacity: .3; font-size: .9rem; }

/* ── 2-column middle grid ───────────────────────────────────────────────────── */
.dash-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 24px;
  align-items: start;
}
@media (max-width: 960px) { .dash-main-grid { grid-template-columns: 1fr; } }

/* ── Active Stream ──────────────────────────────────────────────────────────── */
.dash-stream {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1.5px solid rgba(200, 148, 142, 0.30);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.58), var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}
.dash-stream-list  { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.dash-stream-card  {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(200, 148, 142, 0.22);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 150ms;
}
.dash-stream-card:hover               { background: rgba(255,255,255,0.24); }
.dash-stream-card--urgent             { border-left: 3px solid #ef4444; background: rgba(239,68,68,0.05); }
.dash-stream-badge {
  font-size: .62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255, 107, 107, 0.12);
  color: #FF6B6B;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid rgba(255, 107, 107, 0.20);
}
.dash-stream-badge[style*="--badge-color"] {
  background: color-mix(in srgb, var(--badge-color) 15%, transparent);
  color: var(--badge-color);
  border-color: color-mix(in srgb, var(--badge-color) 25%, transparent);
}
.dash-stream-body   { flex: 1; min-width: 0; }
.dash-stream-title  { font-size: .85rem; font-weight: 600; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-stream-meta   { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.dash-stream-arrow  { color: var(--text-muted); flex-shrink: 0; font-size: .9rem; }
.dash-stream-empty  {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: .85rem;
  flex: 1;
  text-align: center;
}
.dash-stream-empty-icon { opacity: .3; color: var(--text-muted); }
.dash-stream-footer {
  display: block;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  text-align: center;
}
.dash-stream-footer:hover { opacity: .8; }

/* ── Role Module ────────────────────────────────────────────────────────────── */
.dash-role-module {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1.5px solid rgba(200, 148, 142, 0.30);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.58), var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 200px;
  cursor: pointer;
  transition: box-shadow 150ms;
}
.dash-role-module:hover { box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.58), var(--shadow-glass); }
.dash-journey-stages     { display: flex; align-items: center; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.dash-journey-stage      { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dash-journey-stage-num  { font-size: 2rem; font-weight: 800; color: var(--text-dark); line-height: 1; }
.dash-journey-stage-num--green { color: #10b981; }
.dash-journey-stage-num--blue  { color: #3b82f6; }
.dash-journey-stage-lbl  { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.dash-journey-arrow      { color: var(--text-muted); font-size: 1.1rem; flex-shrink: 0; }
.dash-journey-list       { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.dash-journey-list-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 6px; }
.dash-journey-name       { font-size: .8rem; color: var(--text-dark); padding: 2px 0; }
.dash-journey-more       { font-size: .72rem; color: var(--text-muted); font-style: italic; margin-top: 4px; }
.dash-role-empty         { font-size: .82rem; color: var(--text-muted); text-align: center; padding: 20px 0; margin: 0; }
.dash-case-queue         { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.dash-case-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(200, 148, 142, 0.22);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 150ms;
}
.dash-case-item:hover    { background: rgba(255,255,255,0.20); }
.dash-case-body          { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.dash-case-label         { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.dash-case-name          { font-size: .82rem; font-weight: 600; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-case-days          { font-size: .75rem; font-weight: 700; color: var(--text-muted); flex-shrink: 0; background: rgba(255,255,255,0.2); padding: 3px 8px; border-radius: 99px; }
.dash-case-days--urgent  { background: rgba(239,68,68,0.12); color: #ef4444; }

/* ── Engagement Strip ───────────────────────────────────────────────────────── */
.dash-engagement-strip {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1.5px solid rgba(200, 148, 142, 0.30);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.58), var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}
.dash-engagement-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.dash-engagement-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 99px;
  border: 1px solid rgba(200, 148, 142, 0.22);
  background: rgba(255,255,255,0.18);
}
.dash-engagement-card--birthday    { background: rgba(236,72,153,0.08);  border-color: rgba(236,72,153,0.25); }
.dash-engagement-card--anniversary { background: rgba(245,158,11,0.08);  border-color: rgba(245,158,11,0.25); }
.dash-engagement-card--empty       { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.20); color: var(--text-muted); }
.dash-engagement-icon { font-size: 1.1rem; flex-shrink: 0; }
.dash-engagement-body { display: flex; flex-direction: column; gap: 1px; }
.dash-engagement-name { font-size: .82rem; font-weight: 600; color: var(--text-dark); }
.dash-engagement-evt  { font-size: .7rem; color: var(--text-muted); }
.dash-milestone-banner {
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(251,191,36,0.10));
  border: 1px solid rgba(245,158,11,0.30);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 14px;
  font-size: .85rem;
  color: var(--text-dark);
}

/* ── Client Pulse ───────────────────────────────────────────────────────────── */
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: .7; }
  100% { transform: scale(2.5); opacity: 0; }
}
.dash-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}
.dash-pulse-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  animation: pulse-ring 1.8s ease-out infinite;
}
.dash-pulse-dot--green      { background: #10b981; }
.dash-pulse-dot--green::after  { border: 2px solid #10b981; }
.dash-pulse-dot--yellow     { background: #f59e0b; }
.dash-pulse-dot--yellow::after { border: 2px solid #f59e0b; }

.dash-client-pulse-card     { position: relative; }
.dash-client-pulse-card--pinned {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(14,165,233,0.2), inset 0 0 16px rgba(14,165,233,0.06), var(--shadow-card);
}
.dash-client-card-hdr       { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dash-client-card-actions   { display: flex; align-items: center; gap: 8px; }
.dash-pin-btn               { background: none; border: none; cursor: pointer; font-size: .95rem; padding: 2px; line-height: 1; opacity: .6; }
.dash-pin-btn:hover         { opacity: 1; }

.dash-client-focus {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1.5px solid rgba(200, 148, 142, 0.30);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.58), var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
}
.dash-client-focus-hdr   { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--color-border); }
.dash-client-focus-title { font-size: .9rem; font-weight: 700; color: var(--text-dark); }
.dash-client-focus-body  { display: flex; flex-wrap: wrap; gap: 24px; }
.dash-client-focus-col   { flex: 1; min-width: 160px; }

.dash-client-pulse-section { margin-bottom: 24px; }

/* ── Dark-mode overrides (redesign) ────────────────────────────────────────── */
html.dark .dash-stream,
html.dark .dash-role-module,
html.dark .dash-engagement-strip,
html.dark .dash-client-focus,
html.dark .dash-action-chip     { background: var(--glass-bg); border-color: var(--glass-border); }
html.dark .dash-stream-card,
html.dark .dash-case-item       { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
html.dark .dash-stream-card:hover,
html.dark .dash-case-item:hover { background: rgba(255,255,255,0.12); }
html.dark .dash-engagement-card { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.14); }
html.dark .dash-engagement-card--birthday    { background: rgba(236,72,153,0.10); }
html.dark .dash-engagement-card--anniversary { background: rgba(245,158,11,0.10); }

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD — Minimalist 3-Column Layout
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── content-area override when dashboard active ────────────────────────────── */
.content-area:has(.dash-shell) {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Dashboard shell (flex column, no scroll) ───────────────────────────────── */
.dash-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 18px 20px 0;
  gap: 0;
}

/* ── 2-col grid (left sidebar + right center) ───────────────────────────────── */
.dash-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}
@media (max-width: 1100px) { .dash-layout { grid-template-columns: 240px 1fr; } .dash-widget-zone { grid-template-columns: 240px 1fr; } }
@media (max-width: 768px)  { .dash-layout { grid-template-columns: 1fr; } .dash-widget-zone { grid-template-columns: 1fr; } }

.dash-sidebar { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: hidden; }
.dash-center  { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: hidden; }
.dash-right   { display: flex; flex-direction: column; gap: 10px; }

/* ── Flat card (glassmorphism) ──────────────────────────────────────────────── */
.dash-flat-card {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(200, 160, 150, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(180, 100, 90, 0.08);
  padding: 14px 16px;
}

/* ── Profile card — centered avatar ─────────────────────────────────────────── */
.dash-profile-card {
  text-align: center;
  flex-shrink: 0;
}
.dash-profile-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.dash-profile-avatar-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.60);
  border: 3px solid rgba(255,255,255,0.85);
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}
.dash-profile-name-center {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 2px;
}
.dash-profile-company {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
}
/* Legacy profile row (kept for reference, not used on dashboard) */
.dash-profile-row    { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.dash-profile-initial {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.55);
  color: var(--primary); font-size: 1.05rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 2px solid rgba(255,255,255,0.70);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.20);
}
.dash-profile-greeting { font-size: .7rem; color: var(--text-muted); font-weight: 500; }
.dash-profile-name     { font-size: .95rem; font-weight: 700; color: var(--text-dark); line-height: 1.2; margin: 1px 0; }
.dash-profile-role     {
  display: inline-block; font-size: .6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--primary); background: var(--primary-light);
  padding: 2px 8px; border-radius: 99px;
}

/* ── Counter row ────────────────────────────────────────────────────────────── */
.dash-counter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
}
.dash-counter-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  transition: background 120ms;
}
.dash-counter-cell:hover { background: rgba(16, 185, 129, 0.06); }
.dash-counter-num { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); line-height: 1; }
.dash-counter-lbl { font-size: .58rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-top: 3px; }

/* ── Quote card — gradient fills remaining left-col space ───────────────────── */
.dash-quote-card {
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(200, 160, 150, 0.30);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  box-shadow: none;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dash-quote-card--gradient {
  background: linear-gradient(135deg, #10B981, #059669);
  border: none;
  box-shadow: 0 8px 24px rgba(16,185,129,0.22);
  padding: 22px;
}
.dash-quote-eyebrow {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.75;
  margin-bottom: 10px;
  font-weight: 800;
  color: rgba(255,255,255,0.85);
}
.dash-quote-card--gradient .dash-quote-text {
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: .88rem;
  color: rgba(255,255,255,0.95);
  line-height: 1.6;
  margin: 0;
}
.dash-quote-text {
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: .78rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Dashboard carousel ──────────────────────────────────────────── */
.dash-carousel {
  flex: 1;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: default;
}
.dash-slide {
  position: absolute;
  inset: 0;
  padding: 20px 18px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: opacity 0.5s;
  overflow: hidden;
}
.dash-slide-eyebrow {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.80;
  margin-bottom: 10px;
  font-weight: 800;
  color: rgba(255,255,255,0.85);
  flex-shrink: 0;
}
.dash-slide-quote {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.6;
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  color: rgba(255,255,255,0.95);
}
.dash-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 10;
}
.dash-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.30);
  transition: width 0.3s, background 0.3s;
  cursor: pointer;
}

/* ── Bottom stat pill ───────────────────────────────────────────────────────── */
.dash-stat-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: box-shadow 150ms;
}
.dash-stat-pill:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.dash-stat-pill-icon {
  background: var(--accent-bg);
  padding: 10px;
  border-radius: 12px;
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-stat-pill-label { font-size: 0.6rem; color: var(--text-muted); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.dash-stat-pill-num   { font-size: 1.2rem; font-weight: 900; color: var(--text-dark); }

/* ── Greeting row ───────────────────────────────────────────────────────────── */
.dash-greeting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  padding: 0 4px;
}
.dash-greeting-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-dark);
}
.dash-greeting-sub {
  margin: 3px 0 0;
  color: var(--primary);
  font-size: 0.85rem;
}
.dash-version-chip {
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 800;
  background: var(--accent-bg);
  padding: 7px 18px;
  border-radius: 50px;
  border: 1px solid var(--accent-border);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Center two-col rows ────────────────────────────────────────────────────── */
.dash-center-row {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 14px;
  flex-shrink: 0;
}
.dash-center-row-main { min-width: 0; }
.dash-center-row-side { min-width: 0; }

/* ── Section eyebrow ────────────────────────────────────────────────────────── */
.dash-section-eyebrow {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

/* ── Pipeline health + Fulfillment combined card ──────────────────────────────── */
.dash-pipeline-combined {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 24px;
  background: var(--card-bg);
  border-radius: 18px;
  padding: 22px 26px;
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  transition: box-shadow 150ms;
}
.dash-pipeline-combined:hover { box-shadow: 0 6px 28px rgba(0, 0, 0, 0.10); }

/* ── Left: pipeline section ─────────────────────────────────────────────── */
.dash-pipeline-section {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dash-pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.dash-pipeline-title {
  font-size: .9rem;
  font-weight: 800;
  color: var(--text-dark);
}
.dash-realtime-label {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}
.dash-friction-badge {
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #ef4444;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  padding: 2px 8px;
  border-radius: 99px;
}
.dash-pipeline-rows  { display: flex; flex-direction: column; gap: 0; }
.dash-pipeline-stage { margin-bottom: 14px; }
.dash-pipeline-stage-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.dash-pipeline-lbl   { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); }
.dash-pipeline-bar-wrap { width: 100%; height: 6px; background: rgba(0,0,0,0.06); border-radius: 99px; overflow: hidden; }
.dash-pipeline-bar-fill { height: 100%; border-radius: 99px; transition: width 600ms ease; min-width: 2px; }
.dash-pipeline-count { font-size: .85rem; font-weight: 800; color: var(--text-dark); }

/* ── Right: fulfillment panel ───────────────────────────────────────────────── */
.dash-fulfillment-panel {
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 14px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
}
.dash-metric-status--blue { color: var(--primary); }

/* ── Client pills ───────────────────────────────────────────────────────────── */
.dash-client-pill-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.dash-client-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.40);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 150ms, border-color 150ms, box-shadow 150ms;
}
.dash-client-pill:hover { background: rgba(255,255,255,0.65); border-color: rgba(255,255,255,0.85); box-shadow: 0 2px 12px rgba(0,0,0,0.10); }
.dash-client-pill-name  { font-size: .8rem; font-weight: 600; color: var(--text-dark); }
.dash-client-pill-count {
  font-size: .67rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.06);
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
}

/* ── Right panel metric cards ───────────────────────────────────────────────── */
.dash-metric-eyebrow {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--primary);
  display: block;
  margin-bottom: 5px;
}
.dash-metric-bignum  { font-size: 2rem; font-weight: 900; color: var(--text-dark); line-height: 1; }
.dash-metric-unit    { font-size: .95rem; font-weight: 600; color: var(--text-muted); margin-left: 2px; }
.dash-metric-status  { font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; display: block; }
.dash-metric-status--green  { color: #10b981; }
.dash-metric-status--orange { color: #f59e0b; }
.dash-metric-sub     { font-size: .72rem; color: var(--text-muted); line-height: 1.45; margin-top: 6px; }

/* ── People today card ──────────────────────────────────────────────────────── */
.dash-people-empty { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.dash-people-row   { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; }
.dash-people-icon  { font-size: 1rem; flex-shrink: 0; line-height: 1.4; }
.dash-people-body  { display: flex; flex-direction: column; }
.dash-people-name  { font-size: .8rem; font-weight: 600; color: var(--text-dark); line-height: 1.2; }
.dash-people-evt   { font-size: .68rem; color: var(--text-muted); margin-top: 1px; }

/* ── Dark mode ──────────────────────────────────────────────────────────────── */
html.dark .dash-flat-card {
  background: rgba(30, 41, 59, 0.90);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}
html.dark .dash-client-pill    { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.10); }
html.dark .dash-client-pill:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.22); }
html.dark .dash-counter-cell:hover { background: rgba(255,255,255,0.06); }
html.dark .dash-pipeline-bar-wrap  { background: rgba(255,255,255,0.08); }
html.dark .dash-pipeline-combined  { background: rgba(30,41,59,0.90); border-color: rgba(255,255,255,0.08); }
html.dark .dash-fulfillment-panel  { background: rgba(16,185,129,0.10); border-color: rgba(16,185,129,0.18); }
html.dark .dash-quote-card      { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.20); }
html.dark .dash-stat-pill       { background: rgba(30,41,59,0.90); border-color: rgba(255,255,255,0.08); }
html.dark .dash-stat-pill-icon  { background: rgba(16,185,129,0.15); }
html.dark .dash-version-chip    { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.25); }

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD — Widget Zone
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Zone wrapper ────────────────────────────────────────────────────── */
.dash-widget-zone {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  column-gap: 18px;
  row-gap: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 14px 0 20px;
  overflow-y: auto;
  max-height: 55vh;
}
.dash-widget-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-widget-header .dash-section-eyebrow {
  white-space: nowrap;
  flex-shrink: 0;
  margin-bottom: 0;
}
.dash-widget-header-hint {
  font-size: .7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-widget-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) { .dash-widget-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .dash-widget-grid { grid-template-columns: 1fr; } }

/* ── Empty slot ─────────────────────────────────────────────────────────────── */
.dash-widget-slot--empty {
  min-height: 120px;
  border-radius: var(--radius-md);
  border: 2px dashed rgba(200, 160, 150, 0.40);
  background: rgba(255, 255, 255, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 160ms, background 160ms;
}
.dash-widget-slot--empty:hover {
  border-color: rgba(255, 107, 107, 0.55);
  background: rgba(255, 255, 255, 0.45);
}
.dash-widget-add-btn {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 16px;
}
.dash-widget-add-icon {
  font-size: 1.6rem;
  font-weight: 200;
  color: rgba(200, 160, 150, 0.60);
  line-height: 1;
  transition: color 160ms, transform 160ms;
}
.dash-widget-slot--empty:hover .dash-widget-add-icon {
  color: rgba(255, 107, 107, 0.75);
  transform: scale(1.2) rotate(8deg);
}
.dash-widget-add-lbl {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-muted);
}

/* ── Widget card ────────────────────────────────────────────────────────────── */
.dash-widget-slot { height: 100%; }
.dash-widget-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(200, 160, 150, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(180, 100, 90, 0.08);
  padding: 14px 16px;
}
.dash-widget-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(200, 160, 150, 0.25);
}
.dash-widget-card-icon  { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.dash-widget-card-title { font-size: .73rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dark); flex: 1; }
.dash-widget-remove-btn {
  all: unset;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 99px;
  transition: background 120ms, color 120ms;
}
.dash-widget-remove-btn:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.dash-widget-card-body { flex: 1; display: flex; flex-direction: column; }

/* ── Picker ─────────────────────────────────────────────────────────────────── */
.dash-widget-picker {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 180px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}
.dash-widget-picker-title {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.dash-widget-picker-list { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; max-height: 240px; }
.dash-widget-picker-item {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  transition: background 120ms;
}
.dash-widget-picker-item:hover { background: rgba(16, 185, 129, 0.08); }
.dash-widget-picker-item-icon  { font-size: 1.15rem; flex-shrink: 0; margin-top: 1px; }
.dash-widget-picker-item-label { font-size: .82rem; font-weight: 600; color: var(--text-dark); }
.dash-widget-picker-item-desc  { font-size: .68rem; color: var(--text-muted); margin-top: 1px; line-height: 1.3; }
.dash-widget-picker-cancel     { align-self: flex-start; margin-top: 4px; }
.dash-widget-picker-empty      { font-size: .78rem; color: var(--text-muted); flex: 1; display: flex; align-items: center; }
.dash-widget-loading           { font-size: .78rem; color: var(--text-muted); padding: 8px 0; }
.dash-widget-empty             { font-size: .78rem; color: var(--text-muted); padding: 4px 0; margin: 0; }

/* ── Quick Add Task widget ──────────────────────────────────────────────────── */
.wg-quick-task-form   { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.wg-quick-task-row    { display: flex; gap: 8px; align-items: center; }
.wg-quick-task-row .input--sm { flex: 1; }
.qt-flash             { font-size: .72rem; color: #10b981; min-height: 16px; font-weight: 600; }

/* ── My Tasks / generic list ────────────────────────────────────────────────── */
.wg-task-list  { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.wg-task-item  { display: flex; align-items: flex-start; gap: 8px; }
.wg-task-dot   { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.wg-task-title { font-size: .8rem; color: var(--text-dark); line-height: 1.35; }
.wg-task-link  {
  all: unset;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: auto;
  padding-top: 10px;
  display: block;
}
.wg-task-link:hover { text-decoration: underline; }

/* ── Notepad widget ─────────────────────────────────────────────────────────── */
.wg-notepad-textarea {
  width: 100%;
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .8rem;
  font-family: inherit;
  color: var(--text-dark);
  background: rgba(255, 255, 255, 0.5);
  resize: none;
  min-height: 90px;
  box-sizing: border-box;
  transition: border-color 120ms;
}
.wg-notepad-textarea:focus { outline: none; border-color: var(--primary); }
.wg-notepad-hint           { font-size: .62rem; color: var(--text-muted); margin-top: 5px; text-align: right; }

/* ── Sticky Note widget ─────────────────────────────────────────────────────── */
.dash-widget-slot[data-widget="sticky-note"] .dash-widget-card {
  background: #fefce8;
  border-color: #fde68a;
  box-shadow: 3px 6px 16px rgba(250, 204, 21, 0.18), 0 1px 4px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}
.dash-widget-slot[data-widget="sticky-note"] .dash-widget-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(225deg, #ca8a04 50%, transparent 51%);
  opacity: 0.22;
  pointer-events: none;
}
.dash-widget-slot[data-widget="sticky-note"] .dash-widget-card-header { border-bottom-color: rgba(202, 138, 4, 0.20); }
.dash-widget-slot[data-widget="sticky-note"] .dash-widget-card-title  { color: #78350f; }
.dash-widget-slot[data-widget="sticky-note"] .dash-widget-remove-btn:hover { background: rgba(202, 138, 4, 0.12); color: #92400e; }
.wg-sticky-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
}
.wg-sticky-title {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(202, 138, 4, 0.25);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 700;
  color: #78350f;
  padding: 2px 0 6px;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}
.wg-sticky-title::placeholder { color: rgba(180, 110, 0, 0.35); font-weight: 400; }
.wg-sticky-date {
  font-size: 0.61rem;
  color: #a16207;
  font-weight: 600;
  opacity: 0.75;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.wg-sticky-content {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  resize: none;
  font-size: 0.8rem;
  color: #78350f;
  font-family: inherit;
  line-height: 1.6;
  min-height: 90px;
  outline: none;
  box-sizing: border-box;
}
.wg-sticky-content::placeholder { color: rgba(180, 110, 0, 0.35); }
html.dark .dash-widget-slot[data-widget="sticky-note"] .dash-widget-card {
  background: #2d2408;
  border-color: #78350f;
  box-shadow: 3px 6px 16px rgba(120, 80, 0, 0.22);
}
html.dark .dash-widget-slot[data-widget="sticky-note"] .dash-widget-card-header { border-bottom-color: rgba(202, 138, 4, 0.25); }
html.dark .dash-widget-slot[data-widget="sticky-note"] .dash-widget-card-title  { color: #fde68a; }
html.dark .wg-sticky-title   { color: #fef9c3; border-bottom-color: rgba(253, 230, 138, 0.25); }
html.dark .wg-sticky-content { color: #fef9c3; }
html.dark .wg-sticky-date    { color: #fde68a; }

/* ── Announcements widget ───────────────────────────────────────────────────── */
.wg-ann-list  { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.wg-ann-item  { display: flex; align-items: flex-start; gap: 6px; }
.wg-ann-pin   { flex-shrink: 0; font-size: .85rem; }
.wg-ann-title { font-size: .8rem; color: var(--text-dark); line-height: 1.35; }

/* ── Headcount widget ───────────────────────────────────────────────────────── */
.wg-headcount       { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.wg-headcount-row   { display: flex; align-items: center; gap: 8px; }
.wg-headcount-dot   { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.wg-headcount-lbl   { font-size: .8rem; color: var(--text-muted); flex: 1; }
.wg-headcount-num   { font-size: 1rem; font-weight: 800; color: var(--text-dark); }
.wg-headcount-total { font-size: .68rem; color: var(--text-muted); padding-top: 6px; border-top: 1px solid var(--color-border); }

/* ── New hires / offboarding widgets ───────────────────────────────────────── */
.wg-new-hires     { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.wg-new-hires-num { font-size: 2.4rem; font-weight: 900; color: var(--text-dark); line-height: 1; }
.wg-new-hires-lbl { font-size: .75rem; color: var(--text-muted); margin-bottom: 4px; }
.wg-new-hire-name { font-size: .76rem; color: var(--text-dark); }

/* ── Dark mode ──────────────────────────────────────────────────────────────── */
html.dark .dash-widget-zone { border-top-color: rgba(255, 255, 255, 0.06); }
html.dark .dash-widget-slot--empty {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}
html.dark .dash-widget-slot--empty:hover {
  border-color: rgba(249, 115, 22, 0.3);
  background: rgba(255, 255, 255, 0.06);
}
html.dark .dash-widget-add-icon { color: rgba(255, 255, 255, 0.18); }
html.dark .dash-widget-slot--empty:hover .dash-widget-add-icon { color: rgba(249, 115, 22, 0.5); }
html.dark .dash-widget-card-header  { border-bottom-color: rgba(255, 255, 255, 0.07); }
html.dark .dash-widget-picker       { background: rgba(15, 23, 42, 0.75); border-color: rgba(255, 255, 255, 0.09); }
html.dark .dash-widget-picker-item:hover { background: rgba(16, 185, 129, 0.08); }
html.dark .wg-notepad-textarea      { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); }
html.dark .wg-headcount-total       { border-top-color: rgba(255, 255, 255, 0.07); }

.ep-file-td-actions          { white-space: nowrap; }
.ep-file-empty-row           { text-align: center; padding: 32px 16px !important; color: var(--text-muted); font-size: .875rem; }
.ep-file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: .875rem;
}
.ep-file-link:hover          { text-decoration: underline; }

/* ─────────────────────────────────────────────────────────────────────────────
   Tasks, Announcements, Calendar — shared additions
   ───────────────────────────────────────────────────────────────────────────── */

/* Missing badge variants */
.badge--gray   { background: #f1f5f9; color: #475569; }
.badge--indigo { background: #e0e7ff; color: #4338ca; }
html.dark .badge--gray   { background: #1e293b; color: #94a3b8; }
html.dark .badge--indigo { background: #1e1b4b; color: #818cf8; }

/* ─── Task page ──────────────────────────────────────────────────────────── */
.task-title        { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.task-title--done  { text-decoration: line-through; color: var(--text-muted); font-weight: 400; }
.task-linked       {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  color: var(--primary);
  margin-top: 2px;
  opacity: .8;
}
.task-quick-done   { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }

/* ─── Announcement category badges ──────────────────────────────────────── */
.ann-cat             { font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.ann-cat--payroll    { background: #ede9fe; color: #5b21b6; }
.ann-cat--policy     { background: #d1fae5; color: #065f46; }
.ann-cat--event      { background: #fef9c3; color: #92400e; }
.ann-cat--general    { background: #f1f5f9; color: #475569; }
.ann-cat--urgent     { background: #fee2e2; color: #b91c1c; }
html.dark .ann-cat--payroll { background: #2e1065; color: #c4b5fd; }
html.dark .ann-cat--policy  { background: #052e16; color: #6ee7b7; }
html.dark .ann-cat--event   { background: #1c1001; color: #fcd34d; }
html.dark .ann-cat--general { background: #1e293b; color: #94a3b8; }
html.dark .ann-cat--urgent  { background: #1c0a0a; color: #fca5a5; }

/* ─── Right-panel announcement badge colours (extended) ─────────────────── */
.rp-announce-badge--general { background: rgba(148,163,184,.18); color: var(--text-muted); }
.rp-announce-badge--urgent  { background: #fee2e2; color: #b91c1c; }
.rp-loading { font-size: .8rem; color: var(--text-muted); padding: 6px 0; }

/* ─── Calendar page ──────────────────────────────────────────────────────── */
.cal-page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  padding: 16px 24px 24px;
  min-height: 100%;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .cal-page-layout { grid-template-columns: 1fr; }
}

.cal-page-grid-wrap { padding: 0; }
.cal-page-aside     { padding: 0; overflow-y: auto; }

/* Month navigation */
.cal-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--color-border);
}
.cal-month-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

/* Grid header (day names) */
.cal-page-grid-hdr {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: rgba(255, 240, 240, 0.80);
  padding: 6px 0;
}
.cal-hdr-cell {
  text-align: center;
  font-size: .68rem;
  font-weight: 700;
  color: #C03030;
  text-transform: uppercase;
  letter-spacing: .05em;
}
html.dark .cal-page-grid-hdr { background: rgba(255,107,107,0.08); }
html.dark .cal-hdr-cell       { color: #FF9B9B; }

/* Day cells */
.cal-page-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-page-cell {
  min-height: 74px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 6px 8px 4px;
  cursor: pointer;
  transition: background 100ms ease;
  position: relative;
}
.cal-page-cell:nth-child(7n) { border-right: none; }
.cal-page-cell:hover         { background: rgba(255,107,107,.05); }
.cal-page-cell--empty        { background: transparent; cursor: default; }
.cal-page-cell--today .cal-page-cell-num {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.cal-page-cell--selected { background: rgba(255,107,107,.10); }
.cal-page-cell-num {
  display: inline-block;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 4px;
}
.cal-page-cell-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}
.cal-event-more {
  font-size: .6rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Event dots */
.cal-event-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-event-dot--manual     { background: #FF6B6B; }
.cal-event-dot--holiday    { background: #ef4444; }
.cal-event-dot--hearing    { background: #7c3aed; }
.cal-event-dot--offboarding{ background: #f97316; }
.cal-event-dot--movement   { background: #10b981; }
.cal-event-dot--deadline   { background: #ef4444; }
.cal-event-dot--training   { background: #FF9B9B; }

/* Legend */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 18px;
  border-top: 1px solid var(--color-border);
}
.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  color: var(--text-muted);
}

/* Aside */
.cal-aside-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 14px 16px 8px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.cal-aside-subtitle { font-size: .7rem; font-weight: 400; text-transform: none; letter-spacing: 0; }
.cal-aside-empty    { color: var(--text-muted); font-size: .85rem; padding: 12px 16px; }
.cal-aside-list     { display: flex; flex-direction: column; }
.cal-aside-event {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  transition: background 100ms;
}
.cal-aside-event--link  { cursor: pointer; }
.cal-aside-event--link:hover { background: rgba(255,107,107,.05); }
.cal-aside-dot          { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.cal-aside-event-body   { flex: 1; min-width: 0; }
.cal-aside-event-title  { font-size: .85rem; font-weight: 600; color: var(--text-dark); }
.cal-aside-event-date   { font-size: .75rem; color: var(--primary); margin-top: 1px; }
.cal-aside-event-desc   { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.cal-aside-event-source { font-size: .68rem; color: var(--text-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .04em; }

.ep-file-icon                { font-size: 1rem; flex-shrink: 0; }
.ep-file-filename            { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.ep-file-delete-btn {
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  padding: 4px 8px;
  font-size: .85rem;
  line-height: 1;
  margin-left: 4px;
  transition: background var(--transition), border-color var(--transition);
}
.ep-file-delete-btn:hover    { background: #fee2e2; border-color: var(--color-danger); }

html.dark .ep-file-row:hover td     { background: #0a0f1a; }
html.dark .ep-file-delete-btn:hover { background: #450a0a; border-color: #ef4444; }

/* ─── Employee Portal Account Tab ───────────────────────────────────────── */
.ep-portal-card              { max-width: 680px; }
.ep-portal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ep-portal-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.ep-portal-header > div:nth-child(2) { flex: 1; min-width: 0; }
.ep-portal-header > .badge           { flex-shrink: 0; margin-left: auto; }
.ep-portal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 24px;
}
@media (max-width: 560px) {
  .ep-portal-info-grid { grid-template-columns: 1fr; }
}
.ep-portal-info-item         { display: flex; flex-direction: column; gap: 4px; }
.ep-portal-info-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
}
.ep-portal-info-value        { font-size: .9rem; font-weight: 600; color: var(--text-dark); }
.ep-portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  border-top: 1.5px solid var(--color-border);
}
.ep-portal-danger-btn:hover  { border-color: var(--color-danger) !important; color: var(--color-danger) !important; }
.ep-portal-create-form       { margin-top: 20px; padding-top: 20px; border-top: 1.5px solid var(--color-border); }

html.dark .ep-portal-info-value { color: var(--text-dark); }

/* ─── Employee Movement Styles ──────────────────────────────────────────── */
.mov-detail-header,
.mov-detail-row {
  display: grid;
  grid-template-columns: 160px 1fr 28px 1fr;
  gap: 0 12px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: .875rem;
}
.mov-detail-header { padding-bottom: 4px; border-bottom: 2px solid var(--color-border); }
.mov-detail-row:last-child { border-bottom: none; }
.mov-detail-label  { font-weight: 600; color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; }
.mov-detail-before { color: var(--text-muted); }
.mov-detail-after  { font-weight: 600; color: var(--color-primary); }
.mov-detail-arrow  { text-align: center; color: var(--text-muted); font-size: 1rem; }

.mov-approval-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--bg-muted);
}
.mov-approval-result--approved { background: rgba(34, 197, 94, .08); border: 1.5px solid rgba(34, 197, 94, .3); }
.mov-approval-result--rejected { background: rgba(239, 68, 68, .08); border: 1.5px solid rgba(239, 68, 68, .3); }

.mov-danger-btn:hover { border-color: var(--color-danger) !important; color: var(--color-danger) !important; }

.mov-row:hover td { background: var(--bg-hover); }

/* ─── Employee Payroll Tab ───────────────────────────────────────────────── */
.ep-payroll-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 700px) {
  .ep-payroll-grid            { grid-template-columns: 1fr; }
}
.ep-payroll-subsection       { display: flex; flex-direction: column; gap: 14px; }
.ep-payroll-sub-title {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

/* ─── Benefits blocks ────────────────────────────────────────────────────── */
.ep-benefits-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: var(--bg-mint);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-bottom: 16px;
}
.ep-benefits-block:last-child { margin-bottom: 0; }
.ep-benefits-block-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}
.ep-benefits-empty {
  font-size: .875rem;
  color: var(--text-muted);
  padding: 12px 0;
}

/* Other policy rows */
.ep-policy-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}
.ep-policy-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ep-policy-row-num {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

html.dark .ep-benefits-block  { background: #0f172a; border-color: #334155; }
html.dark .ep-policy-row      { background: #1e293b; border-color: #334155; }

/* Payslips placeholder */
.ep-payslips-placeholder {
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-mint);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.ep-payslips-placeholder-icon  { font-size: 2.5rem; margin-bottom: 8px; }
.ep-payslips-placeholder-title { font-size: 1rem; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.ep-payslips-placeholder-sub   { font-size: .85rem; color: var(--text-muted); max-width: 400px; margin: 0 auto; }

/* Payslips table */
.ep-payslips-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.ep-payslips-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}
.ep-payslips-table td          { padding: 12px 14px; border-bottom: 1px solid var(--color-border); color: var(--text-muted); }
.ep-payslips-table tr:last-child td { border-bottom: none; }
.ep-payslips-empty-row         { text-align: center; font-size: .875rem; padding: 32px 14px !important; color: var(--text-muted); }

/* ─── Glass Components ─────────────────────────────────────────────────────── */
.glass-input,
.glass-select {
  background: rgba(255, 255, 255, 0.60);
  border: 1px solid rgba(200, 160, 150, 0.30);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0 14px;
  height: 40px;
  color: #1A1A1A;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .875rem;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.glass-input:focus,
.glass-select:focus {
  border-color: rgba(255, 107, 107, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.10);
  outline: none;
}
.glass-input::placeholder {
  color: #C0A09A;
}
html.dark .glass-input,
html.dark .glass-select {
  background: rgba(40, 40, 40, 0.60);
  border-color: rgba(255, 255, 255, 0.08);
  color: #F5F0EF;
}

.glass-card {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(200, 160, 150, 0.35);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
html.dark .glass-card {
  background: rgba(40, 40, 40, 0.60);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ─── Canvas / Blob Decorations ────────────────────────────────────────────── */
.canvas {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
html.dark .canvas {
  background: var(--bg);
}

.blob-1 {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: var(--blob-primary);
  top: -100px;
  right: -80px;
  pointer-events: none;
}

.blob-2 {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--blob-secondary);
  bottom: 40px;
  left: 30px;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   TOPBAR ICON BUTTONS
   ══════════════════════════════════════════════════════════════════════════ */
.topbar-icon-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  cursor: pointer;
  color: #E2E8F0;
  transition: background var(--transition), box-shadow var(--transition), color var(--transition);
  flex-shrink: 0;
}
.topbar-icon-btn:hover {
  background: rgba(255,255,255,0.20);
  color: #C4B5FD;
  box-shadow: 0 2px 10px rgba(0,0,0,0.20);
}

/* ══════════════════════════════════════════════════════════════════════════
   TOPBAR SEPARATOR
   ══════════════════════════════════════════════════════════════════════════ */
.topbar-sep {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.20);
  flex-shrink: 0;
  align-self: center;
}

/* ══════════════════════════════════════════════════════════════════════════
   MAIN BODY + RIGHT PANEL
   ══════════════════════════════════════════════════════════════════════════ */
.main-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}
.main-body > .content-area {
  flex: 1;
  min-width: 0;
}
.right-panel {
  width: 0;
  flex-shrink: 0;
  overflow: hidden;
  border-left: 0px solid rgba(186,213,254,0.45);
  transition: width 0.25s ease, border-left-width 0.25s ease;
}
.right-panel--open {
  width: 290px;
  border-left-width: 1px;
}
.rp-inner {
  width: 290px;
  height: 100%;
  position: relative;
  overflow-y: auto;
  padding: 16px 16px 40px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,107,107,0.2) transparent;
}
.rp-inner::-webkit-scrollbar       { width: 4px; }
.rp-inner::-webkit-scrollbar-track { background: transparent; }
.rp-inner::-webkit-scrollbar-thumb { background: rgba(255,107,107,0.2); border-radius: 2px; }

/* ─── Right panel sections ────────────────────────────────────────────────── */
.rp-section {
  margin-bottom: 20px;
}
.rp-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(186,213,254,0.4);
  padding-bottom: 7px;
  margin-bottom: 10px;
}

/* ─── Mini calendar ───────────────────────────────────────────────────────── */
.cal-month-hdr {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  text-align: center;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.cal-day-hdr {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 2px 0 4px;
}
.cal-cell {
  font-size: 0.72rem;
  color: var(--text-dark);
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  position: relative;
  cursor: default;
}
.cal-cell--empty { visibility: hidden; }
.cal-cell--today {
  background: #FF6B6B;
  color: #fff;
  font-weight: 800;
}
.cal-cell--holiday::after {
  content: '';
  position: absolute;
  bottom: 1px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #f59e0b;
}
.cal-cell--today.cal-cell--holiday::after { background: #fff; }

/* helix-only: a payroll cutoff marker, top-right so it never collides with
   the holiday dot's bottom-center position even on a day that's both. */
.cal-cell--cutoff::before {
  content: '';
  position: absolute;
  top: 1px; right: 1px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--primary);
}
.cal-cell--today.cal-cell--cutoff::before { background: #fff; }

/* ─── Upcoming payroll list — helix-only ─────────────────────────────────── */
.rp-cutoff-list { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.rp-cutoff { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; }
.rp-cutoff-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.rp-cutoff-name { flex: 1; color: var(--text-dark); font-weight: 500; }
.rp-cutoff-date { color: var(--text-muted); font-size: 0.68rem; white-space: nowrap; }

/* ─── Upcoming holidays list ─────────────────────────────────────────────── */
.rp-holidays-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rp-holiday {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
}
.rp-holiday-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
}
.rp-holiday-name { flex: 1; color: var(--text-dark); font-weight: 500; }
.rp-holiday-date { color: var(--text-muted); font-size: 0.68rem; white-space: nowrap; }

/* ─── Announcements ──────────────────────────────────────────────────────── */
.rp-announcement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(200, 148, 142, 0.28);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 0.75rem;
}
.rp-announce-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 99px;
  padding: 2px 7px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}
.rp-announce-badge--payroll { background: rgba(99,102,241,0.12); color: #6366f1; }
.rp-announce-badge--policy  { background: rgba(16,185,129,0.12); color: #10b981; }
.rp-announce-badge--event   { background: rgba(245,158,11,0.12); color: #d97706; }
.rp-announce-text { color: var(--text-dark); line-height: 1.4; }

/* ─── Tasks ──────────────────────────────────────────────────────────────── */
.rp-task {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(255,107,107,0.15);
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-dark);
  line-height: 1.4;
}
.rp-task:last-child { border-bottom: none; }
.rp-task-cb { margin-top: 2px; cursor: pointer; accent-color: #FF6B6B; flex-shrink: 0; }
.rp-task:has(.rp-task-cb:checked) span { text-decoration: line-through; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════════════
   SETTINGS PAGE
   ══════════════════════════════════════════════════════════════════════════ */
.settings-page {
  max-width: 860px;
  margin: 0 auto;
}
.settings-profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px !important;
  margin-bottom: 24px;
}
.settings-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.settings-profile-name  { font-size: 1.15rem; font-weight: 700; color: var(--text-dark); }
.settings-profile-email { font-size: 0.82rem; color: var(--text-muted); margin: 2px 0 8px; }
.settings-role-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  border-radius: 99px;
  padding: 3px 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.settings-card {
  padding: 20px 22px !important;
}
.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.settings-card-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}
.settings-card-title { font-weight: 700; color: var(--text-dark); font-size: 0.9rem; }
.settings-card-sub   { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.settings-coming-soon {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  text-align: center;
  border: 1px dashed rgba(255,107,107,0.3);
}

/* ── Client Pipeline page ───────────────────────────────────────────────────── */
.cp-stage-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 10px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--stage-color, #94a3b8) 12%, transparent);
  color: var(--stage-color, #64748b);
  border: 1px solid color-mix(in srgb, var(--stage-color, #94a3b8) 25%, transparent);
}

/* ─── Notification Bell & Panel ───────────────────────────────────────────── */
.notif-wrapper {
  position: relative;
}

#btn-notif-bell {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 16px;
  border-radius: 8px;
  text-align: center;
  pointer-events: none;
  border: 1.5px solid transparent;
}

.notif-panel {
  position: fixed;
  top: 56px;    /* overridden by JS at open time */
  right: 16px;  /* overridden by JS at open time */
  width: 320px;
  max-height: 480px;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.16);
  z-index: 1200;
  display: none;            /* hidden by default; :not([hidden]) overrides */
  flex-direction: column;
  overflow: hidden;
}
.notif-panel:not([hidden]) { display: flex; }

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  flex-shrink: 0;
}

.notif-panel-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-dark, #111827);
}

.notif-mark-all {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .72rem;
  color: #10b981;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background .15s;
}
.notif-mark-all:hover { background: rgba(16,185,129,.1); }

.notif-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  flex: 1;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .12s;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(0,0,0,.03); }
.notif-item--unread { background: rgba(16,185,129,.05); }
.notif-item--unread:hover { background: rgba(16,185,129,.10); }

.notif-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
}

.notif-body { flex: 1; min-width: 0; }

.notif-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-dark, #111827);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-text {
  font-size: .75rem;
  color: var(--text-muted);
  margin: 2px 0 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-type-badge {
  padding: 1px 6px;
  background: color-mix(in srgb, var(--nb-color, #94a3b8) 15%, transparent);
  color: var(--nb-color, #94a3b8);
  font-size: .65rem;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 6px;
}

.notif-time {
  font-size: .68rem;
  color: var(--text-muted);
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
}

/* Dark mode */
html.dark .notif-panel           { background: #1e293b; border-color: #334155; }
html.dark .notif-panel-header    { border-color: #334155; }
html.dark .notif-panel-title     { color: #f1f5f9; }
html.dark .notif-item            { border-color: rgba(255,255,255,.06); }
html.dark .notif-item:hover      { background: rgba(255,255,255,.05); }
html.dark .notif-item--unread    { background: rgba(16,185,129,.08); }
html.dark .notif-title           { color: #f1f5f9; }
html.dark .notif-text            { color: #94a3b8; }

/* Bell panel footer */
.notif-panel-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border, #e2e8f0);
  padding: 10px 16px;
  text-align: center;
}
.notif-view-all {
  font-size: .75rem;
  font-weight: 600;
  color: #10b981;
  text-decoration: none;
  cursor: pointer;
}
.notif-view-all:hover { text-decoration: underline; }
html.dark .notif-panel-footer  { border-color: #334155; }
html.dark .notif-view-all      { color: #34d399; }

/* ─── Notifications Full Page ────────────────────────────────────────────────── */
.notif-page-tabs {
  display: flex;
  gap: 4px;
  padding: 0 0 4px;
  border-bottom: 2px solid var(--border, #e2e8f0);
  margin-bottom: 0;
}
.notif-page-tab {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 18px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  border-radius: 4px 4px 0 0;
  transition: color .15s, border-color .15s;
}
.notif-page-tab:hover { color: var(--text-dark, #111827); }
.notif-page-tab--active {
  color: #10b981;
  border-bottom-color: #10b981;
  font-weight: 700;
}
html.dark .notif-page-tab         { color: #94a3b8; }
html.dark .notif-page-tab:hover   { color: #f1f5f9; }
html.dark .notif-page-tab--active { color: #34d399; border-bottom-color: #34d399; }

.notif-page-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.notif-page-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-surface, #fff);
  border-bottom: 1px solid var(--border, #e2e8f0);
  cursor: pointer;
  transition: background .12s;
}
.notif-page-item:first-child { border-top: 1px solid var(--border, #e2e8f0); }
.notif-page-item:hover { background: rgba(0,0,0,.025); }
.notif-page-item--unread { background: rgba(16,185,129,.04); }
.notif-page-item--unread:hover { background: rgba(16,185,129,.08); }

.notif-page-item-body {
  flex: 1;
  min-width: 0;
}
.notif-page-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.notif-page-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

html.dark .notif-page-item         { background: #1e293b; border-color: #334155; }
html.dark .notif-page-item:hover   { background: rgba(255,255,255,.04); }
html.dark .notif-page-item--unread { background: rgba(16,185,129,.07); }
html.dark .notif-page-item--unread:hover { background: rgba(16,185,129,.12); }

/* ─── Reports Page ─────────────────────────────────────────────────────────────── */
/* Make content-area a flex column when reports page is active (same as page-layout) */
.content-area:has(.rpt-page) {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.rpt-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Sticky header — never scrolls */
.rpt-sticky-header {
  flex-shrink: 0;
  padding: 20px 32px 0;
  background: var(--bg);
  border-bottom: 1px solid rgba(186,213,254,0.4);
}
html.dark .rpt-sticky-header {
  background: #0F172A;
  border-bottom-color: rgba(255,255,255,0.06);
}

/* Scrolling body — takes all remaining height */
.rpt-scroll-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 24px 32px 40px;
  scrollbar-width: thin;
  scrollbar-color: rgba(16,185,129,0.35) transparent;
}
.rpt-scroll-body::-webkit-scrollbar       { width: 6px; }
.rpt-scroll-body::-webkit-scrollbar-track { background: transparent; }
.rpt-scroll-body::-webkit-scrollbar-thumb { background: rgba(16,185,129,0.35); border-radius: 3px; }

.rpt-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.rpt-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.25rem; font-weight: 700; color: var(--text-dark); margin: 0;
}
.rpt-generated { font-size: .78rem; color: var(--text-muted); }

/* Date range filter row */
.rpt-range-row {
  display: flex; align-items: flex-end; gap: 12px; padding: 10px 0 14px; flex-wrap: wrap;
}
.rpt-range-inputs { display: flex; align-items: flex-end; gap: 8px; }
.rpt-range-group  { display: flex; flex-direction: column; gap: 3px; }
.rpt-range-label  {
  font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
}
.rpt-date-input {
  height: 32px; padding: 0 10px; font-size: .82rem;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-dark);
  font-family: inherit; cursor: pointer;
}
.rpt-date-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,185,129,.15); }
html.dark .rpt-date-input { background: #1e293b; border-color: #334155; }
.rpt-range-sep { font-size: .9rem; color: var(--text-muted); padding-bottom: 6px; }
.rpt-presets   { display: flex; gap: 4px; flex-wrap: wrap; }
.rpt-preset {
  background: var(--bg-card); border: 1px solid var(--color-border);
  border-radius: 6px; padding: 5px 12px; font-size: .78rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.rpt-preset:hover { background: var(--bg-surface); color: var(--text-dark); }
.rpt-preset--active { background: var(--primary); color: #fff; border-color: var(--primary); }
html.dark .rpt-preset { background: #1e293b; border-color: #334155; }
html.dark .rpt-preset:hover { background: #263346; }
html.dark .rpt-preset--active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Tab bar — matches ep-tab-bar/ep-tab pattern, sits inside sticky header */
.rpt-tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--color-border);
}
.rpt-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 20px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.rpt-tab:hover     { color: var(--text-dark); }
.rpt-tab--active   { color: var(--primary); border-bottom-color: var(--primary); }

/* Panels */
.rpt-panel { padding: 4px 0; }

/* KPI row */
.rpt-kpi-row {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; max-width: 1100px;
}
.rpt-kpi-card {
  background: var(--bg-card); border: 1px solid var(--color-border);
  border-radius: 10px; padding: 16px 20px; flex: 1; min-width: 130px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.rpt-kpi-value {
  font-size: 1.9rem; font-weight: 800; line-height: 1;
  margin-bottom: 4px; letter-spacing: -.03em;
}
.rpt-kpi-label { font-size: .78rem; font-weight: 500; color: var(--text-muted); }
.rpt-kpi-sub   { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

/* Sections */
.rpt-section { margin-bottom: 16px; max-width: 1100px; }
.rpt-section-title {
  font-size: .9rem; font-weight: 700; color: var(--text-dark);
  margin: 0 0 12px; display: flex; align-items: center; gap: 8px;
}
.rpt-section-sub { font-size: .78rem; color: var(--text-muted); margin: -6px 0 12px; }
.rpt-section-badge {
  font-size: .7rem; font-weight: 400; color: var(--text-muted);
  background: var(--bg-surface); border-radius: 999px; padding: 2px 8px;
  border: 1px solid var(--color-border);
}
.rpt-empty { color: var(--text-muted); font-size: .875rem; margin: 8px 0; }

/* 2-column grid */
.rpt-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; max-width: 1100px;
}
@media (max-width: 700px) { .rpt-grid-2 { grid-template-columns: 1fr; } }

/* Horizontal bars */
.rpt-hbar-list { display: flex; flex-direction: column; gap: 10px; }
.rpt-hbar-row  { display: flex; align-items: center; gap: 10px; min-height: 26px; }
.rpt-hbar-label {
  font-size: .8rem; color: var(--text-dark); min-width: 160px; max-width: 200px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0;
}
.rpt-hbar-track {
  flex: 1; height: 10px; background: var(--bg-surface);
  border-radius: 999px; overflow: hidden;
}
.rpt-hbar-fill {
  height: 100%; border-radius: 999px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.rpt-hbar-val {
  font-size: .8rem; font-weight: 600; color: var(--text-dark);
  min-width: 28px; text-align: right; flex-shrink: 0;
}

/* SVG Donut + legend */
.rpt-donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rpt-legend      { display: flex; flex-direction: column; gap: 8px; }
.rpt-legend-item { display: flex; align-items: center; gap: 8px; }
.rpt-legend-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.rpt-legend-label { font-size: .8rem; color: var(--text-dark); flex: 1; }
.rpt-legend-val  { font-size: .8rem; font-weight: 600; color: var(--text-dark); }

/* Funnel */
.rpt-funnel       { display: flex; flex-direction: column; gap: 8px; }
.rpt-funnel-row   { display: flex; align-items: center; gap: 12px; }
.rpt-funnel-label {
  font-size: .8rem; color: var(--text-dark); min-width: 160px; flex-shrink: 0;
}
.rpt-funnel-bar-wrap { flex: 1; height: 28px; background: var(--bg-surface); border-radius: 6px; overflow: hidden; }
.rpt-funnel-bar {
  height: 100%; border-radius: 6px; display: flex; align-items: center;
  padding: 0 10px; min-width: 36px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.rpt-funnel-val  { font-size: .8rem; font-weight: 700; color: #fff; }
.rpt-funnel-rate { font-size: .73rem; color: var(--text-muted); flex-shrink: 0; white-space: nowrap; }

/* Period filter */
.rpt-period-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.rpt-period-label { font-size: .8rem; font-weight: 500; color: var(--text-muted); }
.rpt-period-filter { display: flex; gap: 4px; flex-wrap: wrap; }
.rpt-period-btn {
  background: var(--bg-card); border: 1px solid var(--color-border);
  border-radius: 6px; padding: 5px 12px; font-size: .78rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: all .15s;
}
.rpt-period-btn:hover { background: var(--bg-surface); color: var(--text-dark); }
.rpt-period-btn--active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* Table */
.rpt-table-wrap { overflow-x: auto; }
.rpt-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.rpt-table th {
  text-align: left; padding: 8px 10px; font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}
.rpt-table td {
  padding: 9px 10px; border-bottom: 1px solid var(--color-border);
  color: var(--text-dark); vertical-align: middle;
}
.rpt-table tbody tr:hover { background: var(--bg-surface); }
.rpt-table tbody tr:last-child td { border-bottom: none; }

/* DOLE / NLRC note cards */
.rpt-note-card  { text-align: center; padding: 24px 20px !important; }
.rpt-note-icon  {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--bg-surface); margin: 0 auto 10px;
  color: var(--text-muted);
}
.rpt-note-value { font-size: 2.5rem; font-weight: 800; color: var(--text-muted); margin: 4px 0 8px; }
.rpt-note-text  { font-size: .78rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* Dark mode */
html.dark .rpt-kpi-card    { background: var(--bg-surface); border-color: var(--color-border); }
html.dark .rpt-tab-bar     { border-bottom-color: #1f2937; }
html.dark .rpt-tab:hover   { color: var(--text-dark); }
html.dark .rpt-tab--active { color: var(--primary); border-bottom-color: var(--primary); }
html.dark .rpt-period-btn  { background: #1e293b; border-color: #334155; }
html.dark .rpt-table th    { border-color: #334155; }
html.dark .rpt-table td    { border-color: #1f2937; }
html.dark .rpt-table tbody tr:hover { background: rgba(255,255,255,.04); }
.fs-bar {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2100;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1.5px solid var(--accent-border);
  border-radius: 999px;
  padding: 9px 14px 9px 22px;
  box-shadow: 0 6px 32px rgba(0,0,0,.14), 0 1px 4px rgba(0,0,0,.06);
  transition: bottom .28s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}
.fs-bar.fs-bar--visible {
  bottom: 28px;
  pointer-events: auto;
  opacity: 1;
}
.fs-label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .01em;
}
.fs-label::before {
  content: '✏\FE0E\2002';
  opacity: .55;
}
.fs-autosave {
  font-size: .78rem;
}
.fs-btn {
  border-radius: 999px !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
}

/* Dark mode */
html.dark .fs-bar {
  background: #1e293b;
  border-color: rgba(16,185,129,.3);
  box-shadow: 0 6px 32px rgba(0,0,0,.4);
}
html.dark .fs-label { color: #94a3b8; }

/* ─── Tooltip ────────────────────────────────────────────────────────────────
   Usage: <span class="field-tip" data-tip="Your explanation here">ⓘ</span>
   Place after a label text. Tooltip appears above on hover/focus.
   ────────────────────────────────────────────────────────────────────────── */
.field-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--text-muted);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  cursor: default;
  position: relative;
  margin-left: 5px;
  vertical-align: middle;
  flex-shrink: 0;
  transition: border-color .15s, color .15s;
  user-select: none;
}
.field-tip:hover,
.field-tip:focus {
  border-color: var(--primary-teal, #10b981);
  color: var(--primary-teal, #10b981);
  outline: none;
}
.field-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.45;
  padding: 7px 10px;
  border-radius: 6px;
  white-space: pre-wrap;
  width: max-content;
  max-width: 240px;
  box-shadow: 0 4px 16px rgba(0,0,0,.22);
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 3000;
  text-transform: none;
  letter-spacing: 0;
}
/* arrow */
.field-tip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 3000;
}
.field-tip:hover::after,
.field-tip:focus::after,
.field-tip:hover::before,
.field-tip:focus::before { opacity: 1; }

/* flip to bottom when near top of viewport — add class .field-tip--below */
.field-tip--below::after {
  bottom: auto;
  top: calc(100% + 7px);
}
.field-tip--below::before {
  bottom: auto;
  top: calc(100% + 2px);
  border-top-color: transparent;
  border-bottom-color: #1e293b;
}

html.dark .field-tip::after { background: #0f172a; box-shadow: 0 4px 16px rgba(0,0,0,.45); }
html.dark .field-tip::before { border-top-color: #0f172a; }
html.dark .field-tip--below::before { border-bottom-color: #0f172a; border-top-color: transparent; }


/* ─── Splash + login extras carried over from helix's own stylesheet ────────
   Orbit's template has no splash screen; helix shows one before auth
   resolves, and index.html still references these. Kept verbatim rather
   than reinvented, so the pre-auth screens look exactly as they did. */
.btn--ghost-light { background: #f1f5f9; color: var(--text); }

#splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; background: #eef6ff;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#splash.splash--hidden { opacity: 0; visibility: hidden; pointer-events: none; }

#splash-wordmark { font-weight: 800; letter-spacing: 0.08em; color: var(--text); }

#splash-bar { width: 120px; height: 4px; border-radius: 99px; background: rgba(37, 99, 235, 0.2); overflow: hidden; }

#splash-bar::after {
  content: ''; display: block; width: 40%; height: 100%; border-radius: 99px;
  background: var(--primary); animation: splash-slide 1.1s ease-in-out infinite;
}

@keyframes splash-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ─── Helix additions ───────────────────────────────────────────────────────
   Five utility classes the payroll pages lean on. Orbit's own pages use
   cell-sub, card-title and muted too but style them inline; defining them once
   here keeps the payroll markup readable without changing anything orbit
   renders. Everything else on these pages uses orbit's existing vocabulary. */

.cell-strong { font-weight: 600; color: var(--text-primary); }
.cell-sub    { display: block; font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.card-title  { font-size: .95rem; font-weight: 600; margin: 0; color: var(--text-primary); }
.muted       { color: var(--text-muted); }
.topbar-title{ font-size: 1rem; font-weight: 600; margin: 0; color: rgba(255,255,255,.92); letter-spacing: -.01em; text-shadow: 0 1px 3px rgba(0,0,0,.3); }

/* Helix-only: topbar-left brand mark — a text wordmark since no white "Helix"
   logo asset exists anywhere in the monorepo (unlike orbit's orbitwhite.png). */
.topbar-wordmark {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
  padding-right: 12px;
  margin-right: 4px;
  border-right: 1px solid rgba(255,255,255,.25);
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
