/* ==================================================================
   Dawn of Bioinformatics Ltd. — Team Hub
   Design system — shared with the Client Portal for a consistent
   internal-tools family. Base tokens/components copied verbatim from
   F:\DOB Client Website\static\css\style.css; Team-Hub-only additions
   are appended at the bottom, clearly marked.
   ================================================================== */

:root {
  --navy-950: #0a1a2c;
  --navy-900: #0f2540;
  --navy-800: #16324f;
  --navy-700: #1f4266;
  --navy-100: #eaf0f6;

  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-50: #ecfdf9;

  --amber-500: #f59e0b;
  --amber-50: #fffbeb;

  --red-500: #e11d48;
  --red-50: #fef2f2;

  --blue-500: #2563eb;
  --blue-50: #eff6ff;

  --ink-900: #101828;
  --ink-700: #344054;
  --ink-500: #667085;
  --ink-400: #98a2b3;
  --ink-200: #e4e7ec;
  --ink-100: #f2f4f7;
  --ink-50: #f9fafb;
  --white: #ffffff;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);

  --sidebar-w: 264px;
  --topbar-h: 68px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink-900);
  background: var(--ink-50);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }

/* ---------------- App shell layout ---------------- */
.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 60%);
  color: var(--navy-100);
  display: flex; flex-direction: column;
  z-index: 40;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: white; flex: none;
}
.brand-text { line-height: 1.2; }
.brand-text .name { font-size: 13.5px; font-weight: 700; color: white; }
.brand-text .sub { font-size: 11px; color: var(--ink-400); }

.sidebar-nav { padding: 14px 12px; overflow-y: auto; flex: 1; }
.nav-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--ink-400); text-transform: uppercase;
  padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; margin: 2px 0;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500;
  color: #c8d5e3;
  transition: background 0.15s, color 0.15s;
}
.nav-item .icon { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: white; }
.nav-item.active {
  background: rgba(20, 184, 166, 0.16);
  color: white;
  box-shadow: inset 3px 0 0 var(--teal-500);
}
.nav-divisions { padding: 4px 10px 10px; }
.division-group { margin-bottom: 2px; }
.division-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 8px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 600; color: #d6e2ee;
  cursor: pointer;
}
.division-head:hover { background: rgba(255,255,255,0.06); }
.division-head .chev { transition: transform 0.15s; font-size: 10px; color: var(--ink-400); }
.division-group.open .chev { transform: rotate(90deg); }
.division-depts {
  display: none;
  padding: 2px 0 6px 22px;
}
.division-group.open .division-depts { display: block; }
.dept-link {
  display: block; padding: 6px 8px; font-size: 12px;
  color: var(--ink-400); border-radius: var(--radius-sm);
}
.dept-link:hover { color: white; background: rgba(255,255,255,0.05); }

.sidebar-foot {
  padding: 14px; border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px; color: var(--ink-400);
}

/* ---------------- Topbar ---------------- */
.topbar {
  position: fixed; top: 0; right: 0; left: var(--sidebar-w); height: var(--topbar-h);
  background: white; border-bottom: 1px solid var(--ink-200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; z-index: 30;
}
.topbar-title { font-size: 18px; font-weight: 700; color: var(--ink-900); }
.topbar-sub { font-size: 12.5px; color: var(--ink-500); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.role-switcher {
  display: flex; align-items: center; gap: 8px;
  background: var(--ink-100); border: 1px solid var(--ink-200);
  border-radius: 999px; padding: 5px 6px 5px 12px;
}
.role-switcher label { font-size: 11px; color: var(--ink-500); font-weight: 600; }
.role-switcher select {
  border: none; background: white; border-radius: 999px;
  padding: 5px 10px; font-size: 12.5px; font-weight: 600; color: var(--navy-800);
  box-shadow: var(--shadow-sm);
}

.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex: none;
}
.user-meta { line-height: 1.25; }
.user-meta .uname { font-size: 13px; font-weight: 650; color: var(--ink-900); }
.user-meta .urole { font-size: 11.5px; color: var(--ink-500); }

/* ---------------- Main content ---------------- */
.main {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  min-height: 100vh;
}
.page { padding: 26px 28px 60px; max-width: 1360px; }

.badge-scope {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal-50); color: var(--teal-600);
  border: 1px solid rgba(13,148,136,0.25);
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650;
}

