/* ================================================================
   Teamline Employee Portal - Default.css
   Modern redesign with sidebar navigation and dashboard
   ================================================================ */

/* ---------- CSS Variables (aligned with HRDashboard) ---------- */
:root {
  --tl-font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --tl-bg: #f0f2f5;
  --tl-sidebar-bg: #0f172a;
  --tl-sidebar-hover: #1e293b;
  --tl-sidebar-active: #2563eb;
  --tl-sidebar-text: #94a3b8;
  --tl-sidebar-text-active: #ffffff;
  --tl-sidebar-width: 260px;
  --tl-sidebar-collapsed: 68px;
  --tl-topbar-height: 56px;
  --tl-card-bg: #ffffff;
  --tl-text: #1a1a2e;
  --tl-text-secondary: #64748b;
  --tl-border: #e2e8f0;
  --tl-blue: #2563eb;
  --tl-blue-light: #dbeafe;
  --tl-green: #16a34a;
  --tl-green-light: #dcfce7;
  --tl-amber: #d97706;
  --tl-amber-light: #fef3c7;
  --tl-red: #dc2626;
  --tl-red-light: #fee2e2;
  --tl-purple: #7c3aed;
  --tl-purple-light: #ede9fe;
  --tl-radius: 12px;
  --tl-radius-sm: 8px;
  --tl-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --tl-shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --tl-shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --tl-transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
html, body, form {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: var(--tl-font);
  color: var(--tl-text);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }

/* ---------- Loading Overlay ---------- */
.tl-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, .85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tl-spinner {
  position: relative;
  width: 56px;
  height: 56px;
}

.tl-spinner-ring {
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: 50%;
  border-top-color: var(--tl-blue);
  animation: tl-spin 1.2s cubic-bezier(.5,.1,.3,1) infinite;
}
.tl-spinner-ring:nth-child(2) {
  inset: 6px;
  border-top-color: #60a5fa;
  animation-delay: .15s;
  animation-duration: 1s;
}
.tl-spinner-ring:nth-child(3) {
  inset: 12px;
  border-top-color: #93c5fd;
  animation-delay: .3s;
  animation-duration: .8s;
}

@keyframes tl-spin { to { transform: rotate(360deg); } }

/* ================================================================
   LOGIN / CODE SCREENS -- moved to assets/signin/signin.css (sign-in
   revamp 2026-10-16): the stage, the T intro, the glass card, the
   fields, the code boxes. Default.css keeps the app shell only.
   ================================================================ */

/* ================================================================
   APP SHELL - SIDEBAR
   ================================================================ */
#app_shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--tl-bg);
}

.tl-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: var(--tl-sidebar-width);
  background: var(--tl-sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width var(--tl-transition);
  overflow: hidden;
}

.tl-sidebar--collapsed {
  width: var(--tl-sidebar-collapsed);
}

/* When hovering on collapsed sidebar, expand it */
.tl-sidebar--collapsed:hover,
.tl-sidebar--collapsed.tl-sidebar--peek {
  width: var(--tl-sidebar-width);
  box-shadow: 4px 0 24px rgba(0,0,0,.25);
}

.tl-sidebar--collapsed:hover .tl-profile-info,
.tl-sidebar--collapsed.tl-sidebar--peek .tl-profile-info,
.tl-sidebar--collapsed:hover .tl-nav-item span,
.tl-sidebar--collapsed.tl-sidebar--peek .tl-nav-item span,
.tl-sidebar--collapsed:hover .tl-nav-group-label,
.tl-sidebar--collapsed.tl-sidebar--peek .tl-nav-group-label {
  opacity: 1;
  width: auto;
  overflow: visible;
}

/* Hide text when collapsed (not hovered) */
.tl-sidebar--collapsed .tl-profile-info,
.tl-sidebar--collapsed .tl-nav-item span,
.tl-sidebar--collapsed .tl-nav-group-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
}

/* ---------- Sidebar Profile ---------- */
.tl-sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  flex-shrink: 0;
}

.tl-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.tl-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.15);
  background: #1e293b;
}

.tl-avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--tl-green);
  border: 2px solid var(--tl-sidebar-bg);
  border-radius: 50%;
}

.tl-avatar-status.on-leave {
  background: var(--tl-amber);
}

.tl-profile-info {
  min-width: 0;
  transition: opacity var(--tl-transition);
}

.tl-profile-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--tl-sidebar-text-active);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-profile-title {
  display: block;
  font-size: 11px;
  color: var(--tl-sidebar-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 0 16px;
  flex-shrink: 0;
}

/* ---------- Sidebar Navigation ---------- */
.tl-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.tl-sidebar-nav::-webkit-scrollbar { width: 4px; }
.tl-sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.tl-nav-group {
  margin-bottom: 8px;
}

.tl-nav-group-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: rgba(148,163,184,.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px 4px;
  white-space: nowrap;
  transition: opacity var(--tl-transition);
}

.tl-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--tl-sidebar-text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all .15s ease;
  text-decoration: none;
  position: relative;
}
.tl-nav-item:hover {
  background: var(--tl-sidebar-hover);
  color: var(--tl-sidebar-text-active);
}
.tl-nav-item--active {
  background: rgba(37, 99, 235, .15);
  color: var(--tl-sidebar-text-active);
}
.tl-nav-item--active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--tl-blue);
}
.tl-nav-item i {
  width: 20px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}
.tl-nav-item span {
  transition: opacity var(--tl-transition);
}

.tl-nav-badge {
  margin-left: auto;
  background: var(--tl-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
}

/* Phase 62z11 -- red flashing alert badge on data-driven sidebar tiles (an
   alert, NOT a count). Phase 62z12: bold red pill. Phase 62z28 (CIO 2026-06-18):
   reads "Attention" (was "NEW") and is PERSISTENT -- it keeps flashing and does
   NOT clear when the user opens the module, so it stays until the underlying
   data condition no longer applies. */
.tl-nav-dot {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #fff;
  background: #ef4444;
  padding: 2px 7px;
  border-radius: 9px;
  line-height: 1.3;
  text-transform: uppercase;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: tlNavDotPulse 1.6s infinite;
}
.tl-nav-dot::before { content: "Attention"; }
@keyframes tlNavDotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.tl-sidebar-footer {
  flex-shrink: 0;
  padding: 8px 10px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.tl-sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0,0,0,.3);
}

/* ================================================================
   MAIN CONTENT AREA
   ================================================================ */
.tl-main {
  flex: 1;
  margin-left: var(--tl-sidebar-collapsed);
  display: flex;
  flex-direction: column;
  height: 100vh;
  transition: margin-left var(--tl-transition);
  overflow: hidden;
}

.tl-sidebar:not(.tl-sidebar--collapsed) ~ .tl-sidebar-overlay ~ .tl-main,
.tl-sidebar:not(.tl-sidebar--collapsed) ~ .tl-main {
  margin-left: var(--tl-sidebar-width);
}

/* ---------- Top Bar ---------- */
.tl-topbar {
  height: var(--tl-topbar-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: var(--tl-card-bg);
  border-bottom: 1px solid var(--tl-border);
  flex-shrink: 0;
}

.tl-topbar-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--tl-border);
  border-radius: 8px;
  color: var(--tl-text-secondary);
  cursor: pointer;
  font-size: 15px;
  transition: all .15s ease;
}
.tl-topbar-toggle:hover { background: var(--tl-bg); color: var(--tl-text); }

.tl-topbar-breadcrumb {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--tl-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tl-topbar-notif {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: var(--tl-text-secondary);
  transition: all .15s ease;
}
.tl-topbar-notif:hover { background: var(--tl-bg); color: var(--tl-text); }

/* ── Phase 16 — Theme toggle (light/dark) ───────────────── */
.tl-theme-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: var(--tl-text-secondary);
  background: transparent;
  border: none;
  padding: 0;
  transition: all .2s ease;
  outline: none;
}
.tl-theme-toggle:hover { background: var(--tl-bg); color: var(--tl-text); }
.tl-theme-toggle:focus-visible { box-shadow: 0 0 0 2px rgba(96,165,250,.45); }
.tl-theme-toggle i {
  position: absolute;
  font-size: 16px;
  transition: opacity .25s ease, transform .35s cubic-bezier(.4,0,.2,1);
}
/* Light mode (default): show moon (call to switch dark), hide sun */
.tl-theme-toggle .tl-theme-icon-dark  { opacity: 1; transform: rotate(0deg) scale(1); }
.tl-theme-toggle .tl-theme-icon-light { opacity: 0; transform: rotate(90deg) scale(.6); }
/* Dark mode: show sun, hide moon */
html[data-theme="dark"] .tl-theme-toggle .tl-theme-icon-dark  { opacity: 0; transform: rotate(-90deg) scale(.6); }
html[data-theme="dark"] .tl-theme-toggle .tl-theme-icon-light { opacity: 1; transform: rotate(0deg) scale(1); color: #fbbf24; }
html[data-theme="dark"] .tl-theme-toggle:hover { background: rgba(255,255,255,.06); color: var(--tl-text); }
html[data-theme="dark"] .tl-theme-toggle:hover .tl-theme-icon-light { color: #fcd34d; }

.tl-notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--tl-red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* ── Notification Dropdown Panel ───────────────── */
.tl-notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-height: 480px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.06);
  z-index: 10000;
  overflow: hidden;
  animation: notifSlide 0.2s ease;
}

