/* ==========================================================================
   IntegrityLMS brand layer — loaded last on every app page.

   THE SYSTEM, IN FOUR RULES
     1. Content is neutral graphite. Surfaces carry no colour of their own, so
        hierarchy comes from elevation: canvas < card < raised.
     2. Colour means something. Blue is for the action and the current place;
        green, amber and red are status. Nothing is blue merely for decoration.
     3. The brand lives in the sidebar. It is the one navy panel, so it reads
        as the product frame and the work beside it reads as the work.
     4. Two typefaces. Inter for everything you read; Inter Tight for headings
        and figures. Text is never dimmer than --text-tertiary.

   Everything below re-points the design tokens the app is built on, so the
   existing screens follow without being rewritten. Dark tokens apply on
   screen only: print keeps the original light values.
   ========================================================================== */
@font-face { font-family: 'Inter'; src: url(../assets/fonts/inter-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(../assets/fonts/inter-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(../assets/fonts/inter-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(../assets/fonts/inter-latin-700-normal.woff2) format('woff2'); font-weight: 700 900; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url(../assets/fonts/inter-tight-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(../assets/fonts/instrument-serif-latin-400-italic.woff2) format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --navy-950: #081226;
  --navy-900: #0b1833;
  --navy-800: #0f2147;
  --navy-700: #16305f;
  --navy-600: #1f4283;
  --navy-500: #2f5aa8;
  --navy-text: #cfdaee;
  --navy-text-dim: #8fa3c8;
  --navy-text-bright: #ffffff;

  --accent-50: #eff5ff;
  --accent-100: #dbe8fe;
  --accent-200: #bcd4fd;
  --accent-400: #60a5fa;
  --accent-500: #2563eb;
  --accent-600: #1d4ed8;
  --accent-700: #1e40af;
  --accent-ink: #172e6e;

  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter Tight', 'Inter', sans-serif;
  --font-body: var(--font-base);
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;

  /* graphite, used directly by the command-canvas pages */
  --ix-canvas: #0a0c10;
  --ix-card: #12151b;
  --ix-raised: #181c23;
  --ix-line: rgba(255, 255, 255, 0.08);
  --ix-line-strong: rgba(255, 255, 255, 0.14);
  --ix-text: #f3f5f8;
  --ix-text-2: #c2c9d4;
  --ix-text-3: #98a1b0;
  --ix-blue: #3b82f6;
  --ix-blue-text: #8ab4ff;
  --ix-good: #34d399;
  --ix-warn: #fbbf24;
  --ix-bad: #f87171;
}

/* ==========================================================================
   Sidebar — the brand panel
   ========================================================================== */
.sidebar {
  background:
    radial-gradient(340px 220px at 0% 0%, rgba(59, 130, 246, 0.28), transparent 70%),
    linear-gradient(180deg, #10244d 0%, #0c1a38 46%, #081226 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.35);
}
.sidebar-brand { gap: 12px; padding-top: 18px; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.sidebar-brand .brand-mark {
  width: 42px; height: 42px; border-radius: 12px; background: none; padding: 0; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 8px 22px rgba(0, 0, 0, 0.4);
}
.sidebar-brand .brand-mark svg { width: 100%; height: 100%; display: block; }
.sidebar-brand .brand-title { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1; letter-spacing: -0.03em; color: #fff; }
.sidebar-brand .brand-title b { font-weight: 700; background: linear-gradient(95deg, #7db4ff 10%, #b9a5ff 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sidebar-brand .brand-by { margin-top: 6px; font: 600 8.5px/1 var(--font-base); letter-spacing: 0.26em; text-transform: uppercase; color: #8fa3c8; white-space: nowrap; }
.sidebar-brand .brand-by i { font-style: normal; color: #b6cdf6; }
.sidebar-org {
  display: flex; align-items: center; gap: 9px; margin: 12px 14px 2px; padding: 9px 11px; border-radius: 10px;
  font: 600 12.5px/1.2 var(--font-base); color: #e3ebf9; background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.09);
}
.sidebar-org i { font-size: 11px; color: #8fa3c8; }
.sidebar-org .brand-sub { color: inherit; font-size: inherit; letter-spacing: 0; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.app-shell.sidebar-collapsed .sidebar-org { display: none; }

.sidebar-nav { padding: 14px 12px; }
.nav-section + .nav-section { margin-top: 18px; }
.nav-section-label { font: 700 10.5px/1 var(--font-base); letter-spacing: 0.14em; color: #7f95bd; margin-bottom: 8px; }
.sidebar-nav a, .sidebar-nav button.nav-link {
  padding: 9px 11px; border-radius: 9px; font: 500 13.5px/1.25 var(--font-base); color: #cfdaee;
  transition: background 0.14s ease, color 0.14s ease;
}
.sidebar-nav a i, .sidebar-nav button.nav-link i { font-size: 14px; color: #8fa3c8; }
.sidebar-nav a:hover, .sidebar-nav button.nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar-nav a:hover i, .sidebar-nav button.nav-link:hover i { color: #cfe0ff; }
.sidebar-nav a.active {
  background: linear-gradient(180deg, #3b82f6, #2563eb); color: #fff; font-weight: 600;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 8px 20px rgba(13, 42, 110, 0.6);
}
.sidebar-nav a.active i { color: #fff; }
.nav-item-badge { background: rgba(0, 0, 0, 0.28); color: #e3ebf9; border: 1px solid rgba(255, 255, 255, 0.1); font-weight: 600; }
.sidebar-nav a.active .nav-item-badge { background: rgba(255, 255, 255, 0.2); border-color: transparent; color: #fff; }
.nav-item-new { margin-left: auto; font: 700 9px/1 var(--font-base); letter-spacing: 0.08em; padding: 3px 6px; border-radius: 999px; color: #0b1833; background: #c9bcff; }
.sidebar-nav a.active .nav-item-new { background: #fff; color: #1d4ed8; }
.app-shell.sidebar-collapsed .nav-item-new { display: none; }
.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, 0.08); background: rgba(0, 0, 0, 0.2); }
.sidebar-user .user-name { color: #fff; font-weight: 600; }
.sidebar-user .user-role { color: #8fa3c8; }
.sidebar-footer-collapse { color: #b6c6e3; border-color: rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); }

/* ==========================================================================
   Content — neutral graphite, on screen
   ========================================================================== */
@media screen {
  body {
    --surface-app: #0a0c10;
    --surface-card: #12151b;
    --surface-muted: #181c23;
    --surface-hover: #1e232c;
    --surface-sunken: #0d0f14;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-default: rgba(255, 255, 255, 0.13);
    --border-strong: rgba(255, 255, 255, 0.22);
    --text-primary: #f3f5f8;
    --text-secondary: #c2c9d4;
    --text-tertiary: #98a1b0;
    --accent-50: rgba(59, 130, 246, 0.13);
    --accent-100: rgba(59, 130, 246, 0.22);
    --accent-200: rgba(96, 165, 250, 0.4);
    --accent-700: #8ab4ff;
    --accent-ink: #dbe7ff;
    --emerald-50: rgba(52, 211, 153, 0.12);
    --emerald-100: rgba(52, 211, 153, 0.22);
    --emerald-600: #34d399;
    --emerald-700: #6ee7b7;
    --amber-50: rgba(251, 191, 36, 0.12);
    --amber-100: rgba(251, 191, 36, 0.22);
    --amber-600: #fbbf24;
    --amber-700: #fcd34d;
    --red-50: rgba(248, 113, 113, 0.12);
    --red-100: rgba(248, 113, 113, 0.24);
    --red-600: #f87171;
    --red-700: #fca5a5;
    --slate-50: rgba(255, 255, 255, 0.06);
    --slate-100: rgba(255, 255, 255, 0.1);
    --slate-500: #a4adba;
    --slate-600: #c2c9d4;
    --shadow-xs: none;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
    background: #0a0c10;
    color: var(--text-primary);
    color-scheme: dark;
    font-family: var(--font-base);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  .main-col { background: linear-gradient(180deg, #0e1116 0, #0a0c10 320px); }
  .app-header {
    background: rgba(10, 12, 16, 0.82);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }
  .breadcrumb-trail { color: var(--text-tertiary); font: 600 11px/1 var(--font-base); letter-spacing: 0.08em; }
  .page-title-header { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }
  .header-search, .filter-trigger, .icon-btn, .header-user, .sidebar-toggle-btn, .mobile-menu-btn {
    background: #12151b; border-color: rgba(255, 255, 255, 0.1); color: var(--text-secondary);
  }
  .header-search:hover, .icon-btn:hover, .header-user:hover, .filter-trigger:hover { background: #181c23; border-color: rgba(255, 255, 255, 0.18); }
  .search-placeholder { color: var(--text-tertiary); }
  .user-name-sm { color: var(--text-primary); font-weight: 600; }
  .user-role-sm { color: var(--text-tertiary); }
  .kbd-hint { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); border-color: transparent; }
  .dropdown-panel, .cmdk-box { background: #181c23; border: 1px solid rgba(255, 255, 255, 0.13); color: var(--text-primary); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
  .dd-item, .cmdk-item { color: var(--text-secondary); }
  .dd-item:hover, .cmdk-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
  .main-content { background: transparent; }
  ::selection { background: rgba(59, 130, 246, 0.5); color: #fff; }
  *::-webkit-scrollbar { width: 10px; height: 10px; }
  *::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 999px; border: 2px solid #0a0c10; }
  *::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.26); }
  *::-webkit-scrollbar-track { background: transparent; }
  .sidebar *::-webkit-scrollbar-thumb { border-color: #0b1833; }

  /* Paper is white. Anything that previews a printed document keeps the
     original light tokens, whatever page it sits on. */
  .ilms-paper, .certificate-card, .role-card, .pp-doc, .pk-card, .pk-page, .doc-page, .signage-sign,
  .passport-card, .a4-page, .attendance-register-sheet, .commercial-doc {
    --surface-app: #e9edf3;
    --surface-card: #ffffff;
    --surface-muted: #eef1f6;
    --surface-hover: #e3e8f0;
    --surface-sunken: #dde3ec;
    --border-subtle: #dde2ea;
    --border-default: #cfd5e0;
    --border-strong: #b9c1d0;
    --text-primary: #101828;
    --text-secondary: #4b5568;
    --text-tertiary: #6b7585;
    --accent-50: #eff5ff;
    --accent-100: #dbe8fe;
    --accent-200: #bcd4fd;
    --accent-700: #1e40af;
    --accent-ink: #172e6e;
    --emerald-50: #eaf7f0; --emerald-100: #d3efe0; --emerald-600: #148253; --emerald-700: #0f6a44;
    --amber-50: #fdf3e4; --amber-100: #fbe6c4; --amber-600: #a56d0d; --amber-700: #7d5309;
    --red-50: #fbecec; --red-100: #f6d7d7; --red-600: #a92c2c; --red-700: #832121;
    --slate-50: #f1f2f5; --slate-100: #e3e5ea; --slate-500: #626d81; --slate-600: #4d5768;
    color: #101828;
    color-scheme: light;
  }
}

/* ==========================================================================
   Building blocks for the command-canvas pages (.ix-*)
   ========================================================================== */
.ix-card {
  position: relative;
  background: var(--ix-card);
  border: 1px solid var(--ix-line);
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 28px rgba(0, 0, 0, 0.35);
}
.ix-eyebrow { font: 600 11px/1.2 var(--font-base); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ix-text-3); }
.ix-serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.ix-num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

.ix-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--ix-line-strong); background: var(--ix-raised); color: var(--ix-text);
  font: 600 14px/1 var(--font-base); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.ix-btn:hover { background: #20252e; border-color: rgba(255, 255, 255, 0.24); }
.ix-btn:active { transform: translateY(1px); }
.ix-btn:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.ix-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.ix-btn--primary { border-color: transparent; color: #fff; background: linear-gradient(180deg, #3b82f6, #2563eb); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 8px 20px rgba(37, 99, 235, 0.35); }
.ix-btn--primary:hover { background: linear-gradient(180deg, #5090f7, #2f6df0); border-color: transparent; }
.ix-btn--sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.ix-btn--danger { color: #fca5a5; border-color: rgba(248, 113, 113, 0.4); }

.ix-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px;
  font: 600 12px/1 var(--font-base); white-space: nowrap; color: var(--ix-text-2);
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1);
}
.ix-chip--good { color: #6ee7b7; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.3); }
.ix-chip--warn { color: #fcd34d; background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.3); }
.ix-chip--bad { color: #fca5a5; background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.32); }
.ix-chip--info { color: #9cc2ff; background: rgba(59, 130, 246, 0.14); border-color: rgba(96, 165, 250, 0.32); }
.ix-chip--violet { color: #c9bcff; background: rgba(139, 92, 246, 0.14); border-color: rgba(167, 139, 250, 0.32); }

.ix-avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font: 700 12px/1 var(--font-base); color: #e6eeff; background: #233a6b; border: 1px solid rgba(255, 255, 255, 0.14);
}

.ix-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.ix-bar > span { display: block; height: 100%; border-radius: inherit; background: #3b82f6; transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ix-bar--good > span { background: #34d399; }
.ix-bar--warn > span { background: #fbbf24; }
.ix-bar--bad > span { background: #f87171; }

.ix-empty { padding: 28px 16px; text-align: center; color: var(--ix-text-3); font-size: 14px; }
.ix-empty i { display: block; font-size: 22px; margin-bottom: 10px; color: #34d399; }

@keyframes ix-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ix-rise { animation: ix-rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 50ms); }
@media (prefers-reduced-motion: reduce) {
  .ix-rise { animation: none; }
  .ix-bar > span { transition: none; }
}

/* Segmented tabs (shared) */
.cc-tabs { flex: none; display: inline-flex; padding: 3px; border-radius: 11px; background: #0d0f14; border: 1px solid var(--ix-line); }
.cc-tabs button { border: 0; background: none; cursor: pointer; height: 32px; padding: 0 13px; border-radius: 8px; font: 600 13px/1 var(--font-base); color: var(--ix-text-3); display: inline-flex; align-items: center; gap: 7px; }
.cc-tabs button:hover { color: var(--ix-text); }
.cc-tabs button span { font-size: 11.5px; padding: 2px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.09); color: var(--ix-text-2); font-variant-numeric: tabular-nums; }
.cc-tabs button.is-active { background: var(--ix-raised); color: #fff; box-shadow: 0 0 0 1px var(--ix-line-strong) inset, 0 2px 6px rgba(0, 0, 0, 0.4); }
.cc-tabs button.is-active span { background: #2563eb; color: #fff; }
.cc-tabs button:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }

/* ==========================================================================
   The older screens: one voice for type, and the parts they colour by hand
   ========================================================================== */
@media screen {
  h1, h2, h3, .panel-title, .section-title, .page-toolbar h1, .modal-title, .drawer-title, .kpi-value, .stat-value {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
  }
  .page-toolbar h1, .page-hero h1 { font-weight: 700; color: var(--text-primary); }
  .toolbar-subtitle, .panel-subtitle, .hero-support { color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
  .panel, .card, .kpi-card, .modal-box, .drawer-panel, .filter-bar, .table-wrap { border-color: rgba(255, 255, 255, 0.08); }
  .panel, .kpi-card { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.3); }
  .modal-overlay, .drawer-overlay { background: rgba(0, 0, 0, 0.66); backdrop-filter: blur(4px); }

  .person-avatar, .avatar-circle, .irc-avatar { color: #e6eeff; background: #233a6b; border: 1px solid rgba(255, 255, 255, 0.14); font-weight: 700; }
  .form-section-label, .tc-category { color: #8ab4ff; }
  .wizard-step-label { color: var(--text-primary); }
  .pec-design-chip { color: var(--text-secondary); background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); }
  .oc-node-kicker { color: #b6c6e3; }
  .main-content a:not([class]) { color: #8ab4ff; }
  .main-content a:not([class]):hover { color: #b9d2ff; }
  .eyebrow, .rcc-eyebrow, .page-hero .eyebrow, .page-hero-text .eyebrow {
    color: #cfe0ff; background: rgba(59, 130, 246, 0.16); border: 1px solid rgba(96, 165, 250, 0.3);
    font: 600 11.5px/1 var(--font-base); letter-spacing: 0.1em;
  }
  .dd-item.selected { background: rgba(59, 130, 246, 0.2); color: #fff; }
  .tab-btn { color: var(--text-secondary); font-family: var(--font-base); }
  .tab-btn.active, .import-tab-btn.active, .ps-tab.active, .dd-item.selected, .view-toggle-btn.active,
  .org-chart-toolbar button.active { color: #fff; }
  .kpi-icon, .empty-icon { background: rgba(59, 130, 246, 0.14); color: #8ab4ff; }

  table th:not(:is(.ilms-paper, .certificate-card, .role-card, .pp-doc, .pk-card, .pk-page, .doc-page, .signage-sign) *) {
    background: #181c23; color: var(--text-secondary); border-color: rgba(255, 255, 255, 0.08);
    font: 600 11.5px/1.2 var(--font-base); letter-spacing: 0.06em;
  }
  table td:not(:is(.ilms-paper, .certificate-card, .role-card, .pp-doc, .pk-card, .pk-page, .doc-page, .signage-sign) *) {
    border-color: rgba(255, 255, 255, 0.06); color: var(--text-secondary); font-size: 13.5px;
  }
  tbody tr:hover > td:not(:is(.ilms-paper, .certificate-card, .role-card, .pp-doc, .pk-card, .pk-page, .doc-page, .signage-sign) *) { background: rgba(255, 255, 255, 0.035); }

  input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not(:is(.ilms-paper, .certificate-card, .role-card, .pp-doc, .pk-card, .pk-page, .doc-page, .signage-sign) *),
  select:not(:is(.ilms-paper, .certificate-card, .role-card, .pp-doc, .pk-card, .pk-page, .doc-page, .signage-sign) *),
  textarea:not(:is(.ilms-paper, .certificate-card, .role-card, .pp-doc, .pk-card, .pk-page, .doc-page, .signage-sign) *) {
    background-color: #0d0f14; color: var(--text-primary); border-color: rgba(255, 255, 255, 0.14); font-family: var(--font-base);
  }
  input::placeholder, textarea::placeholder { color: #7f8896; }
  input:focus, select:focus, textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28); outline: 0; }
  select option { background: #181c23; color: #f3f5f8; }

  .btn { font-family: var(--font-base); font-weight: 600; }
  .btn-secondary, .btn-ghost, .btn-outline { background: #181c23; color: var(--text-primary); border-color: rgba(255, 255, 255, 0.14); }
  .btn-secondary:hover, .btn-ghost:hover, .btn-outline:hover { background: #20252e; border-color: rgba(255, 255, 255, 0.24); }
  .btn-primary { background: linear-gradient(180deg, #3b82f6, #2563eb); border-color: transparent; color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 6px 16px rgba(37, 99, 235, 0.32); }
  .btn-primary:hover { background: linear-gradient(180deg, #5090f7, #2f6df0); }
}

/* ==========================================================================
   Refinement — hierarchy, one set of controls, a quieter frame

   Everything a person looks at should have a rank. This section sets it:
     · the sidebar is narrow and steps aside (icon-only when collapsed);
     · type has four levels and no more: title, section, value, support;
     · every tab, button, field and menu shares one shape, one hover, one
       focus ring and one speed.
   ========================================================================== */
:root {
  --sidebar-w: 232px;
  --sidebar-w-collapsed: 64px;
  --ix-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---- Sidebar: narrower, denser, and a real collapsed state ------------------- */
.app-shell { transition: grid-template-columns 0.28s var(--ix-ease); }
.sidebar-brand { min-height: 64px; padding: 14px 14px 12px; gap: 10px; }
.sidebar-brand .brand-mark { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.sidebar-brand .brand-title { font-size: 17px; }
.sidebar-brand .brand-by { margin-top: 5px; font-size: 8px; }
.sidebar-org { margin: 10px 12px 0; padding: 7px 10px; font-size: 12px; transition: opacity 0.18s ease; }
.sidebar-nav { padding: 10px 10px 12px; }
.nav-section + .nav-section { margin-top: 14px; }
.nav-section-label { padding: 0 9px; margin-bottom: 6px; font-size: 10px; transition: opacity 0.18s ease; }
.sidebar-nav a, .sidebar-nav button.nav-link {
  min-height: 34px; padding: 6px 9px; gap: 10px; margin-bottom: 1px; font-size: 13px; border-radius: 8px;
  transition: background 0.14s ease, color 0.14s ease, padding 0.28s var(--ix-ease), width 0.28s var(--ix-ease);
}
.sidebar-nav a i, .sidebar-nav button.nav-link i { width: 18px; font-size: 13.5px; }
.sidebar-nav .nav-label { transition: opacity 0.16s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item-badge { font-size: 11px; padding: 1px 6px; }
.sidebar-footer { padding: 10px; }
.sidebar-footer-collapse { width: 100%; height: 34px; border-radius: 8px; font: 500 12.5px/1 var(--font-base); transition: background 0.14s ease, color 0.14s ease; }
.sidebar-footer-collapse:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.sidebar-footer-collapse i { transition: transform 0.28s var(--ix-ease); }

.app-shell.sidebar-collapsed .sidebar-brand { padding: 14px 0 12px; justify-content: center; }
.app-shell.sidebar-collapsed .sidebar-nav { padding: 10px 12px 12px; }
.app-shell.sidebar-collapsed .sidebar-nav a,
.app-shell.sidebar-collapsed .sidebar-nav button.nav-link { width: 40px; height: 40px; min-height: 40px; padding: 0; justify-content: center; margin: 0 auto 2px; }
.app-shell.sidebar-collapsed .sidebar-nav a i { width: auto; font-size: 15px; }
/* Section names become hairlines, so the groups still read as groups. */
.app-shell.sidebar-collapsed .nav-section-label { opacity: 1; width: auto; height: 1px; margin: 8px 8px; padding: 0; font-size: 0; background: rgba(255, 255, 255, 0.12); }
.app-shell.sidebar-collapsed .nav-section:first-child .nav-section-label { display: none; }
.app-shell.sidebar-collapsed .nav-section + .nav-section { margin-top: 0; }
.app-shell.sidebar-collapsed .sidebar-footer { padding: 10px 12px; }
.app-shell.sidebar-collapsed .sidebar-footer-collapse { width: 40px; padding: 0; margin: 0 auto; }

@media screen {
  body { --text-secondary: #cbd2dc; --text-tertiary: #a6afbd; }

  /* ---- Type: four levels ----------------------------------------------------- */
  .breadcrumb-trail { color: #b9c1cd; font: 500 12px/1.2 var(--font-base); letter-spacing: 0.01em; text-transform: none; }
  .breadcrumb-trail i { color: #7f8896; font-size: 9px; }
  .breadcrumb-trail span:last-of-type { color: #e6e9ef; }
  .page-title-header { font-size: 17px; line-height: 1.25; }
  .page-toolbar h1, .page-hero h1 { font-size: 24px; line-height: 1.15; letter-spacing: -0.025em; }
  .toolbar-subtitle, .hero-support { font-size: 14px; color: var(--text-secondary); }
  .panel-title { font: 600 15px/1.3 var(--font-display); letter-spacing: -0.01em; color: var(--text-primary); }
  .panel-subtitle { font-size: 13px; line-height: 1.45; color: var(--text-tertiary); }
  .kpi-value, .sc-value, .stat-value, .rs-value { font: 700 28px/1.05 var(--font-display); letter-spacing: -0.025em; color: #fff; font-variant-numeric: tabular-nums; }
  .kpi-label, .sc-label, .stat-label, .rs-label { font: 500 12.5px/1.35 var(--font-base); letter-spacing: 0; text-transform: none; color: var(--text-secondary); }
  .kpi-sub, .kpi-meta, .kpi-foot, .sc-sub { font-size: 12px; line-height: 1.4; color: var(--text-tertiary); }
  .filter-bar-results, .form-hint, .field-hint { color: var(--text-tertiary); font-size: 12.5px; }

  /* ---- Tabs: one segmented control everywhere ---------------------------------- */
  .tab-bar:not(#settingsTabs) {
    display: flex; flex-wrap: nowrap; gap: 2px; width: fit-content; max-width: 100%; padding: 4px; margin-bottom: 16px;
    overflow-x: auto; scrollbar-width: none; background: #0d0f14; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
  }
  .tab-bar:not(#settingsTabs)::-webkit-scrollbar { display: none; }
  .tab-bar:not(#settingsTabs) .tab-btn, .import-tab-btn, .ps-tab {
    flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; margin: 0;
    border: 0; border-radius: 8px; background: none; box-shadow: none; outline-offset: 2px;
    font: 600 13px/1 var(--font-base); color: var(--text-secondary); white-space: nowrap; cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
  }
  .tab-bar:not(#settingsTabs) .tab-btn:hover, .import-tab-btn:hover, .ps-tab:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
  .tab-bar:not(#settingsTabs) .tab-btn.active, .import-tab-btn.active, .ps-tab.active {
    background: #1e232c; color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 2px 6px rgba(0, 0, 0, 0.4);
  }
  .tab-btn::after { content: none; }
  .tab-count { min-width: 18px; padding: 2px 6px; border-radius: 999px; font: 700 11px/1 var(--font-base); text-align: center; background: #2563eb; color: #fff; }

  /* ---- Buttons, fields, menus: one shape, one hover, one focus, one speed ------ */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px;
    border-radius: 10px; font-size: 13.5px; line-height: 1; white-space: nowrap;
    transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, color 0.14s ease, transform 0.1s ease;
  }
  .btn-sm { min-height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
  .btn:active { transform: translateY(1px); }
  .btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
  .btn-danger { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); }
  .btn-danger:hover { background: rgba(248, 113, 113, 0.2); }

  .filter-select, .form-field select, .form-field input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='range']),
  .search-field input {
    min-height: 38px; border-radius: 10px; font-size: 13.5px;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
  }
  .filter-select:hover, .form-field select:hover, .form-field input:hover { border-color: rgba(255, 255, 255, 0.24); }

  .dropdown-panel { padding: 6px; border-radius: 12px; }
  .dd-item { padding: 8px 10px; border-radius: 8px; font-size: 13px; transition: background 0.12s ease, color 0.12s ease; }
  .dd-section-label { color: var(--text-tertiary); font: 600 11px/1 var(--font-base); letter-spacing: 0.08em; }

  :is(a, button, summary, [role='tab'], [tabindex]):focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; border-radius: 8px; }
  :is(a, button):focus:not(:focus-visible) { outline: 0; }

  .panel { border-radius: 14px; }
  .panel-header { border-bottom-color: rgba(255, 255, 255, 0.06); }
  .badge { border-radius: 999px; font-weight: 600; }
  .back-link { color: var(--text-secondary); font: 500 13px/1 var(--font-base); background: none; border: 0; padding: 0; transition: color 0.14s ease; }
  .back-link:hover { color: #fff; }

  /* ---- Employee profile: one headline, then detail ----------------------------- */
  .page-employee-profile .profile-header {
    padding: 22px 24px; border-radius: 16px 16px 0 0; border: 1px solid rgba(255, 255, 255, 0.08); border-bottom: 0;
    background: var(--surface-card); box-shadow: none; margin-bottom: 0;
  }
  .page-employee-profile .pi-name { font: 700 24px/1.15 var(--font-display); letter-spacing: -0.025em; color: #fff; }
  .page-employee-profile .pi-meta { gap: 6px 18px; margin-top: 8px; }
  .page-employee-profile .pi-meta-item { font-size: 13px; color: var(--text-primary); }
  .page-employee-profile .pi-meta-item strong { font-weight: 500; color: var(--text-tertiary); }
  /* Five boxed cards become one quiet strip of supporting facts. */
  .page-employee-profile .stat-card-row {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.08); border-top-color: rgba(255, 255, 255, 0.06); border-radius: 0 0 16px 16px;
    background: #0f1217; overflow: hidden;
  }
  .page-employee-profile .stat-card-sm {
    display: block; padding: 12px 20px; border: 0; border-radius: 0; background: none; box-shadow: none;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
  }
  .page-employee-profile .stat-card-sm:last-child { border-right: 0; }
  .page-employee-profile .stat-card-sm .sc-icon { display: none; }
  .page-employee-profile .stat-card-sm .sc-value { font-size: 17px; line-height: 1.2; letter-spacing: -0.01em; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-employee-profile .stat-card-sm .sc-label { margin-top: 2px; font-size: 12px; color: var(--text-tertiary); }

  /* The headline: is this person ready, and what is outstanding. */
  .pf-focus { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 26px; align-items: center; padding: 20px 24px; border: 1px solid rgba(255, 255, 255, 0.08); border-top-color: rgba(255, 255, 255, 0.06); border-bottom: 0; background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0) 55%), var(--surface-card); }
  .pf-ring { position: relative; width: 84px; height: 84px; flex: none; }
  .pf-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .pf-ring circle { fill: none; stroke-width: 8; }
  .pf-ring .t { stroke: rgba(255, 255, 255, 0.1); }
  .pf-ring .v { stroke-linecap: round; transition: stroke-dashoffset 0.9s var(--ix-ease); }
  .pf-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 21px/1 var(--font-display); color: #fff; }
  .pf-focus__lead { font: 700 19px/1.25 var(--font-display); letter-spacing: -0.015em; color: #fff; }
  .pf-focus__sub { margin-top: 5px; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
  .pf-focus__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
  .pf-focus__next { text-align: right; }
  .pf-focus__next span { display: block; font-size: 12px; color: var(--text-tertiary); }
  .pf-focus__next b { display: block; margin-top: 4px; font: 600 14.5px/1.3 var(--font-base); color: #fff; }
  .pf-focus__next a { display: inline-block; margin-top: 8px; font: 600 13px/1 var(--font-base); color: #8ab4ff; text-decoration: none; }
  .page-employee-profile #profileTabs { overflow: visible; }
  .tab-more { position: relative; flex: none; }
  .tab-more__menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; min-width: 200px; padding: 6px; display: none; flex-direction: column; gap: 2px; background: #181c23; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
  .tab-more.is-open .tab-more__menu { display: flex; animation: ix-pop 0.14s ease both; }
  .tab-more__menu .tab-btn { width: 100%; justify-content: flex-start; }
  @keyframes ix-pop { from { opacity: 0; transform: translateY(-4px); } }
  /* Inside a tab the tab's own name is not said twice, and tables sit flush. */
  .page-employee-profile .panel-title.is-redundant { display: none; }
  .page-employee-profile .panel-title.is-redundant + .panel-subtitle { margin-top: 0; font-size: 13.5px; color: var(--text-secondary); }
  .page-employee-profile .tab-panel .panel .table-wrap, .page-employee-profile .tab-panel .panel .table-scroll { border: 0; border-radius: 0; box-shadow: none; }
  .page-employee-profile .tab-panel > .panel { box-shadow: none; }

  /* ---- Insight panels (charts beside the numbers) ------------------------------ */
  .ix-insights { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin: 0 0 18px; }
  .ix-insight { grid-column: span 6; display: flex; flex-direction: column; min-width: 0; padding: 18px 20px 20px; background: var(--surface-card); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; }
  .ix-insight--wide { grid-column: span 8; }
  .ix-insight--narrow { grid-column: span 4; }
  .ix-insight header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
  .ix-insight h3 { margin: 0; font: 600 15px/1.3 var(--font-display); letter-spacing: -0.01em; color: var(--text-primary); }
  .ix-insight header p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--text-tertiary); }
  .ix-insight__chart { position: relative; flex: 1; min-height: 230px; }
  .ix-insight__figure { font: 700 44px/1 var(--font-display); letter-spacing: -0.035em; color: #fff; font-variant-numeric: tabular-nums; }
  .ix-insight__figure small { font-size: 20px; font-weight: 600; color: var(--text-tertiary); margin-left: 2px; }
  .ix-target { position: relative; height: 12px; margin: 18px 0 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
  .ix-target > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; transition: width 0.9s var(--ix-ease); }
  .ix-target > i { position: absolute; top: -5px; bottom: -5px; width: 2px; background: #fbbf24; border-radius: 2px; }
  .ix-target__scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-tertiary); }
  .ix-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
  .ix-facts b { display: block; font: 700 19px/1.1 var(--font-display); color: #fff; }
  .ix-facts span { display: block; margin-top: 3px; font-size: 12px; color: var(--text-tertiary); }
  .ix-hbars { display: flex; flex-direction: column; gap: 11px; }
  .ix-hbar { display: grid; grid-template-columns: minmax(0, 34%) minmax(0, 1fr) 46px; align-items: center; gap: 12px; font-size: 13px; }
  .ix-hbar__name { color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ix-hbar__name small { margin-left: 6px; font-size: 11.5px; color: var(--text-tertiary); }
  .ix-hbar__track { position: relative; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; display: flex; }
  .ix-hbar__track span { height: 100%; transition: width 0.9s var(--ix-ease); }
  .ix-hbar__mark { position: absolute; top: 0; bottom: 0; width: 2px; background: #fbbf24; }
  .ix-hbar b { text-align: right; font: 600 13px/1 var(--font-base); color: #fff; font-variant-numeric: tabular-nums; }
  .ix-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 12px; color: var(--text-tertiary); }
  .ix-key i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
  .ix-asof { margin: -6px 2px 16px; font-size: 12px; color: var(--text-tertiary); }
  @media (max-width: 1100px) { .ix-insight, .ix-insight--wide, .ix-insight--narrow { grid-column: span 12; } .pf-focus { grid-template-columns: auto 1fr; } .pf-focus__next { grid-column: 1 / -1; text-align: left; } }
  @media (max-width: 700px) { .page-employee-profile .stat-card-row { grid-template-columns: repeat(2, 1fr); } .page-employee-profile .stat-card-sm { border-bottom: 1px solid rgba(255, 255, 255, 0.06); } }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell, .sidebar-nav a, .btn, .tab-btn, .pf-ring .v, .ix-target > span, .ix-hbar__track span { transition: none !important; }
}

/* ==========================================================================
   Enterprise pass — one frame, one card, quiet surfaces

   The tokens below are the whole visual vocabulary. A card is a 1px line, a
   14px corner and a hairline of shadow; it never glows. What matters is made
   to stand out with contrast (a brighter surface, a status colour on the
   figure), not with light effects. A light theme is these same tokens with
   different values.
   ========================================================================== */
:root {
  --header-h: 60px;
  --ix-radius: 14px;
  --ix-radius-control: 10px;
  --ix-pad: 20px;
  --ix-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --ix-shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* ---- Sidebar: flat brand panel, no glow ---------------------------------------- */
.sidebar { background: linear-gradient(180deg, #0f2147 0%, #0b1833 55%, #091429 100%); box-shadow: none; }
.sidebar-brand { height: var(--header-h); min-height: var(--header-h); padding-top: 0; padding-bottom: 0; }
.sidebar-brand .brand-mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }
.sidebar-nav a.active { background: #2563eb; box-shadow: none; border-color: transparent; }
.sidebar-nav a.active::before { content: none; }
.sidebar-nav a, .sidebar-nav button.nav-link { border: 0; }
.app-shell.sidebar-collapsed .sidebar-footer-collapse i { transform: rotate(180deg); }
.app-shell.sidebar-collapsed .sidebar-footer-collapse span { display: none; }
.app-shell.sidebar-collapsed .sidebar-nav a, .app-shell.sidebar-collapsed .sidebar-nav button.nav-link { gap: 0; }
.app-shell.sidebar-collapsed .sidebar-nav .nav-label { display: none; }

@media screen {
  /* ---- Header: one height, one search, on every page ---------------------------- */
  .main-col { background: #0a0c10; }
  .app-header { height: var(--header-h); min-height: var(--header-h); padding: 0 24px; gap: 16px; background: rgba(10, 12, 16, 0.88); box-shadow: none; }
  .header-left { flex: 1 1 0; gap: 12px; min-width: 0; }
  .header-right { flex: 1 1 0; justify-content: flex-end; gap: 10px; }
  .breadcrumb-block { min-width: 0; }
  .breadcrumb-trail { margin: 0; gap: 8px; font: 500 13px/1.2 var(--font-base); color: #a6afbd; white-space: nowrap; overflow: hidden; }
  .breadcrumb-trail a { color: #a6afbd; text-decoration: none; transition: color 0.14s ease; }
  .breadcrumb-trail a:hover { color: #fff; }
  .breadcrumb-trail [aria-current='page'], .breadcrumb-trail span:last-of-type { color: #f3f5f8; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
  .breadcrumb-trail i { flex: none; font-size: 9px; color: #6f7886; }
  /* The page says its own name once, in the page. */
  body.has-page-title .page-title-header { display: none; }
  .page-title-header { margin-top: 3px; font-size: 15px; }
  .header-search {
    flex: 0 1 360px; width: auto; min-width: 0; height: 38px; padding: 0 8px 0 12px; gap: 10px;
    border-radius: var(--ix-radius-control); box-shadow: none; transition: background 0.14s ease, border-color 0.14s ease;
  }
  .header-search i.fa-magnifying-glass { flex: none; font-size: 13px; color: #a6afbd; }
  .header-search span.search-placeholder { flex: 1; min-width: 0; font: 400 13px/38px var(--font-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kbd-hint { flex: none; padding: 4px 7px; border-radius: 6px; font: 600 11px/1 var(--font-base); letter-spacing: 0.02em; white-space: nowrap; }
  .icon-btn, .sidebar-toggle-btn, .mobile-menu-btn { width: 36px; height: 36px; border-radius: var(--ix-radius-control); box-shadow: none; }
  .sidebar-toggle-btn:hover, .mobile-menu-btn:hover { border-color: rgba(255, 255, 255, 0.2); box-shadow: none; background: #181c23; color: #fff; }
  .header-user { height: 40px; padding: 0 10px 0 4px; gap: 9px; border-radius: var(--ix-radius-control); box-shadow: none; }
  .header-user:hover { box-shadow: none; }
  .header-user .avatar-circle { width: 30px; height: 30px; font-size: 11px; }
  .header-user .user-name-sm { font-size: 12.5px; line-height: 1.2; white-space: nowrap; }
  .header-user .user-role-sm { font-size: 11px; line-height: 1.2; }
  .header-divider { height: 22px; }
  .main-content { padding: 24px 24px 40px; }
  @media (max-width: 1024px) { .header-search { flex-basis: 180px; } }
  @media (max-width: 860px) { .header-search { flex: none; width: 38px; padding: 0; justify-content: center; } .header-left, .header-right { flex: 0 1 auto; } .header-left { flex-grow: 1; } }
  @media (max-width: 640px) { .app-header { padding: 0 14px; } .main-content { padding: 16px 14px 32px; } body.has-page-title .page-title-header { display: block; } }

  /* ---- Search that searches (complete here: not every page loads cmdk.css) -------- */
  .cmdk-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; opacity: 0; pointer-events: none; transition: opacity 0.16s ease; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
  .cmdk-overlay.open { opacity: 1; pointer-events: auto; }
  .cmdk-box { width: 100%; max-width: 600px; margin: 0 16px; overflow: hidden; border-radius: 14px; box-shadow: var(--ix-shadow-pop); transform: translateY(-8px); transition: transform 0.16s ease; }
  .cmdk-overlay.open .cmdk-box { transform: none; }
  .cmdk-input-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .cmdk-input-row i.fa-magnifying-glass { color: var(--text-tertiary); font-size: 15px; }
  .cmdk-input-row input { flex: 1; min-width: 0; outline: 0; color: var(--text-primary); }
  .cmdk-results { overflow-y: auto; }
  .cmdk-item { display: flex; align-items: center; }
  .cmdk-input-row { padding: 14px 16px; }
  .cmdk-input-row input { background: transparent !important; border: 0 !important; box-shadow: none !important; font-size: 15px; }
  .cmdk-results { padding: 8px; max-height: min(420px, 56vh); }
  .cmdk-section-label { padding: 8px 10px 6px; font: 600 11px/1 var(--font-base); letter-spacing: 0.08em; color: var(--text-tertiary); }
  .cmdk-item { gap: 12px; padding: 8px 10px; border-radius: 8px; text-decoration: none; cursor: pointer; }
  .cmdk-item i { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-size: 12px; background: rgba(255, 255, 255, 0.06); color: #a6afbd; }
  .cmdk-item__main { min-width: 0; font: 500 13.5px/1.3 var(--font-base); color: #f3f5f8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cmdk-item__main small { margin-left: 10px; font-size: 12px; font-weight: 400; color: var(--text-tertiary); }
  .cmdk-item.is-active, .cmdk-item:hover { background: rgba(59, 130, 246, 0.16); }
  .cmdk-item.is-active i, .cmdk-item:hover i { background: #2563eb; color: #fff; }
  .cmdk-empty { padding: 28px 16px; text-align: center; font-size: 13.5px; color: var(--text-tertiary); }

  /* ---- Cards: a line, a corner, a hairline of shadow ------------------------------ */
  .panel, .kpi-card, .ix-card, .ix-insight, .card, .stat-card, .filter-bar {
    border: 1px solid var(--ix-line); border-radius: var(--ix-radius); box-shadow: var(--ix-shadow);
  }
  .panel:hover, .ix-card:hover { box-shadow: var(--ix-shadow); }
  .panel-header { padding: 16px 20px 14px; }
  .panel-body { padding: 20px; }
  .panel-title::before { content: none; }
  .kpi-card { padding: 18px 20px; transition: border-color 0.14s ease, background 0.14s ease; }
  .kpi-card::before, .kpi-card::after { content: none; }
  .kpi-card:hover { transform: none; box-shadow: var(--ix-shadow); border-color: var(--ix-line-strong); }
  .kpi-top { margin-bottom: 12px; }
  /* An icon alone above a figure says nothing the label does not. */
  .kpi-top:has(> .kpi-icon:only-child) { display: none; }
  .kpi-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; box-shadow: none; }
  .kpi-value { margin-bottom: 4px; }
  .btn-primary, .ix-btn--primary { background: #2563eb; box-shadow: none; }
  .btn-primary:hover, .ix-btn--primary:hover { background: #3b74f0; }
  .page-hero-actions .btn { box-shadow: none; }
  .page-hero { padding: 0 0 18px; margin-bottom: 18px; }
  .page-hero .eyebrow, .page-hero-text .eyebrow { display: none; }
  .page-toolbar { margin-bottom: 18px; }
  .filter-bar { padding: 12px 14px; background: var(--surface-card); }
  .search-field { min-height: 38px; padding: 0 12px; border-radius: var(--ix-radius-control); background: #0d0f14; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: none; }
  .search-field input, .search-field input:focus { min-height: 36px; background: transparent !important; border: 0 !important; box-shadow: none !important; padding-left: 0; }
  .search-field:focus-within { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28); background: #0d0f14; }

  /* ---- Tables: denser, aligned, the header stays put ------------------------------ */
  .data-table thead th { padding: 10px 14px; white-space: nowrap; }
  .data-table tbody td { padding: 10px 14px; vertical-align: middle; }
  .data-table .num, .data-table td.is-num, .data-table th.is-num { text-align: right; font-variant-numeric: tabular-nums; }

  .enterprise-table thead th, .page-attendance-workflow .enterprise-table thead th { padding: 10px 14px; white-space: nowrap; text-align: left; font: 600 11.5px/1.2 var(--font-base); letter-spacing: 0.06em; color: var(--text-secondary); background: #181c23; }
  .enterprise-table tbody td, .page-attendance-workflow .enterprise-table tbody td { padding: 9px 14px; vertical-align: middle; line-height: 1.35; }
  .enterprise-table tbody tr:hover, .page-attendance-workflow .enterprise-table tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
  /* Cells may wrap, so a table fits its panel instead of scrolling sideways. */
  .enterprise-table tbody td { white-space: normal; }
  .enterprise-table tbody td:first-child, .enterprise-table tbody td:nth-child(2), .enterprise-table tbody td .badge, .enterprise-table tbody td.no-click { white-space: nowrap; }
  .page-register .enterprise-table tbody td { white-space: nowrap; }
  input[type='date'].filter-select { padding: 0 10px; }
  .enterprise-table th.sortable { cursor: pointer; transition: color 0.14s ease; }
  .enterprise-table th.sortable:hover { color: #fff; }
  .enterprise-table .sort-icon { margin-left: 4px; font-size: 10px; opacity: 0.6; }
  .table-panel { border: 1px solid var(--ix-line); border-radius: var(--ix-radius); box-shadow: var(--ix-shadow); background: var(--surface-card); }
  /* A table that fits its panel leaves the sideways scroller, so its header
     can stick to the page (shell.js measures and sets these classes). */
  .table-scroll.is-fit { overflow: visible; }
  .has-fit-table { overflow: visible; }
  .table-scroll.is-fit > table > thead > tr > th { position: sticky; top: var(--header-h); z-index: 6; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08); }
  .has-fit-table > .table-scroll.is-fit:first-child > table > thead > tr > th:first-child { border-top-left-radius: 13px; }
  .has-fit-table > .table-scroll.is-fit:first-child > table > thead > tr > th:last-child { border-top-right-radius: 13px; }
  /* Row actions: a quiet button, a menu like every other menu. */
  .row-actions-btn { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--text-tertiary); cursor: pointer; transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease; }
  .row-actions-btn:hover, tr:hover .row-actions-btn { background: #1e232c; border-color: rgba(255, 255, 255, 0.12); color: #fff; }
  .row-actions-menu { min-width: 200px; padding: 6px; border-radius: 12px; background: #181c23; border: 1px solid rgba(255, 255, 255, 0.13); box-shadow: var(--ix-shadow-pop); }
  .row-actions-menu .ra-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font: 500 13px/1.2 var(--font-base); color: var(--text-secondary); cursor: pointer; transition: background 0.12s ease, color 0.12s ease; }
  .row-actions-menu .ra-item i { width: 14px; font-size: 12px; text-align: center; color: var(--text-tertiary); }
  .row-actions-menu .ra-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
  .row-actions-menu .ra-item.is-danger, .row-actions-menu .ra-item.is-danger i { color: #fca5a5; }
  .row-actions-menu .ra-item.is-danger:hover { background: rgba(248, 113, 113, 0.14); }
  .row-actions-menu .ra-divider { height: 1px; margin: 4px 2px; background: rgba(255, 255, 255, 0.08); }

  .page-attendance-workflow .enterprise-table { min-width: 940px; }
  .enterprise-table tbody td, .page-attendance-workflow .enterprise-table tbody td { padding: 8px 12px; }
  .enterprise-table thead th, .page-attendance-workflow .enterprise-table thead th { padding: 10px 12px; }

  /* ---- Decoration that carried no meaning: coloured rails and lifts ---------------- */
  .training-card::before, .oc-node-card::before, .page-attendance-workflow [data-step-panel='4'] .panel::before { content: none; }
  .dashboard-activity-zone .panel, .page-attendance-workflow .sheet-header-panel, .page-attendance-workflow .panel,
  .learning-card.has-content, .learning-card:not(.has-content), .oc-modern-organization .oc-node-card {
    border: 1px solid var(--ix-line);
  }
  .training-card { padding: 18px 20px; gap: 12px; border-radius: var(--ix-radius); box-shadow: var(--ix-shadow); transition: border-color 0.14s ease, background 0.14s ease; }
  .training-card:hover, .learning-card:hover, .oc-node-card:hover { transform: none; box-shadow: var(--ix-shadow); border-color: var(--ix-line-strong); }
  .tc-icon { width: 34px; height: 34px; border-radius: 9px; font-size: 14px; background: rgba(255, 255, 255, 0.06); color: #a6afbd; }
  .filter-trigger { height: 38px; padding: 0 12px; white-space: nowrap; border-radius: var(--ix-radius-control); }
  .filter-trigger .filter-value, .filter-trigger .filter-label { white-space: nowrap; }

  /* ---- Training Register: one tidy command bar, figures without paint -------------- */
  .page-register .register-command-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px 12px; padding: 12px 14px; background: var(--surface-card); }
  .page-register .register-command-bar .filter-bar-divider { display: none; }
  .page-register .register-command-bar .search-field { grid-column: 1; grid-row: 1; height: 38px; }
  .page-register .register-command-bar .filter-bar-results { grid-column: 2; grid-row: 1; padding: 0; background: none; white-space: nowrap; }
  .page-register .register-command-bar > .filter-group:last-child { grid-column: 3; grid-row: 1; justify-self: end; }
  .page-register .register-command-bar > .filter-group:not(:last-child) { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .page-register .register-command-bar .filter-select { padding: 0 10px; }
  .page-register .register-command-bar .filter-select.is-active, .page-register .register-command-bar .search-field.is-active { color: #dbe7ff; background-color: rgba(59, 130, 246, 0.14); border-color: rgba(96, 165, 250, 0.5); box-shadow: none; }
  @media (max-width: 900px) {
    .page-register .register-command-bar { grid-template-columns: minmax(0, 1fr); }
    .page-register .register-command-bar .search-field, .page-register .register-command-bar .filter-bar-results,
    .page-register .register-command-bar > .filter-group:last-child { grid-column: 1; grid-row: auto; justify-self: start; }
    .page-register .register-command-bar > .filter-group:not(:last-child) { grid-row: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  .register-kpis { gap: 12px; margin-bottom: 12px; }
  .reg-kpi, .page-register .reg-kpi { padding: 14px 16px; border: 1px solid var(--ix-line); border-radius: 12px; background: var(--surface-card); box-shadow: var(--ix-shadow); }
  .reg-kpi-label, .reg-sum-label { font: 500 12px/1.3 var(--font-base); letter-spacing: 0; text-transform: none; color: var(--text-secondary); }
  .reg-kpi-value { margin-top: 6px; font: 700 22px/1.1 var(--font-display); letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
  .reg-kpi-unit { font-size: 13px; font-weight: 600; }
  .reg-kpi-hint { margin-top: 4px; font-size: 12px; color: var(--text-tertiary); }
  /* The second row is supporting detail: one strip, not five more cards. */
  .register-summary, .page-register .register-summary { gap: 0; margin-bottom: 16px; border: 1px solid var(--ix-line); border-radius: 12px; background: #0f1217; overflow: hidden; }
  .reg-sum-tile, .page-register .reg-sum-tile { padding: 10px 16px; border: 0; border-right: 1px solid rgba(255, 255, 255, 0.06); border-radius: 0; background: none; }
  .reg-sum-value { font: 600 16px/1.3 var(--font-display); letter-spacing: -0.01em; color: var(--text-primary); }

  /* ---- Import: a stepper that fits, an upload area the right size ------------------ */
  .import-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; padding: 4px; gap: 2px; background: #0d0f14; border: 1px solid var(--ix-line); border-radius: 12px; }
  .import-tabs::-webkit-scrollbar { display: none; }
  .wizard-steps { display: flex; align-items: stretch; gap: 4px; overflow: visible; margin-bottom: 16px; padding: 4px; background: #0d0f14; border: 1px solid var(--ix-line); border-radius: 12px; }
  .wizard-step { flex: 1 1 0; min-width: 0; gap: 9px; padding: 7px 10px; border-radius: 8px; transition: background 0.14s ease; }
  .wizard-step-connector { display: none; }
  .wizard-step-circle { width: 24px; height: 24px; border-width: 1px; font-size: 11.5px; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); color: #a6afbd; box-shadow: none; }
  .wizard-step-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 500 12.5px/1.2 var(--font-base); color: var(--text-tertiary); }
  .wizard-step.active { background: #1e232c; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
  .wizard-step.active .wizard-step-circle { background: #2563eb; border-color: transparent; color: #fff; box-shadow: none; }
  .wizard-step.active .wizard-step-label { color: #fff; font-weight: 600; }
  .wizard-step.done .wizard-step-circle { background: rgba(52, 211, 153, 0.16); border-color: rgba(52, 211, 153, 0.4); color: #6ee7b7; }
  .wizard-step.done .wizard-step-label { color: var(--text-secondary); }
  @media (max-width: 1100px) {
    .wizard-step { flex: 0 0 auto; }
    .wizard-step:not(.active) .wizard-step-label { display: none; }
    .wizard-step.active { flex: 1 1 auto; }
  }
  .wizard-panel { min-height: 0; padding: 20px; border: 1px solid var(--ix-line); border-radius: var(--ix-radius); box-shadow: var(--ix-shadow); }
  .wizard-panel-title { font: 600 16px/1.3 var(--font-display); }
  .wizard-panel-subtitle { margin-bottom: 16px; font-size: 13px; line-height: 1.45; color: var(--text-tertiary); }
  .wizard-footer { margin-top: 16px; padding-top: 16px; }
  .import-dropzone { gap: 6px; padding: 22px 24px; border: 1px dashed rgba(255, 255, 255, 0.24); border-radius: 12px; background: #0f1217; transition: border-color 0.14s ease, background 0.14s ease; }
  .import-dropzone:hover, .import-dropzone.drag-over { border-color: #60a5fa; background: rgba(59, 130, 246, 0.08); }
  .import-dropzone .dz-icon { width: 40px; height: 40px; margin-bottom: 4px; font-size: 16px; background: rgba(255, 255, 255, 0.06); color: #a6afbd; }
  .import-dropzone .dz-title { font: 600 14.5px/1.3 var(--font-base); }
  .import-dropzone .dz-sub { font-size: 12.5px; }
  .dz-format-chip { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); color: var(--text-tertiary); }

  /* ---- Empty and loading states ---------------------------------------------------- */
  .empty-state { padding: 40px 20px; gap: 6px; }
  .empty-state .empty-icon { width: 44px; height: 44px; border-radius: 12px; font-size: 17px; margin-bottom: 8px; background: rgba(255, 255, 255, 0.06); color: #a6afbd; }
  .empty-state .empty-title { font: 600 15px/1.3 var(--font-display); color: var(--text-primary); }
  .empty-state .empty-text { font-size: 13px; line-height: 1.5; color: var(--text-tertiary); max-width: 400px; }
  .ix-empty i { color: #a6afbd; }
  .ix-skel { display: block; border-radius: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); background-size: 200% 100%; animation: ix-shimmer 1.3s linear infinite; }
  @keyframes ix-shimmer { to { background-position: -200% 0; } }

  /* ---- Small things that were wrong everywhere ---------------------------------- */
  [hidden] { display: none !important; }
  .kpi-strip { grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 12px; margin: 16px 0; }
  .legend-dot { box-shadow: none; }
  .sidebar-nav a.active .nav-item-badge { background: rgba(0, 0, 0, 0.28); color: #fff; }
  .dropdown-panel .dd-item.selected { color: #fff; background: rgba(59, 130, 246, 0.24); }

  /* ---- Filter chips: what is applied, removable in one click ---------------------- */
  .ix-fchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
  .ix-fchip {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 10px; border-radius: 999px;
    font: 500 12.5px/1 var(--font-base); color: #dbe7ff; background: rgba(59, 130, 246, 0.14); border: 1px solid rgba(96, 165, 250, 0.3);
  }
  .ix-fchip b { font-weight: 600; color: #fff; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ix-fchip button { width: 20px; height: 20px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: #a9c6ff; cursor: pointer; font-size: 10px; transition: background 0.12s ease, color 0.12s ease; }
  .ix-fchip button:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
  .ix-fchips__clear { border: 0; background: none; padding: 0 6px; font: 600 12.5px/1 var(--font-base); color: #8ab4ff; cursor: pointer; }
  .ix-fchips__clear:hover { color: #fff; }
  .ix-fchips__none { font-size: 12.5px; color: var(--text-tertiary); }
}
@media (prefers-reduced-motion: reduce) { .ix-skel { animation: none; } }