/* ---------------- KPI cards ---------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0 24px; }
.kpi-card {
  background: white; border: 1px solid var(--ink-200); border-radius: var(--radius-lg);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 12.5px; color: var(--ink-500); font-weight: 600; }
.kpi-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.kpi-value { font-size: 25px; font-weight: 750; margin-top: 10px; color: var(--ink-900); }
.kpi-delta { font-size: 12px; font-weight: 650; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.kpi-delta.up { color: var(--teal-600); }
.kpi-delta.down { color: var(--red-500); }
.kpi-delta.warn { color: var(--amber-500); }

/* ---------------- Cards / panels ---------------- */
.panel {
  background: white; border: 1px solid var(--ink-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--ink-100);
}
.panel-head h3 { font-size: 15px; }
.panel-head .hint { font-size: 12px; color: var(--ink-500); margin-top: 2px; font-weight: 400; }
.panel-body { padding: 18px 20px; }
.panel-grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 650; border: 1px solid transparent;
  transition: transform 0.05s, filter 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-900); color: white; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-accent { background: var(--teal-600); color: white; }
.btn-accent:hover { filter: brightness(1.08); }
.btn-ghost { background: white; color: var(--ink-700); border-color: var(--ink-200); }
.btn-ghost:hover { background: var(--ink-100); }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }

/* ---------------- Filter bar ---------------- */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--ink-100);
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; font-weight: 650; color: var(--ink-500); }
.input, select.input, textarea.input {
  border: 1px solid var(--ink-200); border-radius: var(--radius-sm);
  padding: 8px 11px; font-size: 13px; color: var(--ink-900);
  background: white; min-width: 150px;
}
.input:focus, select.input:focus, textarea.input:focus {
  outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-50);
}
.search-input { position: relative; }
.search-input input { padding-left: 32px; min-width: 220px; }
.search-input::before {
  content: "⌕"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--ink-400); font-size: 15px;
}

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--ink-500);
  padding: 8px 10px; border-bottom: 1px solid var(--ink-200);
  background: var(--ink-50); white-space: nowrap;
}
.data-table tbody td {
  padding: 9px 10px; border-bottom: 1px solid var(--ink-100);
  color: var(--ink-700); white-space: nowrap;
}
.data-table tbody tr:hover { background: var(--ink-50); }
.data-table .cell-strong { color: var(--ink-900); font-weight: 600; }
.data-table .cell-sub { font-size: 11.5px; color: var(--ink-500); }

/* ---------------- Badges / pills ---------------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 650;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; }
.pill-success { background: var(--teal-50); color: var(--teal-600); }
.pill-success .pill-dot { background: var(--teal-600); }
.pill-pending { background: var(--amber-50); color: #b45309; }
.pill-pending .pill-dot { background: var(--amber-500); }
.pill-danger { background: var(--red-50); color: var(--red-500); }
.pill-danger .pill-dot { background: var(--red-500); }
.pill-info { background: var(--blue-50); color: var(--blue-500); }
.pill-info .pill-dot { background: var(--blue-500); }
.pill-neutral { background: var(--ink-100); color: var(--ink-700); }

/* ---------------- Alerts ---------------- */
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--ink-200); background: var(--ink-50);
}
.alert-item.warn { background: var(--amber-50); border-color: rgba(245,158,11,0.3); }
.alert-item.danger { background: var(--red-50); border-color: rgba(225,29,72,0.25); }
a.alert-item { display: flex; }
a.alert-item:hover { filter: brightness(0.98); }
.alert-item .adot {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  background: white; border: 1px solid var(--ink-200);
}
.alert-item strong { font-size: 13px; color: var(--ink-900); }
.alert-item p { margin: 2px 0 0; font-size: 12px; color: var(--ink-500); }