@keyframes notifSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.tl-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.tl-notif-header i { color: #378ADD; }

.tl-notif-viewall {
  font-size: 12px;
  font-weight: 600;
  color: #378ADD;
  cursor: pointer;
  text-decoration: none;
}

.tl-notif-viewall:hover { text-decoration: underline; }

.tl-notif-body {
  max-height: 400px;
  overflow-y: auto;
}

.tl-notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid #f1f5f9;
}

.tl-notif-item:last-child { border-bottom: none; }
.tl-notif-item:hover { background: #f8fafc; }

.tl-notif-item.tl-notif-unread {
  background: #f0f7ff;
}

.tl-notif-item.tl-notif-unread:hover {
  background: #e0efff;
}

.tl-notif-dot {
  width: 18px;
  flex-shrink: 0;
  padding-top: 4px;
  font-size: 8px;
  color: #378ADD;
}

.tl-notif-content {
  flex: 1;
  min-width: 0;
}

.tl-notif-title {
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tl-notif-unread .tl-notif-title {
  font-weight: 700;
}

.tl-notif-time {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
}

.tl-notif-empty {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

.tl-notif-empty i {
  font-size: 28px;
  color: #cbd5e1;
  display: block;
  margin-bottom: 8px;
}

.tl-notif-empty small {
  font-size: 11px;
  color: #cbd5e1;
}

.tl-notif-loading {
  text-align: center;
  padding: 30px;
  color: #94a3b8;
  font-size: 13px;
}

/* The bell's cards (2026-11-23): the same look as the Notifications page -- a module icon and colour, a severity
   stripe on the left edge, a bold title, one line of text, the module badge and the time. Unread first (server order). */
.tl-notif-header i { color: #4F46E5; }
.tl-notif-viewall { color: #4F46E5; display: inline-flex; align-items: center; gap: 5px; }
.tl-notif-viewall i { color: #4F46E5; font-size: 11px; }
.tl-notif-item.tl-notif-card {
  --tln-mod: #475569; --tln-soft: #f1f5f9; --tln-sev: var(--tln-mod);
  position: relative; gap: 12px; padding: 12px 16px 12px 18px; align-items: flex-start;
}
.tl-notif-item.tl-notif-card::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--tln-sev);
}
.tl-notif-card.tl-notif-unread { background: #fbfaff; }
.tl-notif-card.tl-notif-unread:hover { background: #f3f1ff; }
.tl-notif-g-approvals { --tln-mod: #7C3AED; --tln-soft: #f3e8ff; }
.tl-notif-g-hr { --tln-mod: #0D9488; --tln-soft: #ccfbf1; }
.tl-notif-g-sales { --tln-mod: #16A34A; --tln-soft: #dcfce7; }
.tl-notif-g-leasing { --tln-mod: #EA580C; --tln-soft: #ffedd5; }
.tl-notif-g-service { --tln-mod: #DB2777; --tln-soft: #fce7f3; }
.tl-notif-g-system { --tln-mod: #475569; --tln-soft: #f1f5f9; }
.tl-notif-s-danger { --tln-sev: #DC2626; }
.tl-notif-s-warn { --tln-sev: #F59E0B; }
.tl-notif-s-success { --tln-sev: #16A34A; }
.tl-notif-ic {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: var(--tln-soft); color: var(--tln-mod);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.tl-notif-ic i { color: var(--tln-mod); }
.tl-notif-top { display: flex; align-items: flex-start; gap: 7px; min-width: 0; }
.tl-notif-udot { width: 8px; height: 8px; margin-top: 6px; flex-shrink: 0; border-radius: 50%; background: #E11D48; box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.16); }
.tl-notif-card .tl-notif-text { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: #475569; }
.tl-notif-card .tl-notif-time { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; color: #64748b; }
.tl-notif-mod {
  display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 999px;
  background: var(--tln-soft); color: var(--tln-mod); font-size: 10px; font-weight: 700; letter-spacing: 0.02em;
}
html[data-theme="dark"] .tl-notif-header i, html[data-theme="dark"] .tl-notif-viewall, html[data-theme="dark"] .tl-notif-viewall i { color: #A5B4FC; }
html[data-theme="dark"] .tl-notif-g-approvals { --tln-mod: #A78BFA; --tln-soft: rgba(124, 58, 237, 0.2); }
html[data-theme="dark"] .tl-notif-g-hr { --tln-mod: #2DD4BF; --tln-soft: rgba(13, 148, 136, 0.2); }
html[data-theme="dark"] .tl-notif-g-sales { --tln-mod: #4ADE80; --tln-soft: rgba(22, 163, 74, 0.2); }
html[data-theme="dark"] .tl-notif-g-leasing { --tln-mod: #FB923C; --tln-soft: rgba(234, 88, 12, 0.2); }
html[data-theme="dark"] .tl-notif-g-service { --tln-mod: #F472B6; --tln-soft: rgba(219, 39, 119, 0.2); }
html[data-theme="dark"] .tl-notif-g-system { --tln-mod: #94A3B8; --tln-soft: rgba(148, 163, 184, 0.16); }
html[data-theme="dark"] .tl-notif-s-danger { --tln-sev: #F87171; }
html[data-theme="dark"] .tl-notif-s-warn { --tln-sev: #FBBF24; }
html[data-theme="dark"] .tl-notif-s-success { --tln-sev: #4ADE80; }
html[data-theme="dark"] .tl-notif-card.tl-notif-unread { background: rgba(99, 102, 241, 0.1) !important; }
html[data-theme="dark"] .tl-notif-card.tl-notif-unread:hover { background: rgba(99, 102, 241, 0.16) !important; }
html[data-theme="dark"] .tl-notif-card .tl-notif-text { color: #cbd5e1; }
html[data-theme="dark"] .tl-notif-card .tl-notif-time { color: #94a3b8 !important; }

/* Make topbar-right position relative for the dropdown */
.tl-topbar-right {
  position: relative;
}

.tl-topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--tl-border);
  cursor: pointer;
}

/* ---------- Content Pane ---------- */
.tl-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.tl-module-frame {
  width: 100%;
  height: 100%;
  border: none;
}

/* ================================================================
   DASHBOARD HOME
   ================================================================ */
.tl-dashboard {
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.tl-dashboard::-webkit-scrollbar { width: 6px; }
.tl-dashboard::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* Welcome Banner */
.tl-welcome-banner {
  background: linear-gradient(135deg, #1e3a5f, #2563eb, #7c3aed);
  border-radius: var(--tl-radius);
  padding: 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.tl-welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.tl-welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: 15%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}

.tl-welcome-row {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.tl-welcome-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.25);
  flex-shrink: 0;
}

.tl-welcome-text h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 2px;
}
.tl-welcome-text p {
  font-size: 14px;
  opacity: .7;
  margin: 0;
}

.tl-welcome-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tl-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: rgba(255,255,255,.12);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
}

/* KPI Row */
.tl-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.tl-kpi-card {
  background: var(--tl-card-bg);
  border-radius: var(--tl-radius);
  padding: 20px;
  border-left: 4px solid var(--tl-blue);
  box-shadow: var(--tl-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tl-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tl-shadow-md);
}

.tl-kpi-card--green { border-left-color: var(--tl-green); }
.tl-kpi-card--amber { border-left-color: var(--tl-amber); }
.tl-kpi-card--red { border-left-color: var(--tl-red); }
.tl-kpi-card--purple { border-left-color: var(--tl-purple); }

.tl-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tl-text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 8px;
}

.tl-kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--tl-text);
  margin: 0;
  line-height: 1;
}

.tl-kpi-sub {
  font-size: 12px;
  color: var(--tl-text-secondary);
  margin: 6px 0 0;
}

/* Info Grid */
.tl-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* Single-column variant — used by the broker portal where only one info card is shown */
.tl-info-grid--single {
  grid-template-columns: 1fr;
}

.tl-info-card {
  background: var(--tl-card-bg);
  border-radius: var(--tl-radius);
  padding: 24px;
  box-shadow: var(--tl-shadow);
}

.tl-info-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--tl-text);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tl-info-card-title i {
  color: var(--tl-blue);
  font-size: 16px;
}

.tl-info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--tl-border);
  font-size: 13px;
}
.tl-info-row:last-child { border-bottom: none; }

.tl-info-label {
  color: var(--tl-text-secondary);
  font-weight: 500;
}
.tl-info-value {
  color: var(--tl-text);
  font-weight: 600;
  text-align: right;
}

/* ================================================================
   Phase 271 (CIO 2026-09-27) -- Weekly Performance Index home cards
   ("My Weekly Performance" + "My Plan For This Week"), replacing the
   retired Employment Details / Personal Information cards. Reuses the
   .tl-info-card shell (already dark-mode aware via --tl-card-bg) and
   only defines what's new. Module prefix: hm-wpi-.
   ================================================================ */
.hm-wpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.hm-wpi-card { display: flex; flex-direction: column; }

.hm-wpi-empty {
  font-size: 13px;
  color: var(--tl-text-secondary);
  background: rgba(148, 163, 184, .12);
  border-radius: var(--tl-radius-sm);
  padding: 14px 16px;
  line-height: 1.5;
}

.hm-wpi-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}
.hm-wpi-ring-wrap { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.hm-wpi-ring { width: 96px; height: 96px; transform: rotate(-90deg); }
.hm-wpi-ring-bg { fill: none; stroke: var(--tl-border); stroke-width: 10; }
.hm-wpi-ring-fg {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset .6s ease;
}
.hm-wpi-ring-fg--green { stroke: var(--tl-green); }
.hm-wpi-ring-fg--blue  { stroke: var(--tl-blue); }
.hm-wpi-ring-fg--amber { stroke: var(--tl-amber); }
.hm-wpi-ring-fg--red   { stroke: var(--tl-red); }
.hm-wpi-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}
.hm-wpi-ring-score { font-size: 26px; font-weight: 800; color: var(--tl-text); }
.hm-wpi-ring-max { font-size: 11px; color: var(--tl-text-secondary); }

.hm-wpi-top-text { min-width: 0; flex: 1; }
.hm-wpi-band {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 3px 10px;
  border-radius: 20px;
}
.hm-wpi-band--green { background: var(--tl-green-light); color: var(--tl-green); }
.hm-wpi-band--blue  { background: var(--tl-blue-light); color: var(--tl-blue); }
.hm-wpi-band--amber { background: var(--tl-amber-light); color: var(--tl-amber); }
.hm-wpi-band--red   { background: var(--tl-red-light); color: var(--tl-red); }
.hm-wpi-week { font-size: 13px; color: var(--tl-text-secondary); margin-top: 6px; }
.hm-wpi-self { font-size: 12px; color: var(--tl-text-secondary); margin-top: 4px; }

.hm-wpi-evidence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  width: fit-content;
}
.hm-wpi-evidence--green { background: var(--tl-green-light); color: var(--tl-green); }
.hm-wpi-evidence--amber { background: var(--tl-amber-light); color: var(--tl-amber); }
.hm-wpi-evidence--red   { background: var(--tl-red-light); color: var(--tl-red); }
.hm-wpi-evidence--gray  { background: rgba(148, 163, 184, .18); color: var(--tl-text-secondary); }

.hm-wpi-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hm-wpi-flag {
  font-size: 11px;
  font-weight: 600;
  background: rgba(148, 163, 184, .16);
  color: var(--tl-text-secondary);
  padding: 4px 10px;
  border-radius: 20px;
}

.hm-wpi-opinion {
  font-size: 13px;
  line-height: 1.6;
  color: var(--tl-text);
  background: rgba(148, 163, 184, .08);
  border-left: 3px solid var(--tl-purple);
  border-radius: 0 var(--tl-radius-sm) var(--tl-radius-sm) 0;
  padding: 12px 14px;
  margin-bottom: 8px;
  white-space: pre-wrap;
}
.hm-wpi-opinion-toggle {
  font-size: 12px;
  font-weight: 600;
  color: var(--tl-blue);
  cursor: pointer;
  width: fit-content;
  margin: 0 0 14px auto;
}
.hm-wpi-opinion-toggle:hover { text-decoration: underline; }

/* WPI: ask for a review of this week, and the line manager's answers */
.hm-wpi-rv-box { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.hm-wpi-rv { border-radius: var(--tl-radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; border-left: 3px solid var(--tl-border); background: rgba(148, 163, 184, .08); }
.hm-wpi-rv.is-amber { background: var(--tl-amber-light); border-left-color: var(--tl-amber); }
.hm-wpi-rv.is-blue { background: var(--tl-blue-light); border-left-color: var(--tl-blue); }
.hm-wpi-rv.is-red { background: var(--tl-red-light); border-left-color: var(--tl-red); }
.hm-wpi-rv.is-grey { border-left-color: var(--tl-text-secondary); }
.hm-wpi-rv-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--tl-text); }
.hm-wpi-rv.is-amber .hm-wpi-rv-head { color: #92400e; }
.hm-wpi-rv.is-blue .hm-wpi-rv-head { color: #1e40af; }
.hm-wpi-rv.is-red .hm-wpi-rv-head { color: #991b1b; }
.hm-wpi-rv-meta { font-size: 12px; color: var(--tl-text-secondary); }
.hm-wpi-rv-text { font-size: 13px; line-height: 1.55; color: var(--tl-text); white-space: pre-wrap; overflow-wrap: anywhere; }
.hm-wpi-rv-text.is-reply { background: var(--tl-card-bg, #ffffff); border-radius: var(--tl-radius-sm); padding: 8px 10px; }
.hm-wpi-rv-ask { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--tl-radius-sm); border: 1px solid var(--tl-purple); background: transparent; color: var(--tl-purple); font-size: 13px; font-weight: 600; cursor: pointer; }
.hm-wpi-rv-ask:hover { background: var(--tl-purple-light, #ede9fe); }
.hm-wpi-rv-form { border: 1px solid var(--tl-border); border-radius: var(--tl-radius-sm); padding: 12px; background: var(--tl-card-bg, #ffffff); }
.hm-wpi-rv-help { font-size: 12px; color: var(--tl-text-secondary); margin-bottom: 8px; line-height: 1.5; }
.hm-wpi-rv-input { width: 100%; min-height: 90px; resize: vertical; font-size: 13px; line-height: 1.5; box-sizing: border-box; }
.hm-wpi-rv-count { font-size: 11px; color: var(--tl-text-secondary); margin-top: 4px; text-align: right; }
.hm-wpi-rv-count.is-ok { color: var(--tl-green); }
.hm-wpi-rv-err { font-size: 12px; color: #991b1b; background: var(--tl-red-light); border-radius: var(--tl-radius-sm); padding: 8px 10px; margin-top: 8px; }
.hm-wpi-rv-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.hm-wpi-rv-send { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 0; border-radius: var(--tl-radius-sm); background: linear-gradient(135deg, #7c3aed, #6d28d9); color: #ffffff; font-size: 13px; font-weight: 600; cursor: pointer; }
.hm-wpi-rv-send:disabled { opacity: .55; cursor: not-allowed; }
.hm-wpi-rv-send.is-busy { pointer-events: none; opacity: .8; }
.hm-wpi-rv-cancel { padding: 8px 14px; border: 1px solid var(--tl-border); border-radius: var(--tl-radius-sm); background: transparent; color: var(--tl-text-secondary); font-size: 13px; cursor: pointer; }
.hm-wpi-rv-cancel:disabled { opacity: .55; cursor: not-allowed; }

/* WPI owl mascot: the owl and what it says, above the score ring */
.hm-wpi-owl-row { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.hm-wpi-owl {
  position: relative;
  flex: 0 0 124px;
  width: 124px;
  height: 124px;
  cursor: pointer;
  border-radius: 20px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.hm-wpi-owl:focus-visible { box-shadow: 0 0 0 3px rgba(59, 130, 246, .45); }
.hm-wpi-owl::after {
  content: "";
  position: absolute;
  left: 27%;
  right: 27%;
  bottom: 3%;
  height: 7%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(15, 23, 42, .22), rgba(15, 23, 42, 0));
}
.hm-wpi-owl-media { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.hm-wpi-owl.is-poked { animation: hmWpiOwlPop .45s ease; }
.hm-wpi-owl.is-intro { animation: hmWpiOwlShake .7s ease .25s 1; }
.hm-wpi-says {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
.hm-wpi-says::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  margin-top: -8px;
  border-style: solid;
  border-width: 8px 8px 8px 0;
  border-color: transparent;
}
.hm-wpi-says--ecstatic  { background: rgba(34, 197, 94, .14);  color: var(--tl-green); }
.hm-wpi-says--pleased   { background: rgba(59, 130, 246, .14); color: var(--tl-blue); }
.hm-wpi-says--concerned { background: rgba(245, 158, 11, .16); color: var(--tl-amber); }
.hm-wpi-says--angry     { background: rgba(239, 68, 68, .14);  color: var(--tl-red); }
.hm-wpi-says--idle      { background: rgba(148, 163, 184, .16); color: var(--tl-text); }
.hm-wpi-says--ecstatic::before  { border-right-color: rgba(34, 197, 94, .14); }
.hm-wpi-says--pleased::before   { border-right-color: rgba(59, 130, 246, .14); }
.hm-wpi-says--concerned::before { border-right-color: rgba(245, 158, 11, .16); }
.hm-wpi-says--angry::before     { border-right-color: rgba(239, 68, 68, .14); }
.hm-wpi-says--idle::before      { border-right-color: rgba(148, 163, 184, .16); }
.hm-wpi-confetti { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hm-wpi-confetti i { position: absolute; left: 50%; top: 42%; width: 7px; height: 11px; border-radius: 2px; opacity: 0; }
.hm-wpi-owl.is-cheer .hm-wpi-confetti i { animation: hmWpiConfetti 1.4s cubic-bezier(.2, .7, .3, 1) forwards; }
.hm-wpi-confetti i:nth-child(1)  { background: #22c55e; --x: -58px; --y: -64px; }
.hm-wpi-confetti i:nth-child(2)  { background: #f59e0b; --x: 52px;  --y: -70px; animation-delay: .05s; }
.hm-wpi-confetti i:nth-child(3)  { background: #3b82f6; --x: -70px; --y: -18px; animation-delay: .1s; }
.hm-wpi-confetti i:nth-child(4)  { background: #ec4899; --x: 68px;  --y: -22px; }
.hm-wpi-confetti i:nth-child(5)  { background: #8b5cf6; --x: -34px; --y: -80px; animation-delay: .08s; }
.hm-wpi-confetti i:nth-child(6)  { background: #eab308; --x: 30px;  --y: -84px; animation-delay: .12s; }
.hm-wpi-confetti i:nth-child(7)  { background: #14b8a6; --x: -76px; --y: 20px; animation-delay: .06s; }
.hm-wpi-confetti i:nth-child(8)  { background: #ef4444; --x: 74px;  --y: 18px; animation-delay: .14s; }
.hm-wpi-confetti i:nth-child(9)  { background: #22c55e; --x: -18px; --y: -92px; animation-delay: .16s; }
.hm-wpi-confetti i:nth-child(10) { background: #3b82f6; --x: 14px;  --y: -96px; animation-delay: .03s; }
.hm-wpi-confetti i:nth-child(11) { background: #f59e0b; --x: -50px; --y: 44px; animation-delay: .18s; }
.hm-wpi-confetti i:nth-child(12) { background: #ec4899; --x: 50px;  --y: 46px; animation-delay: .09s; }
.hm-wpi-confetti i:nth-child(13) { background: #eab308; --x: -84px; --y: -44px; animation-delay: .2s; }
.hm-wpi-confetti i:nth-child(14) { background: #8b5cf6; --x: 84px;  --y: -48px; animation-delay: .11s; }
@keyframes hmWpiConfetti {
  0%   { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(.5); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(320deg) scale(1); }
}
@keyframes hmWpiOwlPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.1) rotate(-3deg); }
  100% { transform: scale(1); }
}
@keyframes hmWpiOwlShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px) rotate(-2deg); }
  40% { transform: translateX(5px) rotate(2deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
@media (max-width: 480px) {
  .hm-wpi-owl { flex-basis: 96px; width: 96px; height: 96px; }
  .hm-wpi-says { font-size: 12.5px; padding: 9px 12px; }
}

.hm-wpi-ai-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--tl-purple);
  margin: 2px 0 2px;
}
.hm-wpi-ai-sub { font-size: 12px; color: var(--tl-text-secondary); margin-bottom: 10px; }

/* Weekly trend: one labelled column per week, score bar inside a 0-100 track */
.hm-wpi-trend { margin: 8px 0 14px; padding-top: 12px; border-top: 1px solid var(--tl-border); }
.hm-wpi-trend-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--tl-text-secondary);
  margin-bottom: 8px;
}
.hm-wpi-trend-cols { display: flex; align-items: flex-end; gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.hm-wpi-tcol { flex: 0 0 54px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hm-wpi-tval { font-size: 12.5px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.hm-wpi-tval--green { color: var(--tl-green); }
.hm-wpi-tval--blue  { color: var(--tl-blue); }
.hm-wpi-tval--amber { color: var(--tl-amber); }
.hm-wpi-tval--red   { color: var(--tl-red); }
.hm-wpi-tval--review, .hm-wpi-tval--open, .hm-wpi-tval--off { font-size: 10.5px; font-weight: 600; color: var(--tl-text-secondary); }
.hm-wpi-tval--missed { font-size: 10.5px; font-weight: 700; color: var(--tl-red); }
.hm-wpi-ttrack {
  width: 26px;
  height: 64px;
  border-radius: 6px;
  background: rgba(148, 163, 184, .16);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}
.hm-wpi-tbar { width: 100%; border-radius: 6px 6px 0 0; }
.hm-wpi-tbar--green { background: var(--tl-green); }
.hm-wpi-tbar--blue  { background: var(--tl-blue); }
.hm-wpi-tbar--amber { background: var(--tl-amber); }
.hm-wpi-tbar--red   { background: var(--tl-red); }
.hm-wpi-ttrack--review, .hm-wpi-ttrack--open, .hm-wpi-ttrack--missed, .hm-wpi-ttrack--off { align-items: center; font-size: 11px; }
.hm-wpi-ttrack--review { background: transparent; border: 1.5px dashed var(--tl-blue); color: var(--tl-blue); }
.hm-wpi-ttrack--open   { background: transparent; border: 1.5px dashed var(--tl-text-secondary); color: var(--tl-text-secondary); }
.hm-wpi-ttrack--missed { background: rgba(239, 68, 68, .14); color: var(--tl-red); }
.hm-wpi-ttrack--off    { background: rgba(148, 163, 184, .16); color: var(--tl-text-secondary); }
.hm-wpi-tlbl { font-size: 11px; color: var(--tl-text-secondary); white-space: nowrap; }
.hm-wpi-trend-key {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--tl-text-secondary);
}
.hm-wpi-trend-key span { display: inline-flex; align-items: center; gap: 4px; }
.hm-wpi-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hm-wpi-dot--green { background: var(--tl-green); }
.hm-wpi-dot--blue  { background: var(--tl-blue); }
.hm-wpi-dot--amber { background: var(--tl-amber); }
.hm-wpi-dot--red   { background: var(--tl-red); }
.hm-wpi-dot--gap   { background: var(--tl-border); }

.hm-wpi-stats { font-size: 12.5px; color: var(--tl-text-secondary); margin-bottom: 12px; }
.hm-wpi-stats i { color: var(--tl-blue); margin-right: 4px; }

.hm-wpi-current {
  font-size: 13px;
  color: var(--tl-text);
  background: rgba(148, 163, 184, .10);
  border-radius: var(--tl-radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}

/* Phase 274 (CIO 2026-09-28) -- red strip under the owl row when the
   employee has an active run of missed weekly reports. */
.hm-wpi-missed-strip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tl-red);
  background: rgba(239, 68, 68, .10);
  border-radius: var(--tl-radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.hm-wpi-missed-strip i { margin-top: 2px; }
.hm-wpi-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  color: #ffffff !important;
  border: 0;
  border-radius: var(--tl-radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 20px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.hm-wpi-submit-btn:hover { transform: translateY(-1px); box-shadow: var(--tl-shadow-md); }

/* 2026-09-30 -- "Waiting For Your Decision" home card (buildMyDecisionsCard in
   Default.js), shown in place of the weekly performance cards. Prefix hm-dec-. */
.hm-dec-grid { margin-bottom: 24px; }
.hm-dec-card { display: flex; flex-direction: column; min-width: 0; }
.hm-dec-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.hm-dec-total { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hm-dec-total-num { font-size: 30px; font-weight: 800; line-height: 1; color: var(--tl-blue); }
.hm-dec-total-lbl { font-size: 13px; color: var(--tl-text-secondary); }
.hm-dec-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.hm-dec-chip--overdue { background: var(--tl-red-light); color: var(--tl-red); }
.hm-dec-chip--ok { background: var(--tl-green-light); color: var(--tl-green); }
.hm-dec-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.hm-dec-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--tl-border);
  border-radius: var(--tl-radius-sm);
  background: var(--tl-card-bg);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.hm-dec-row:hover,
.hm-dec-row:focus-visible {
  border-color: var(--tl-blue);
  box-shadow: var(--tl-shadow-md);
  transform: translateY(-1px);
  outline: none;
}
.hm-dec-row--overdue { border-left: 3px solid var(--tl-red); }
.hm-dec-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--tl-blue-light);
  color: var(--tl-blue);
  font-size: 15px;
}
.hm-dec-row--overdue .hm-dec-icon { background: var(--tl-red-light); color: var(--tl-red); }
.hm-dec-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hm-dec-label {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--tl-text);
  overflow-wrap: break-word;
}
.hm-dec-sub {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--tl-red);
}
.hm-dec-count {
  min-width: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--tl-text);
  background: rgba(148, 163, 184, .16);
  border-radius: 999px;
  padding: 3px 9px;
  flex-shrink: 0;
}
.hm-dec-chev { font-size: 11px; color: var(--tl-text-secondary); flex-shrink: 0; }
.hm-dec-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--tl-text-secondary);
  background: var(--tl-green-light);
  border-radius: var(--tl-radius-sm);
  padding: 16px;
  margin-bottom: 14px;
}
.hm-dec-empty i { color: var(--tl-green); font-size: 18px; }
.hm-dec-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff !important;
  border: 0;
  border-radius: var(--tl-radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 20px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.hm-dec-open-btn:hover { transform: translateY(-1px); box-shadow: var(--tl-shadow-md); }
@media (max-width: 480px) {
  .hm-dec-open-btn { align-self: stretch; justify-content: center; }
  .hm-dec-row { padding: 10px; gap: 10px; }
}

.hm-wpi-plan-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tl-text-secondary);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 8px;
}
.hm-wpi-plan-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--tl-text);
  background: rgba(148, 163, 184, .08);
  border-left: 3px solid var(--tl-green);
  border-radius: 0 var(--tl-radius-sm) var(--tl-radius-sm) 0;
  padding: 12px 14px;
  white-space: pre-wrap;
}
.hm-wpi-plan-meta { font-size: 11.5px; color: var(--tl-text-secondary); margin-top: 10px; }

/* Phase 274 (CIO 2026-09-28) -- plan card, PENDING (stale) state: the plan
   targeted a week that has gone by unreported (missed, on leave, or a
   public holiday), so it is shown as an open item instead of "the plan". */
.hm-wpi-plan-missed-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--tl-red);
  background: rgba(239, 68, 68, .10);
  border-radius: var(--tl-radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.hm-wpi-plan-missed-note i { margin-top: 2px; }
.hm-wpi-pending-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tl-amber);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 6px;
}
.hm-wpi-pending-sub { font-size: 12.5px; color: var(--tl-text-secondary); margin-bottom: 10px; }
.hm-wpi-pending-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--tl-text);
  background: rgba(245, 158, 11, .08);
  border-left: 3px solid var(--tl-amber);
  border-radius: 0 var(--tl-radius-sm) var(--tl-radius-sm) 0;
  padding: 12px 14px;
  white-space: pre-wrap;
}

/* Quick Access */
.tl-quick-section {
  margin-bottom: 24px;
}

.tl-quick-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--tl-text);
  margin: 0 0 12px;
}

.tl-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.tl-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  background: var(--tl-card-bg);
  border-radius: var(--tl-radius);
  box-shadow: var(--tl-shadow);
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  color: var(--tl-text);
}
.tl-quick-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--tl-shadow-md);
  color: var(--tl-text);
  text-decoration: none;
}

.tl-quick-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 20px;
}
.tl-quick-icon--blue { background: var(--tl-blue-light); color: var(--tl-blue); }
.tl-quick-icon--green { background: var(--tl-green-light); color: var(--tl-green); }
.tl-quick-icon--amber { background: var(--tl-amber-light); color: var(--tl-amber); }
.tl-quick-icon--purple { background: var(--tl-purple-light); color: var(--tl-purple); }
.tl-quick-icon--red { background: var(--tl-red-light); color: var(--tl-red); }

.tl-quick-label {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

/* Status Badge */
.tl-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.tl-status-badge--ok { background: var(--tl-green-light); color: var(--tl-green); }
.tl-status-badge--warning { background: var(--tl-amber-light); color: var(--tl-amber); }
.tl-status-badge--danger { background: var(--tl-red-light); color: var(--tl-red); }

/* Auto Deduction Alert */
.tl-alert-card {
  background: var(--tl-card-bg);
  border: 1px solid var(--tl-red);
  border-radius: var(--tl-radius);
  padding: 28px;
  margin-bottom: 20px;
}

.tl-alert-icon {
  font-size: 48px;
  color: var(--tl-red);
  text-align: center;
  margin-bottom: 16px;
  animation: tl-pulse 2s infinite;
}

@keyframes tl-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* Commission Schema */
#tlc-commission { margin-bottom: 24px; }
.tlc-wrap { max-width: 100%; }
.tlc-title h1 { font-size: 18px; font-weight: 700; color: var(--tl-text); margin: 0 0 12px; }
.tlc-card { background: var(--tl-card-bg); border-radius: var(--tl-radius); box-shadow: var(--tl-shadow); overflow: hidden; }
.tlc-table-wrap { overflow-x: auto; }
.tlc-table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tlc-table-wrap thead { background: #f8fafc; }
.tlc-table-wrap th { padding: 10px 12px; font-weight: 600; color: var(--tl-text-secondary); text-align: center; border-bottom: 2px solid var(--tl-border); }
.tlc-table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--tl-border); color: var(--tl-text); }
.tlc-center { text-align: center; }
.tlc-right { text-align: right; }
.tlc-mono { font-family: 'SF Mono', Monaco, monospace; font-size: 12px; }
.tlc-muted { color: var(--tl-text-secondary); }
.tlc-pct { color: var(--tl-green); font-weight: 600; }
.tlc-pcw { color: var(--tl-blue); font-weight: 500; }
.tlc-group-head td { background: #f1f5f9; font-weight: 700; color: var(--tl-text); font-size: 14px; }

/* Super Sales Hero — Animated */
.tl-sales-hero { margin-bottom: 24px; }
.tl-hero-card {
  position: relative;
  border-radius: var(--tl-radius);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #0c1222, #1a1040, #0c1222);
  border: 1px solid rgba(234,179,8,.2);
  box-shadow: 0 0 40px rgba(234,179,8,.08), 0 4px 24px rgba(0,0,0,.3);
}
/* Animated gradient background */
.tl-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(234,179,8,.06) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: tl-hero-shimmer 4s ease-in-out infinite;
}
@keyframes tl-hero-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
/* Floating particles */
.tl-hero-particles { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.tl-hero-particles span {
  position: absolute; display: block; border-radius: 50%;
  background: rgba(234,179,8,.3);
  animation: tl-hero-float linear infinite;
}
.tl-hero-particles span:nth-child(1) { width: 4px; height: 4px; left: 10%; bottom: -10%; animation-duration: 8s; animation-delay: 0s; }
.tl-hero-particles span:nth-child(2) { width: 6px; height: 6px; left: 25%; bottom: -10%; animation-duration: 10s; animation-delay: 1s; }
.tl-hero-particles span:nth-child(3) { width: 3px; height: 3px; left: 40%; bottom: -10%; animation-duration: 7s; animation-delay: 2s; }
.tl-hero-particles span:nth-child(4) { width: 5px; height: 5px; left: 55%; bottom: -10%; animation-duration: 9s; animation-delay: .5s; }
.tl-hero-particles span:nth-child(5) { width: 4px; height: 4px; left: 70%; bottom: -10%; animation-duration: 11s; animation-delay: 1.5s; }
.tl-hero-particles span:nth-child(6) { width: 7px; height: 7px; left: 82%; bottom: -10%; animation-duration: 8s; animation-delay: 3s; }
.tl-hero-particles span:nth-child(7) { width: 3px; height: 3px; left: 90%; bottom: -10%; animation-duration: 12s; animation-delay: 0s; }
.tl-hero-particles span:nth-child(8) { width: 5px; height: 5px; left: 5%; bottom: -10%; animation-duration: 9s; animation-delay: 2.5s; }
@keyframes tl-hero-float {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: .6; }
  100% { transform: translateY(-800px) rotate(720deg); opacity: 0; }
}
/* Trophy with float + glow */
.tl-hero-trophy {
  position: relative; z-index: 1; flex-shrink: 0;
  font-size: 64px; line-height: 1;
  animation: tl-hero-bounce 3s ease-in-out infinite;
  filter: drop-shadow(0 0 16px rgba(234,179,8,.4));
}
@keyframes tl-hero-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
/* Content */
.tl-hero-content { position: relative; z-index: 1; flex: 1; }
/* Badge */
.tl-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(234,179,8,.2), rgba(234,179,8,.08));
  border: 1px solid rgba(234,179,8,.3);
  padding: 5px 14px; border-radius: 20px; margin-bottom: 10px;
  font-size: 10px; font-weight: 800; color: #eab308;
  letter-spacing: 1.5px;
  animation: tl-hero-glow 2s ease-in-out infinite alternate;
}
.tl-hero-badge-star { font-size: 14px; animation: tl-hero-spin 3s linear infinite; display: inline-block; }
@keyframes tl-hero-spin { 0%{transform:rotate(0deg)} 100%{transform:rotate(360deg)} }
@keyframes tl-hero-glow {
  0% { box-shadow: 0 0 8px rgba(234,179,8,.15); }
  100% { box-shadow: 0 0 20px rgba(234,179,8,.3), 0 0 40px rgba(234,179,8,.1); }
}
/* Title */
.tl-hero-name {
  font-size: 26px; font-weight: 800; margin: 0 0 4px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #eab308);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tl-hero-sub { font-size: 13px; color: rgba(255,255,255,.5); margin: 0 0 16px; }
/* Stats */
.tl-hero-stats {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,.04); border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  padding: 12px 0; display: inline-flex;
}
.tl-hero-stat { padding: 0 24px; text-align: center; }
.tl-hero-stat-val { font-size: 20px; font-weight: 800; color: #fbbf24; }
.tl-hero-stat-lbl { font-size: 10px; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.tl-hero-stat-divider { width: 1px; height: 32px; background: rgba(255,255,255,.1); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .tl-sidebar {
    transform: translateX(-100%);
    width: var(--tl-sidebar-width) !important;
  }
  .tl-sidebar--open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.3);
  }
  .tl-sidebar--collapsed:hover {
    width: var(--tl-sidebar-collapsed) !important;
    box-shadow: none;
  }
  .tl-main {
    margin-left: 0 !important;
  }
  .tl-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .tl-welcome-row { flex-direction: column; text-align: center; }
  .tl-welcome-chips { justify-content: center; }
  .tl-info-grid { grid-template-columns: 1fr; }
  .hm-wpi-grid { grid-template-columns: 1fr; }
  .hm-wpi-ring-wrap { width: 80px; height: 80px; }
  .hm-wpi-ring { width: 80px; height: 80px; }
  .hm-wpi-ring-score { font-size: 22px; }
  .tl-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .tl-hero-card { flex-direction: column; text-align: center; padding: 24px 20px; }
  .tl-hero-trophy { font-size: 48px; }
  .tl-hero-stats { flex-direction: column; gap: 8px; width: 100%; }
  .tl-hero-stat-divider { width: 60%; height: 1px; }
}

/* ================================================================
   PRESERVED LEGACY STYLES (for VB code-behind compatibility)
   ================================================================ */
.glass {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.1);
}

.smallfont { font-size: 11px; }

.blink_me {
  animation: tl-pulse 1.5s infinite;
}

.cred { color: var(--tl-red); }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* OTP modal legacy (if old modal is still used) */
.otp_input {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 6px;
  height: 50px;
}

/* Keep badge style */
.badge {
  font-size: x-small;
  position: relative;
  font-weight: 300 !important;
}

/* Keep cell styles for any legacy usage */
.cell_name { color: black; font-weight: bolder; display: block; }
.cell_desc { color: grey; font-size: smaller; display: block; }
.redtext { color: red !important; }
.greentext { color: green !important; }

/* TBP (legacy badge card) - keep in case broker session uses it */
.tbp-scope { max-width: 100%; margin: 0 auto; padding: 0 16px; }
.tbp-card { background: rgba(255,255,255,.06); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 24px; }
.tbp-brand { display: flex; align-items: center; gap: 14px; }
.tbp-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; border: 2px solid rgba(255,255,255,.15); }
.tbp-title { font-size: 18px; font-weight: 700; color: #fff; margin: 0; }
.tbp-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.tbp-badge svg { width: 12px; height: 12px; fill: currentColor; }
.tbp-badge--ok { background: rgba(22,163,74,.15); color: #4ade80; }
.tbp-badge--bad { background: rgba(239,68,68,.15); color: #f87171; }
.tbp-badge--pending { background: rgba(234,179,8,.15); color: #fbbf24; }
.tbp-list { margin: 16px 0 0; padding: 0; }
.tbp-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.tbp-row:last-child { border-bottom: none; }
.tbp-term { font-size: 12px; color: rgba(255,255,255,.45); font-weight: 500; }
.tbp-def { font-size: 13px; color: rgba(255,255,255,.85); font-weight: 600; text-align: right; }

/* Legacy icon styles (preserve for backward compat) */
.icon95 { width: 95px; height: 95px; max-height: 95px; max-width: 95px; text-align: center; vertical-align: middle; margin: auto; }
.containerico { margin: 0 auto; padding: 20px; width: 120px; height: 120px; text-align: center; }
.containerico h2 { text-align: center; width: 95px; height: 20px; font-size: smaller; color: white; font-weight: 200; }
.ios2 { position: relative; float: left; width: 95px; height: 95px; max-height: 95px; max-width: 95px; text-decoration: wavy; text-align: center; }

/* ============================================================
   Sales Commission Blueprint — home page (cmh- prefix)
   Replaces the legacy tlc-* table. Modern tier-ladder cards with
   beneficiary split bars.
   ============================================================ */
#cmh-commission.cmh-wrap { margin-top: 28px; margin-bottom: 24px; }

.cmh-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.cmh-header-left { display: flex; align-items: center; gap: 14px; }
.cmh-header-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
  background: linear-gradient(135deg, #378ADD, #185FA5);
  box-shadow: 0 8px 20px rgba(55,138,221,.25);
}
.cmh-header h2 {
  margin: 0; font-size: 20px; font-weight: 700;
  color: #0f172a; letter-spacing: -.3px;
}
.cmh-header p { margin: 2px 0 0; font-size: 13px; color: #64748b; }

.cmh-header-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: #E6F1FB; color: #185FA5; border: 1px solid #bcd8f1;
}
.cmh-header-chip.cmh-chip-broker {
  background: #FAEEDA; color: #854F0B; border-color: #edc888;
}

/* Block per scheme type */
.cmh-block {
  background: #fff; border-radius: 16px; overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(15,23,42,.06);
  margin-bottom: 16px;
  animation: cmh-fade-up .4s ease-out both;
}
@keyframes cmh-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cmh-block-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid #e2e8f0;
}
.cmh-block-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: #fff; border: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  color: #378ADD; font-size: 15px;
}
.cmh-block-title h3 {
  margin: 0; font-size: 16px; font-weight: 700; color: #1e293b;
}

.cmh-policies {
  padding: 18px; display: flex; flex-direction: column; gap: 16px;
}

.cmh-policy {
  background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 16px 18px;
  transition: box-shadow .2s, transform .2s;
}
.cmh-policy:hover {
  box-shadow: 0 6px 18px rgba(15,23,42,.08);
}

.cmh-policy-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.cmh-policy-title h4 {
  margin: 0 0 4px; font-size: 15px; font-weight: 700; color: #1e293b;
}
.cmh-policy-date {
  font-size: 12px; color: #64748b;
  display: inline-flex; align-items: center; gap: 6px;
}
.cmh-team-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
  color: #5B21B6; border: 1px solid #C4B5FD;
}

/* Tier ladder */
.cmh-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.cmh-tier {
  position: relative;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 14px;
  transition: transform .2s, box-shadow .2s;
}
.cmh-tier:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(15,23,42,.1);
}
.cmh-tier-top {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #facc15;
}
.cmh-tier-top::before {
  content: 'TOP TIER'; position: absolute; top: -10px; right: 12px;
  background: #F59E0B; color: #fff;
  font-size: 9px; font-weight: 800; padding: 3px 8px;
  border-radius: 999px; letter-spacing: .5px;
}

.cmh-tier-badge {
  font-size: 10px; font-weight: 700; color: #64748b;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px;
}
.cmh-tier-top .cmh-tier-badge { color: #92400E; }

.cmh-tier-range {
  font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 8px;
}

.cmh-tier-pct {
  font-size: 28px; font-weight: 800; color: #0d9488;
  letter-spacing: -.5px; line-height: 1; margin-bottom: 8px;
}
.cmh-tier-top .cmh-tier-pct { color: #B45309; }
.cmh-pct-sign {
  font-size: 16px; font-weight: 600; margin-left: 2px; color: #64748b;
}
.cmh-tier-top .cmh-pct-sign { color: #92400E; }

.cmh-tier-bonus {
  font-size: 11px; font-weight: 600;
  color: #a855f7; background: #F5F3FF;
  padding: 3px 8px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 4px;
  margin-bottom: 8px;
}

.cmh-tier-split {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}

.cmh-split-bar {
  width: 100%; height: 6px;
  border-radius: 999px; overflow: hidden;
  background: #e2e8f0; display: flex; margin-bottom: 8px;
}
.cmh-seg { height: 100%; display: block; }
.cmh-seg-self { background: #378ADD; }
.cmh-seg-mgr  { background: #8B5CF6; }
.cmh-seg-head { background: #F59E0B; }
.cmh-seg-mkt  { background: #EC4899; }

.cmh-split-chips {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.cmh-chip {
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
  letter-spacing: .2px;
}
.cmh-chip-self { background: #E6F1FB; color: #185FA5; }
.cmh-chip-mgr  { background: #EDE9FE; color: #5B21B6; }
.cmh-chip-head { background: #FEF3C7; color: #92400E; }
.cmh-chip-mkt  { background: #FCE7F3; color: #9D174D; }

.cmh-footnote {
  margin-top: 18px; padding: 12px 16px;
  background: #f1f5f9; border-radius: 10px;
  font-size: 12px; color: #64748b; font-style: italic;
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px;
}

/* ══════════════════════════════════════════════════════════════════
   PHASE 16 — DARK MODE  (Default.aspx shell)
   Re-maps the --tl-* tokens used in this file plus a handful of
   places that reference hex colors directly. The sidebar already
   was dark, so we keep its identity but darken to match the new
   slate-900 base.
   ══════════════════════════════════════════════════════════════════ */
html[data-theme="dark"] {
  --tl-bg: #0f172a;
  --tl-card-bg: #1e293b;
  --tl-text: #e2e8f0;
  --tl-text-secondary: #94a3b8;
  --tl-border: #334155;
  --tl-sidebar-bg: #0b1424;
  --tl-sidebar-hover: #1e293b;
  --tl-sidebar-active: #2563eb;
  --tl-sidebar-text: #94a3b8;
  --tl-sidebar-text-active: #ffffff;
  --tl-blue-light: rgba(37,99,235,.18);
  --tl-green-light: rgba(22,163,74,.18);
  --tl-amber-light: rgba(217,119,6,.18);
  --tl-red-light: rgba(220,38,38,.18);
  --tl-purple-light: rgba(124,58,237,.18);
  --tl-shadow: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --tl-shadow-md: 0 4px 6px rgba(0,0,0,.4), 0 2px 4px rgba(0,0,0,.3);
  --tl-shadow-lg: 0 10px 15px rgba(0,0,0,.4), 0 4px 6px rgba(0,0,0,.3);
}

/* Notification panel: hardcoded white bg + light item hovers — re-tint */
html[data-theme="dark"] .tl-notif-panel {
  background: var(--tl-card-bg) !important;
  border-color: var(--tl-border) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,.55), 0 4px 12px rgba(0,0,0,.35) !important;
}
html[data-theme="dark"] .tl-notif-header {
  border-bottom-color: var(--tl-border) !important;
  color: var(--tl-text) !important;
}
html[data-theme="dark"] .tl-notif-item { border-bottom-color: var(--tl-border) !important; color: var(--tl-text) !important; }
html[data-theme="dark"] .tl-notif-item:hover { background: rgba(255,255,255,.04) !important; }
html[data-theme="dark"] .tl-notif-item.tl-notif-unread { background: rgba(96,165,250,.08) !important; }
html[data-theme="dark"] .tl-notif-item.tl-notif-unread:hover { background: rgba(96,165,250,.14) !important; }
html[data-theme="dark"] .tl-notif-title { color: var(--tl-text) !important; }
html[data-theme="dark"] .tl-notif-time, html[data-theme="dark"] .tl-notif-empty small { color: var(--tl-text-secondary) !important; }

/* Top bar surface */
html[data-theme="dark"] .tl-topbar {
  background: var(--tl-card-bg) !important;
  border-bottom-color: var(--tl-border) !important;
  color: var(--tl-text) !important;
}
html[data-theme="dark"] .tl-topbar-toggle,
html[data-theme="dark"] .tl-topbar-breadcrumb,
html[data-theme="dark"] .tl-topbar-notif { color: var(--tl-text-secondary) !important; }
html[data-theme="dark"] .tl-topbar-toggle:hover,
html[data-theme="dark"] .tl-topbar-notif:hover {
  background: rgba(255,255,255,.06) !important;
  color: var(--tl-text) !important;
}

/* Generic dashboard card, KPI, tile that hardcoded #fff */
html[data-theme="dark"] .tl-card,
html[data-theme="dark"] .tl-kpi,
html[data-theme="dark"] .tl-stat-card,
html[data-theme="dark"] .cmh-tier-card {
  background: var(--tl-card-bg) !important;
  color: var(--tl-text) !important;
  border-color: var(--tl-border) !important;
}

/* Footnote / muted info strips */
html[data-theme="dark"] .cmh-footnote {
  background: rgba(255,255,255,.04) !important;
  color: var(--tl-text-secondary) !important;
}

/* CommHomeschema split-bar background */
html[data-theme="dark"] .cmh-split-bar { background: rgba(255,255,255,.08) !important; }
html[data-theme="dark"] .cmh-tier-split { border-top-color: var(--tl-border) !important; }

/* Text overrides where dark theme still shows light secondary text */
html[data-theme="dark"] .text-muted { color: var(--tl-text-secondary) !important; }
html[data-theme="dark"] small { color: var(--tl-text-secondary); }

/* Avatar fallback boxes / search inputs */
html[data-theme="dark"] .tl-topbar input[type="search"],
html[data-theme="dark"] .tl-topbar input[type="text"] {
  background: rgba(255,255,255,.04) !important;
  border-color: var(--tl-border) !important;
  color: var(--tl-text) !important;
}

/* Long menu names (owner's note 3 Nov 2026, sweep 2.4): the name ends in an ellipsis (the item's title holds it whole)
   and the count badge or the Attention dot after it keeps its place instead of being pushed past the sidebar's edge;
   a long group label ends in an ellipsis too. The collapsed sidebar still hides the text (its own rules above). */
.tl-nav-item > span { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; }
.tl-sidebar-nav .tl-nav-item > span > span.tl-nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-nav-badge { flex-shrink: 0; }
.tl-nav-group-label { overflow: hidden; text-overflow: ellipsis; }
/* Employee of the Week home card (2026-11-18, Default.js tlRenderWeekAward). Navy + gold, every text white. */
.eotw-card { position: relative; overflow: hidden; margin: 0 0 18px; padding: 20px 22px 18px; border-radius: 16px; background: linear-gradient(135deg, #0b1f44 0%, #132c5c 55%, #1b2f55 100%); border: 1px solid #c9a227; box-shadow: 0 6px 22px rgba(11, 31, 68, 0.28); color: #ffffff !important; }
.eotw-card--me { border-width: 2px; box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.35), 0 8px 26px rgba(11, 31, 68, 0.35); }
.eotw-card * { color: #ffffff !important; }
.eotw-shine { position: absolute; top: 0; left: -60%; width: 45%; height: 100%; background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0) 100%); transform: skewX(-18deg); animation: eotw-shine 5.5s ease-in-out infinite; pointer-events: none; }
@keyframes eotw-shine { 0% { left: -60%; } 40% { left: 130%; } 100% { left: 130%; } }
.eotw-head { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.eotw-head-icon { width: 38px; height: 38px; border-radius: 11px; background: rgba(245, 197, 66, 0.18); border: 1px solid rgba(245, 197, 66, 0.55); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.eotw-card .eotw-head-icon i, .eotw-card .eotw-crown i, .eotw-card .eotw-chip i, .eotw-card .eotw-me i { color: #f5c542 !important; }
.eotw-head-text { min-width: 0; }
.eotw-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #ffffff !important; }
.eotw-week { font-size: 12.5px; opacity: 0.8; color: #ffffff !important; }
.eotw-why { font-size: 12px; opacity: 0.85; margin-top: 2px; color: #ffffff !important; }
.eotw-main { position: relative; display: flex; align-items: center; gap: 20px; }
.eotw-ring { position: relative; flex-shrink: 0; padding: 4px; border-radius: 50%; background: linear-gradient(135deg, #f5c542, #b8860b, #fde68a); }
.eotw-crown { position: absolute; top: -10px; right: -4px; width: 30px; height: 30px; border-radius: 50%; background: #0b1f44; border: 2px solid #f5c542; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.eotw-face { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; background: #1e3a6e; flex-shrink: 0; }
.eotw-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.eotw-init { font-weight: 800; color: #ffffff !important; }
.eotw-face--big { width: 96px; height: 96px; border: 3px solid #0b1f44; }
.eotw-face--big .eotw-init { font-size: 30px; }
.eotw-face--48 { width: 48px; height: 48px; border: 2px solid rgba(245, 197, 66, 0.6); }
.eotw-face--48 .eotw-init { font-size: 16px; }
.eotw-face--32 { width: 32px; height: 32px; border: 1px solid rgba(245, 197, 66, 0.5); }
.eotw-face--32 .eotw-init { font-size: 12px; }
.eotw-who { flex: 1; min-width: 0; }
.eotw-name { font-size: 24px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; color: #ffffff !important; }
.eotw-role { font-size: 13.5px; opacity: 0.85; margin-top: 2px; overflow-wrap: anywhere; color: #ffffff !important; }
.eotw-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.eotw-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: rgba(245, 197, 66, 0.16); border: 1px solid rgba(245, 197, 66, 0.45); font-size: 12px; font-weight: 700; color: #ffffff !important; }
.eotw-me { position: relative; margin-top: 14px; padding: 9px 13px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); font-size: 13px; font-weight: 700; color: #ffffff !important; }
.eotw-me--win { background: rgba(245, 197, 66, 0.2); border: 1px solid rgba(245, 197, 66, 0.55); font-size: 14px; }
.eotw-sub { position: relative; margin: 16px 0 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; color: #ffffff !important; }
.eotw-top { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.eotw-top-item, .eotw-recent-item { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); }
.eotw-place { position: absolute; top: 4px; left: 44px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #0b1f44; border: 1px solid #f5c542; font-size: 11px; font-weight: 800; line-height: 16px; text-align: center; color: #ffffff !important; }
.eotw-top-text { min-width: 0; flex: 1; }
.eotw-top-name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ffffff !important; }
.eotw-top-role { font-size: 11.5px; opacity: 0.75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ffffff !important; }
.eotw-recent { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.eotw-recent-item { padding: 6px 9px; background: rgba(255, 255, 255, 0.04); }
.eotw-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.eotw-confetti span { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; opacity: 0; animation-name: eotw-fall; animation-timing-function: ease-in; animation-fill-mode: forwards; }
@keyframes eotw-fall { 0% { opacity: 1; margin-top: 0; } 100% { opacity: 0; margin-top: 360px; } }
@media (max-width: 600px) {
    .eotw-main { flex-direction: column; text-align: center; }
    .eotw-chips { justify-content: center; }
    .eotw-name { font-size: 20px; }
}

/* ================================================================
   Broker home cards (owner note part 8, "I run my company from my phone"): the account manager, My money, the first
   days checklist and the WhatsApp switch. Phone first: one column at 375px, 44px touch targets, nothing wider than
   the screen (long e-mails wrap).
   ================================================================ */
.bkh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin-bottom: 16px;
  min-width: 0;
}
.bkh-card { min-width: 0; overflow-wrap: anywhere; }
.bkh-sub { font-weight: 500; color: var(--tl-text-secondary); font-size: 12px; }

.bkh-am-name { font-size: 18px; font-weight: 700; color: var(--tl-text); margin: -6px 0 12px; }
.bkh-actions { display: flex; flex-direction: column; gap: 8px; }
.bkh-btn {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 10px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 600; text-decoration: none !important;
  min-width: 0; overflow-wrap: anywhere;
}
.bkh-btn i { font-size: 16px; flex-shrink: 0; }
.bkh-btn span { min-width: 0; }
.bkh-btn--call { background: #EAF3FC; color: #1F6FBF !important; }
.bkh-btn--mail { background: #F1F0FB; color: #5B4BC4 !important; }
.bkh-btn--wa { background: #E7F8EE; color: #128C4A !important; }

.bkh-money-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bkh-fig { border-radius: 10px; padding: 10px 12px; min-width: 0; }
.bkh-fig span { display: block; font-size: 12px; font-weight: 600; color: var(--tl-text-secondary); }
.bkh-fig b { display: block; font-size: 17px; color: var(--tl-text); overflow-wrap: anywhere; }
.bkh-fig--earned { background: #E7F8EE; }
.bkh-fig--paid { background: #EAF3FC; }
.bkh-fig--due { background: #FEF3E2; }
.bkh-fig--exp { background: #F1F0FB; }
.bkh-link {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 44px; margin-top: 12px; padding: 0 4px; border: 0; background: transparent;
  color: #1F6FBF; font-weight: 700; font-size: 14px; cursor: pointer;
}

.bkh-check-sub { font-size: 13px; color: var(--tl-text-secondary); margin: -8px 0 8px; }
.bkh-bar { height: 6px; border-radius: 3px; background: var(--tl-border); overflow: hidden; margin-bottom: 8px; }
.bkh-bar span { display: block; height: 100%; background: #10B981; border-radius: 3px; transition: width .4s ease; }
.bkh-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 44px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--tl-border);
  background: transparent; text-align: left; color: var(--tl-text); font-size: 14px;
}
.bkh-item:last-child { border-bottom: 0; }
.bkh-item--go { cursor: pointer; }
.bkh-item--go:hover { background: rgba(55, 138, 221, .06); }
.bkh-tick {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #FEF3E2; color: #F59E0B; font-size: 8px;
}
.bkh-item--done .bkh-tick { background: #10B981; color: #ffffff; font-size: 12px; }
.bkh-item--done .bkh-item-text b { color: var(--tl-text-secondary); text-decoration: line-through; }
.bkh-item-text { flex: 1 1 auto; min-width: 0; }
.bkh-item-text b { display: block; font-weight: 600; }
.bkh-item-text small { display: block; color: #B45309; font-size: 12px; }
.bkh-chev { color: var(--tl-text-secondary); flex-shrink: 0; }

.bkh-wa-row { display: flex; align-items: center; gap: 14px; }
.bkh-wa-text { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--tl-text-secondary); }
.bkh-switch {
  position: relative; flex-shrink: 0; width: 56px; height: 44px; border: 0; padding: 0;
  background: transparent; cursor: pointer;
}
.bkh-switch::before {
  content: ""; position: absolute; left: 2px; right: 2px; top: 9px; height: 26px; border-radius: 13px;
  background: #CBD5E1; transition: background .2s ease;
}
.bkh-switch-knob {
  position: absolute; top: 12px; left: 5px; width: 20px; height: 20px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s ease;
}
.bkh-switch--on::before { background: #25D366; }
.bkh-switch--on .bkh-switch-knob { transform: translateX(26px); }
.bkh-switch.is-busy { opacity: .6; cursor: progress; }

/* a status message above the broker home cards (the agreement he owes or must renew) */
.bkh-status {
  display: flex; align-items: center; gap: 12px; min-width: 0; margin-bottom: 12px; padding: 12px 14px;
  border-radius: 12px; border: 1px solid #F5C77E; border-left: 4px solid #F59E0B; background: #FEF3E2; color: #7C4A03;
}
.bkh-status-icon { font-size: 18px; color: #D97706; flex-shrink: 0; }
.bkh-status-text { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.bkh-status-go {
  flex-shrink: 0; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: #F59E0B;
  color: #ffffff !important; font-weight: 700; font-size: 14px; cursor: pointer;
}
.bkh-status-go:hover { background: #D97706; }

/* a broker's notice in the bell carries its text under the title */
.tl-notif-text { font-size: 12px; color: var(--tl-text-secondary); margin-top: 2px; overflow-wrap: anywhere; }

@media (max-width: 480px) {
  .bkh-grid { gap: 12px; }
  .bkh-fig b { font-size: 15px; }
  .bkh-status { flex-wrap: wrap; }
  .bkh-status-go { width: 100%; }
}