/* ---------------- Modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white; border-radius: var(--radius-lg); width: 100%; max-width: 560px;
  box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--ink-100);
}
.modal-head h3 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--ink-400); line-height: 1; }
.modal-body { padding: 20px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-body .full { grid-column: 1 / -1; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 22px; border-top: 1px solid var(--ink-100);
}

/* ---------------- Login page ---------------- */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--ink-50);
}
.login-brand {
  background:
    radial-gradient(circle at 20% 20%, rgba(20,184,166,0.25), transparent 45%),
    linear-gradient(160deg, var(--navy-950), var(--navy-900) 70%);
  color: white; display: flex; flex-direction: column; justify-content: space-between;
  padding: 52px;
}
.login-brand .taglines { max-width: 420px; }
.login-brand h1 { font-size: 30px; line-height: 1.25; margin-bottom: 14px; }
.login-brand p { color: #b9c8d8; font-size: 14.5px; line-height: 1.6; }
.login-stats { display: flex; gap: 28px; margin-top: 30px; }
.login-stats div strong { display: block; font-size: 20px; }
.login-stats div span { font-size: 11.5px; color: #93a5b8; }
.login-form-col { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 22px; margin-bottom: 6px; }
.login-card .lead { font-size: 13.5px; color: var(--ink-500); margin-bottom: 26px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-700); margin-bottom: 6px; }
.login-field .input { width: 100%; padding: 10px 12px; }
.login-submit { width: 100%; justify-content: center; padding: 11px; font-size: 13.5px; margin-top: 6px; }
.divider-line { display: flex; align-items: center; gap: 10px; margin: 22px 0; color: var(--ink-400); font-size: 11.5px; }
.divider-line::before, .divider-line::after { content: ""; flex: 1; height: 1px; background: var(--ink-200); }

/* ---------------- Empty / scope-restricted note ---------------- */
.scope-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-500); padding: 10px 20px;
  background: var(--blue-50); border-bottom: 1px solid var(--ink-100);
}

.hidden { display: none !important; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid-2 { grid-template-columns: 1fr; }
  .modal-body { grid-template-columns: 1fr; }
}


/* ==================================================================
   TEAM HUB ADDITIONS — not present in the Client Portal.
   Same token vocabulary throughout (navy/teal/ink/radius/shadow) so
   nothing here introduces a new visual language, only new components.
   ================================================================== */

/* ---------------- Tab bar (employee profile) ---------------- */
.tab-bar {
  display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--ink-100);
}
.tab-item {
  padding: 13px 4px; margin-bottom: -1px;
  font-size: 13px; font-weight: 650; color: var(--ink-500);
  border-bottom: 2px solid transparent;
}
.tab-item.active { color: var(--navy-900); border-bottom-color: var(--teal-500); }

/* ---------------- People grid (employee directory) ---------------- */
.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.person-card {
  background: white; border: 1px solid var(--ink-200); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
}
.person-card .prow { display: flex; align-items: center; gap: 12px; }
.person-card .pname { font-size: 13.5px; font-weight: 700; color: var(--ink-900); }
.person-card .prole { font-size: 12px; color: var(--ink-500); }
.person-card .ptags { display: flex; flex-wrap: wrap; gap: 6px; }
.person-card .pfoot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid var(--ink-100); font-size: 11.5px; color: var(--ink-500);
}
@media (max-width: 1100px) { .people-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- Progress bars (dashboard division pulse) ---------------- */
.progress-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.progress-row .plabel { width: 168px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--ink-700); }
.progress-track { flex: 1; height: 8px; border-radius: 999px; background: var(--ink-100); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal-500), var(--teal-600)); }
.progress-row .pval { width: 84px; flex: none; text-align: right; font-size: 12px; color: var(--ink-500); font-variant-numeric: tabular-nums; }

/* ---------------- Kanban board (task management) ---------------- */
.kanban-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.kanban-col { background: var(--ink-50); border: 1px solid var(--ink-200); border-radius: var(--radius-lg); padding: 12px; }
.kanban-col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; }
.kanban-col-head h4 { font-size: 12.5px; font-weight: 700; color: var(--ink-700); text-transform: uppercase; letter-spacing: 0.03em; }
.kanban-count { background: white; border: 1px solid var(--ink-200); color: var(--ink-500); font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.kanban-cards { display: flex; flex-direction: column; gap: 10px; min-height: 40px; }
.task-card {
  background: white; border: 1px solid var(--ink-200); border-radius: var(--radius-md);
  padding: 12px 13px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px;
}
.task-card .tdesc { font-size: 12.5px; font-weight: 600; color: var(--ink-900); line-height: 1.4; }
.task-card .tmeta { display: flex; align-items: center; justify-content: space-between; }
.task-card .tperson { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-500); }
.task-card .tavatar {
  width: 20px; height: 20px; border-radius: 50%; background: var(--navy-800); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; flex: none;
}
.task-card .tdue { font-size: 11px; color: var(--ink-500); font-weight: 600; }
.task-card .tdue.overdue { color: var(--red-500); }
.kanban-col[data-col="done"] .task-card { opacity: 0.75; }

@media (max-width: 1100px) { .kanban-board { grid-template-columns: 1fr; } }

/* ==================================================================
   DOB HUB ADDITIONS (unified platform mockups)
   ================================================================== */

.notice-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--ink-200); background: white; margin-bottom: 10px;
}
.notice-item.pinned { background: var(--amber-50); border-color: rgba(245,158,11,0.35); }
.notice-item .ntag {
  flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 999px; background: var(--navy-100); color: var(--navy-800);
  text-transform: uppercase; margin-top: 2px;
}
.notice-item strong { font-size: 13px; color: var(--ink-900); display: block; }
.notice-item p { margin: 3px 0 0; font-size: 12px; color: var(--ink-500); }
.notice-item .nmeta { font-size: 11px; color: var(--ink-400); margin-top: 5px; }

.mark-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; padding: 3px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 750; font-variant-numeric: tabular-nums;
}
.mark-good { background: var(--teal-50); color: var(--teal-600); }
.mark-mid  { background: var(--amber-50); color: #b45309; }
.mark-low  { background: var(--red-50); color: var(--red-500); }
.mark-none { background: var(--ink-100); color: var(--ink-500); }

.tri-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .tri-grid { grid-template-columns: 1fr; } }

.mini-stat { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--ink-100); }
.mini-stat:last-child { border-bottom: none; }
.mini-stat .v { font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }

/* ==================================================================
   DIRECTORY LAYOUT
   Ported from the old DOB Team Hub directory page, which is the shape
   HR actually works in: everyone's current task, grouped by division.
   Old palette names mapped onto this project's tokens.
   ================================================================== */

.stat-strip { display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 150px; background: var(--white);
  border: 1px solid var(--ink-200); border-top: 3px solid var(--ink-200);
  border-radius: var(--radius-lg); padding: 15px 18px; box-shadow: var(--shadow-sm);
}
.stat-card.accent-teal { border-top-color: var(--teal-500); }
.stat-card.accent-amber { border-top-color: var(--amber-500); }
.stat-card.accent-coral { border-top-color: var(--red-500); }
.stat-num { font-size: 24px; font-weight: 750; line-height: 1; color: var(--ink-900); }
.stat-label { font-size: 12px; color: var(--ink-500); margin-top: 5px; }

.task-overview-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.task-overview-col {
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm);
}
.task-overview-head {
  display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-500); margin-bottom: 10px;
}
.task-overview-head i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.task-overview-row { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; }
.task-overview-row + .task-overview-row { border-top: 1px dashed var(--ink-200); }
.task-overview-emp { font-size: 12.5px; font-weight: 600; color: var(--ink-900); }
.task-overview-task {
  font-size: 12px; color: var(--ink-500);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task-overview-empty { font-size: 12px; color: var(--ink-500); }

.page-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.page-toolbar input[type=search] {
  font-size: 13px; padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--ink-200); background: var(--white); color: var(--ink-900); min-width: 280px;
}
.page-toolbar input[type=search]:focus {
  outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-50);
}
.toolbar-count { font-size: 12.5px; color: var(--ink-500); margin-left: auto; }

.division-group { margin-bottom: 30px; }
.division-group:last-child { margin-bottom: 0; }
.division-group-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 13px; }
.division-group-head h3 { margin: 0; font-size: 14.5px; font-weight: 650; color: var(--ink-900); }
.division-group-line { flex: 1; height: 1px; background: var(--ink-200); }
.division-group-count { font-size: 12px; color: var(--ink-500); white-space: nowrap; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.emp-card-link { display: block; color: inherit; }
.emp-card-link:hover .emp-card { border-color: var(--teal-500); }
.emp-card {
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg); padding: 17px; box-shadow: var(--shadow-sm); height: 100%;
}
.emp-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.emp-avatar {
  width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 650; font-size: 14.5px; flex-shrink: 0;
}
.card-name { font-size: 14.5px; font-weight: 650; line-height: 1.25; color: var(--ink-900); }
.card-role { font-size: 12px; color: var(--ink-500); margin-top: 1px; }
.emp-tags { margin-bottom: 13px; display: flex; gap: 6px; flex-wrap: wrap; }
.emp-divider { border-top: 1px solid var(--ink-200); margin: 0 0 12px; }
.eyebrow {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-400); font-weight: 650; margin-bottom: 6px;
}
.task-line { font-size: 13.5px; font-weight: 500; color: var(--ink-900); line-height: 1.4; margin-bottom: 9px; }

.chip-plain {
  display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 500;
  padding: 3px 9px; border-radius: 100px; border: 1px solid var(--ink-200);
  color: var(--ink-500); background: var(--white); white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; flex-shrink: 0; }
.status-todo { color: var(--ink-500); }
.status-todo .status-dot { background: var(--ink-500); }
.status-progress { color: #946318; }
.status-progress .status-dot { background: var(--amber-500); }
.status-done { color: #046B62; }
.status-done .status-dot { background: var(--teal-500); }

.due-note { font-size: 11.5px; margin-top: 8px; }
.due-note.ok { color: var(--ink-500); }
.due-note.soon { color: #946318; }
.due-note.late { color: #B23934; font-weight: 600; }

/* ==================================================================
   NAVIGATION CHROME
   Breadcrumbs and the global search box: the two things that make the
   platform feel like one system rather than a set of separate pages.
   ================================================================== */

.breadcrumbs {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--ink-500); margin-bottom: 3px;
}
.breadcrumbs a { color: var(--ink-500); }
.breadcrumbs a:hover { color: var(--teal-600); }
.crumb-sep { color: var(--ink-200); }
.crumb-current { color: var(--ink-700); font-weight: 600; }

.topbar-search {
  display: flex; align-items: center; gap: 7px; margin: 0;
  background: var(--ink-50); border: 1px solid var(--ink-200);
  border-radius: 100px; padding: 6px 13px; min-width: 230px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.topbar-search:focus-within {
  background: var(--white); border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-50);
}
.topbar-search svg { width: 15px; height: 15px; color: var(--ink-400); flex-shrink: 0; }
.topbar-search input {
  border: none; background: none; outline: none; font: inherit;
  font-size: 12.5px; color: var(--ink-900); width: 100%;
}
.topbar-search input::placeholder { color: var(--ink-400); }
@media (max-width: 1100px) { .topbar-search { display: none; } }

.division-head { display: flex; align-items: center; justify-content: space-between; }
.division-head .division-name { flex: 1; color: inherit; }
.division-head .chev { cursor: pointer; padding: 0 4px; }

/* --- Leave balance meters --- */
.leave-balance { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.leave-meter {
  border: 1px solid var(--ink-200); border-radius: var(--radius-md);
  padding: 13px 15px; background: var(--white);
}
.leave-meter .lm-top {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px;
}
.leave-meter .lm-label { font-size: 12px; color: var(--ink-500); font-weight: 600; }
.leave-meter .lm-left { font-size: 18px; font-weight: 750; color: var(--ink-900); }
.leave-meter .lm-left small { font-size: 11.5px; font-weight: 500; color: var(--ink-400); }
.leave-track { height: 6px; border-radius: 100px; background: var(--ink-100); overflow: hidden; }
.leave-fill { height: 100%; border-radius: 100px; background: var(--teal-500); }
.leave-fill.high { background: var(--amber-500); }
.leave-fill.full { background: var(--red-500); }

/* --- Search results --- */
.search-group { margin-bottom: 26px; }
.search-group h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--ink-400); font-weight: 700; margin: 0 0 10px;
}
.search-hit {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border: 1px solid var(--ink-200); border-radius: var(--radius-md);
  background: var(--white); margin-bottom: 7px; color: inherit;
}
.search-hit:hover { border-color: var(--teal-500); }
.search-hit .sh-main { font-size: 13.5px; font-weight: 600; color: var(--ink-900); }
.search-hit .sh-sub { font-size: 12px; color: var(--ink-500); margin-top: 1px; }

/* --- Timeline, used by the activity log --- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px;
  width: 2px; background: var(--ink-200);
}
.timeline-row { position: relative; padding: 9px 0; }
.timeline-row::before {
  content: ''; position: absolute; left: -21px; top: 15px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--teal-500);
}
.timeline-row .tl-text { font-size: 13px; color: var(--ink-900); line-height: 1.5; }
.timeline-row .tl-meta { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }
.timeline-row .tl-actor { font-weight: 650; }

/* --- Section header used above grouped panels --- */
.section-head {
  display: flex; align-items: baseline; gap: 12px; margin: 26px 0 14px;
}
.section-head h2 { font-size: 15px; font-weight: 650; color: var(--ink-900); margin: 0; }
.section-head .line { flex: 1; height: 1px; background: var(--ink-200); }
.section-head .more { font-size: 12px; color: var(--teal-600); font-weight: 600; white-space: nowrap; }

/* ==================================================================
   FINANCE DASHBOARD
   Ported from the DOB Client Portal, which is the shape Finance already
   works in: month filter, income charts, needs-attention alerts and a
   payments table with the payment method colour-coded.
   ================================================================== */

.method-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.method-dot { width: 8px; height: 8px; border-radius: 2px; }
.method-cash .method-dot { background: var(--amber-500); }
.method-bank .method-dot { background: var(--blue-500); }
.method-mobile .method-dot { background: var(--teal-500); }

.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; }
.legend-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; padding: 0 4px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-500); font-weight: 600; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }

.month-filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, #7c3aed, #db2777 55%, #f59e0b 120%);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  margin-bottom: 20px;
  color: white;
  box-shadow: var(--shadow-md);
  position: relative;
}
.month-filter-bar .mf-label { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.month-filter-bar .mf-hint { font-size: 11.5px; color: rgba(255,255,255,0.85); margin-top: 2px; }
.mf-toggle {
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.35);
  color: white; padding: 8px 16px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.mf-toggle:hover { background: rgba(255,255,255,0.28); }
.mf-count {
  background: white; color: #7c3aed; border-radius: 999px;
  padding: 1px 8px; font-size: 11px; font-weight: 800;
}
.mf-panel {
  display: none; position: absolute; top: calc(100% + 8px); right: 18px; z-index: 50;
  background: white; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  border: 1px solid var(--ink-200); padding: 14px; width: 320px; color: var(--ink-900);
}
.mf-panel.open { display: block; }
.mf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 220px; overflow-y: auto; margin-bottom: 12px; }
.mf-chip { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px 8px; border-radius: var(--radius-sm); border: 1px solid var(--ink-200); cursor: pointer; }
.mf-chip:hover { background: var(--ink-50); }
.mf-chip input { accent-color: #7c3aed; }
.mf-actions { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--ink-100); padding-top: 10px; }

a.alert-item { display: flex; }
a.alert-item:hover { filter: brightness(0.98); }

/* ==================================================================
   DEPARTMENT PAGES
   One page per department on the managing board. Shared pieces only;
   each page's layout lives in its own template.
   ================================================================== */

.emp-avatar.tint-0 { background: #E3FBF8; color: #046B62; }
.emp-avatar.tint-1 { background: #FDF1DF; color: #946318; }
.emp-avatar.tint-2 { background: #EFEBFB; color: #5B4FA8; }
.emp-avatar.tint-3 { background: #EEF1F5; color: #42506B; }

.scope-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.scope-strip-meta { margin-left: auto; font-size: 12.5px; color: var(--ink-500); }
.scope-strip-meta strong { color: var(--red-500); }

.kpi-grid.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1200px) { .kpi-grid.five { grid-template-columns: repeat(3, 1fr); } }

.bar-mini { height: 6px; border-radius: 100px; background: var(--ink-100); overflow: hidden; min-width: 70px; }
.bar-mini > span { display: block; height: 100%; background: var(--teal-500); border-radius: 100px; }

.timeline-day { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--ink-200); }
.timeline-day:last-child { border-bottom: none; }
.date-chip {
  width: 46px; flex-shrink: 0; text-align: center; border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm); padding: 4px 0; background: var(--white); align-self: flex-start;
}
.date-chip .d { font-size: 17px; font-weight: 750; color: var(--ink-900); line-height: 1.1; }
.date-chip .m { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-500); }

.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.level-card {
  background: var(--white); border: 1px solid var(--ink-200); border-top: 3px solid var(--teal-500);
  border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.level-card.l2 { border-top-color: var(--blue-500); }
.level-card.l3 { border-top-color: var(--amber-500); }
.level-card .lv { font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-500); }
.level-card .ln { font-size: 28px; font-weight: 750; color: var(--ink-900); margin: 4px 0 6px; }

.pipeline-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.pipeline-cell { border-radius: var(--radius-md); padding: 12px; text-align: center; }
.pipeline-cell .pn { font-size: 24px; font-weight: 750; }
.pipeline-cell .pl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.pipeline-cell.cold { background: var(--blue-50); color: var(--blue-500); }
.pipeline-cell.warm { background: var(--amber-50); color: #b45309; }
.pipeline-cell.hot { background: var(--red-50); color: var(--red-500); }

.minutes { border-left: 3px solid var(--teal-500); padding: 2px 0 2px 14px; margin-bottom: 18px; }
.minutes:last-child { margin-bottom: 0; }
.minutes ul { margin: 8px 0 6px; padding-left: 18px; font-size: 13px; color: var(--ink-700); line-height: 1.7; }

.nonprofit-note {
  display: flex; gap: 12px; align-items: center; background: var(--teal-50);
  border: 1px solid rgba(13, 148, 136, 0.25); border-radius: var(--radius-md);
  padding: 12px 16px; margin-bottom: 18px; font-size: 13px; color: var(--ink-700);
}

@media (max-width: 900px) { .level-grid, .pipeline-strip { grid-template-columns: 1fr; } }
