/* =====================================================================
   KXPL AEC IQ — design system of the new look (V2.18, Batch 6 item 3)
   Everything here applies only under <html data-ui="3"> (js/core/uiflag.js) and only on screen:
   the <link> carries media="screen", so prints never see this file. PDF and Excel are built from
   data by the report engine and are not styled from here.
   1 tokens · 2 base · 3 shell · 4 components · 5 tables · 6 forms · 7 states · 8 navigation aids
   9 sign-in · 10 responsive
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
html[data-ui="3"] {
  /* brand (keplerxpvtltd.com): green #50d890, blue #4f98ca, dark #272727, light #effffb */
  --kx-ink: #17302f;              /* brand teal-ink, used for the shell */
  --kx-shell: #0f2326;
  --kx-green-aa: #1b7d4c;         /* brand green darkened: 5.2:1 with white text */
  --kx-blue-aa: #2a6690;          /* brand blue darkened: 6.0:1 with white text */
  --kx-gradient-aa: linear-gradient(135deg, var(--kx-green-aa), var(--kx-blue-aa));

  --primary: var(--kx-green-aa);
  --primary-hover: #166a40;
  --primary-ink: #17683f;
  --secondary: var(--kx-blue-aa);
  --secondary-ink: #245a80;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #f6f9f8;
  --surface-3: #ecf2f0;
  --text: #1c2625;
  --text-2: #3f4d4b;
  --text-3: #566764;              /* 5.6:1 on white, 5.2:1 on --bg */
  --border: #dde6e3;
  --border-strong: #c3d1cd;
  --sidebar-bg: var(--kx-shell);
  --sidebar-text: #d9e7e3;
  --sidebar-muted: #9db3ae;
  --focus: #2a6690;

  /* status (one meaning each, all 4.5:1 or better on their background) */
  --st-draft: #46524f;    --st-draft-bg: #e9eeec;
  --st-pending: #855408;  --st-pending-bg: #fdf0d3;
  --st-approved: #17683f; --st-approved-bg: #dcf5e7;
  --st-rejected: #a3261d; --st-rejected-bg: #fde5e2;
  --st-outdated: #5a4a86; --st-outdated-bg: #ece8f6;
  --ok: var(--st-approved); --ok-bg: var(--st-approved-bg);
  --warn: var(--st-pending); --warn-bg: var(--st-pending-bg);
  --danger: var(--st-rejected); --danger-bg: var(--st-rejected-bg);
  --info: #245a80; --info-bg: #e1eef7;
  --neutral: var(--st-draft); --neutral-bg: var(--st-draft-bg);
  --ai: #6a3fb8; --ai-bg: #f0eafa;

  /* type: one family, one scale */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 11.5px; --fs-sm: 12.5px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 24px;
  /* spacing, radius, shadow */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --radius-sm: 6px; --radius: 10px; --radius-lg: 14px; --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(15,35,38,.06);
  --shadow: 0 1px 2px rgba(15,35,38,.05), 0 4px 12px rgba(15,35,38,.05);
  --shadow-lg: 0 12px 40px rgba(15,35,38,.20);
  --header-h: 56px;
  --sidebar-w: 256px;
  --row-py: 8px;                  /* table density */
}
html[data-ui="3"][data-theme="dark"] {
  --bg: #0c1719; --surface: #132225; --surface-2: #182b2e; --surface-3: #1e3437;
  --text: #e8f1ef; --text-2: #c2d3cf; --text-3: #9fb4af;
  --border: #27403f; --border-strong: #375654;
  --primary: #2a9a62; --primary-hover: #33aa6e; --primary-ink: #7be0ab; --secondary-ink: #8cc3e6;
  --sidebar-bg: #081214; --focus: #8cc3e6;
  --st-draft: #c2d3cf;    --st-draft-bg: #24393a;
  --st-pending: #f3c26a;  --st-pending-bg: #3d3113;
  --st-approved: #7be0ab; --st-approved-bg: #143a28;
  --st-rejected: #ff9d91; --st-rejected-bg: #452019;
  --st-outdated: #c3b3ee; --st-outdated-bg: #2c2647;
  --info: #8cc3e6; --info-bg: #15303f; --ai: #c3a9f5; --ai-bg: #2c2247;
  --shadow: 0 1px 2px rgba(0,0,0,.45); --shadow-lg: 0 12px 40px rgba(0,0,0,.6);
}

/* ---------- 2. Base ---------- */
html[data-ui="3"] body { font-size: var(--fs-md); line-height: 1.5; -webkit-font-smoothing: antialiased; }
html[data-ui="3"] h1 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.015em; }
html[data-ui="3"] h2 { font-size: var(--fs-lg); font-weight: 650; }
html[data-ui="3"] h3 { font-size: var(--fs-md); font-weight: 650; }
html[data-ui="3"] h4 { font-size: var(--fs-sm); font-weight: 650; }
html[data-ui="3"] .small { font-size: var(--fs-sm); }
html[data-ui="3"] a { color: var(--secondary-ink); }
html[data-ui="3"] :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
html[data-ui="3"] ::selection { background: rgba(80,216,144,.35); }
@media (prefers-reduced-motion: reduce) { html[data-ui="3"] *, html[data-ui="3"] *::before, html[data-ui="3"] *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- 3. Shell: sidebar, top bar ---------- */
html[data-ui="3"] .app { grid-template-columns: var(--sidebar-w) 1fr; transition: grid-template-columns .16s ease; }
html[data-ui="3"] .sidebar { background: var(--sidebar-bg); }
html[data-ui="3"] .brand { padding: 14px 14px 10px; }
html[data-ui="3"] .brand .logo-box { min-height: 44px; padding: 6px 8px; border-radius: var(--radius-sm); }
html[data-ui="3"] .brand .logo-box img { max-height: 56px; }
html[data-ui="3"] .brand .tagline { color: #7fe3ae; }
html[data-ui="3"] .nav { padding: 6px 8px 16px; }
html[data-ui="3"] .nav a { font-size: 13px; padding: 7px 10px; border-radius: var(--radius-sm); min-height: 34px; }
html[data-ui="3"] .nav a.active { background: rgba(80,216,144,.18); box-shadow: inset 3px 0 0 var(--kx-green); font-weight: 600; }
html[data-ui="3"] .nav a .sn { color: var(--sidebar-muted); font-variant-numeric: tabular-nums; }
html[data-ui="3"] .sidebar-foot { color: var(--sidebar-muted); }
/* favourites and recent screens above the menu */
html[data-ui="3"] .kx-quick { padding: 6px 8px 0; }
html[data-ui="3"] .kx-quick h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--sidebar-muted); padding: 8px 10px 4px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
html[data-ui="3"] .kx-quick a { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: var(--radius-sm); color: var(--sidebar-text); font-size: 12.5px; }
html[data-ui="3"] .kx-quick a:hover { background: rgba(239,255,251,.07); text-decoration: none; }
html[data-ui="3"] .kx-quick a .sn { color: var(--sidebar-muted); font-size: 11px; min-width: 30px; font-variant-numeric: tabular-nums; }
html[data-ui="3"] .kx-quick a svg { width: 14px; height: 14px; flex: none; }
/* collapsed sidebar (icon rail): icons with the section number, labels as tooltips */
html[data-ui="3"] .app.kx-rail { --sidebar-w: 64px; }
html[data-ui="3"] .app.kx-rail .brand .product, html[data-ui="3"] .app.kx-rail .brand .tagline, html[data-ui="3"] .app.kx-rail .nav-tools, html[data-ui="3"] .app.kx-rail .sidebar-foot, html[data-ui="3"] .app.kx-rail .kx-quick h4 span, html[data-ui="3"] .app.kx-rail .nav a > span:not(.sn), html[data-ui="3"] .app.kx-rail .kx-quick a > span:not(.sn), html[data-ui="3"] .app.kx-rail .nav-group .car { display: none; }
html[data-ui="3"] .app.kx-rail .brand { padding: 10px 6px; }
html[data-ui="3"] .app.kx-rail .brand .logo-box { padding: 3px; min-height: 36px; }
html[data-ui="3"] .app.kx-rail .nav, html[data-ui="3"] .app.kx-rail .kx-quick { padding-left: 6px; padding-right: 6px; }
html[data-ui="3"] .app.kx-rail .nav-group { font-size: 0; padding: 8px 0 2px; justify-content: center; }
html[data-ui="3"] .app.kx-rail .nav-group .gi { font-size: 10.5px; margin: 0 auto; }
html[data-ui="3"] .app.kx-rail .nav a, html[data-ui="3"] .app.kx-rail .kx-quick a { flex-direction: column; gap: 1px; padding: 6px 2px; justify-content: center; align-items: center; }
html[data-ui="3"] .app.kx-rail .nav a .sn, html[data-ui="3"] .app.kx-rail .kx-quick a .sn { font-size: 9.5px; min-width: 0; width: auto; }
html[data-ui="3"] .app.kx-rail .nav a svg { width: 18px; height: 18px; }
html[data-ui="3"] .app.kx-rail .kx-quick h4 { justify-content: center; padding: 6px 0 2px; }

html[data-ui="3"] .topbar { height: var(--header-h); gap: var(--sp-2); padding: 0 var(--sp-4); box-shadow: var(--shadow-1); }
html[data-ui="3"] .topbar select, html[data-ui="3"] .topbar input { height: 36px; }
html[data-ui="3"] .topbar #project-select { max-width: 300px; font-weight: 600; border-radius: var(--radius-sm); background-color: var(--surface-2); }
html[data-ui="3"] .icon-btn { width: 36px; height: 36px; border-radius: var(--radius-sm); border-color: transparent; background: transparent; }
html[data-ui="3"] .icon-btn:hover { background: var(--surface-3); }
html[data-ui="3"] .search-wrap { max-width: 380px; }
html[data-ui="3"] .search-wrap input { border-radius: var(--radius-sm); background: var(--surface-2); }
html[data-ui="3"] .kx-kbd { font: 600 11px/1 var(--font); color: var(--text-3); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; background: var(--surface); white-space: nowrap; }
html[data-ui="3"] .kx-cmdk-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-3); font: inherit; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; }
html[data-ui="3"] .kx-cmdk-btn:hover { border-color: var(--border-strong); color: var(--text); }
html[data-ui="3"] .user-chip { border-color: var(--border); border-radius: var(--radius-pill); }
html[data-ui="3"] .user-chip .av { background: var(--kx-gradient-aa); }
html[data-ui="3"] .popover { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
html[data-ui="3"] .content { padding: var(--sp-4) var(--sp-5) 48px; }

/* breadcrumb bar with Back and the favourite star (replaces the small crumb line of the classic look) */
html[data-ui="3"] .page-head .crumb, html[data-ui="3"] #view > .crumb { display: none; }
html[data-ui="3"] .kx-crumbs { display: flex; align-items: center; gap: var(--sp-2); margin: -4px 0 var(--sp-3); min-height: 30px; font-size: var(--fs-sm); color: var(--text-3); flex-wrap: wrap; }
html[data-ui="3"] .kx-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; min-width: 0; }
html[data-ui="3"] .kx-crumbs li { display: flex; align-items: center; gap: 6px; }
html[data-ui="3"] .kx-crumbs li + li::before { content: "›"; color: var(--border-strong); }
html[data-ui="3"] .kx-crumbs a { color: var(--text-3); }
html[data-ui="3"] .kx-crumbs a:hover { color: var(--text); }
html[data-ui="3"] .kx-crumbs [aria-current] { color: var(--text); font-weight: 600; }
html[data-ui="3"] .kx-crumb-btn { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
html[data-ui="3"] .kx-crumb-btn:hover { background: var(--surface-3); }
html[data-ui="3"] .kx-crumb-btn[aria-pressed="true"] { color: #8a6100; border-color: #e3c36a; background: #fff8e1; }
html[data-ui="3"][data-theme="dark"] .kx-crumb-btn[aria-pressed="true"] { color: #f3c26a; background: #3d3113; border-color: #6a531c; }
html[data-ui="3"] .kx-crumbs .sp { flex: 1; }

/* ---------- 4. Components ---------- */
html[data-ui="3"] .btn { height: 36px; padding: 0 14px; border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 600; border-color: var(--border-strong); transition: background .12s, box-shadow .12s, border-color .12s; }
html[data-ui="3"] .btn:hover { background: var(--surface-3); }
html[data-ui="3"] .btn-primary { background: var(--kx-gradient-aa); color: #fff; border: 0; }
html[data-ui="3"] .btn-primary:hover { background: linear-gradient(135deg, #166a40, #235779); box-shadow: 0 3px 10px rgba(27,125,76,.35); }
html[data-ui="3"] .btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
html[data-ui="3"] .btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
html[data-ui="3"] .btn:disabled { opacity: .5; }
html[data-ui="3"] .btn-link { color: var(--secondary-ink); }

html[data-ui="3"] input, html[data-ui="3"] select, html[data-ui="3"] textarea { font-size: var(--fs-sm); border-radius: var(--radius-sm); border-color: var(--border-strong); min-height: 34px; padding: 6px 10px; }
html[data-ui="3"] input:focus, html[data-ui="3"] select:focus, html[data-ui="3"] textarea:focus { outline: 2px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 0; border-color: var(--focus); }
html[data-ui="3"] input[type=checkbox], html[data-ui="3"] input[type=radio] { min-height: 0; padding: 0; accent-color: var(--kx-green-aa); }
html[data-ui="3"] input::placeholder, html[data-ui="3"] textarea::placeholder { color: var(--text-3); opacity: 1; }

html[data-ui="3"] .card { border-radius: var(--radius); border-color: var(--border); box-shadow: var(--shadow); }
html[data-ui="3"] .card-h { padding: var(--sp-3) var(--sp-4); }
html[data-ui="3"] .card-b { padding: var(--sp-4); }
html[data-ui="3"] .grid { gap: var(--sp-4); }
html[data-ui="3"] .page-head { margin-bottom: var(--sp-4); align-items: center; }
html[data-ui="3"] .page-head .sub { color: var(--text-3); font-size: var(--fs-sm); }

/* KPI cards */
html[data-ui="3"] .kpi { padding: var(--sp-4); border-radius: var(--radius); }
html[data-ui="3"] .kpi::before { width: 3px; background: var(--kx-gradient); }
html[data-ui="3"] .kpi .lbl { font-size: var(--fs-xs); letter-spacing: .06em; color: var(--text-3); }
html[data-ui="3"] .kpi .val { font-size: var(--fs-2xl); font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; color: var(--text); }
html[data-ui="3"] .kpi .foot { font-size: var(--fs-xs); color: var(--text-3); margin-top: 4px; }
html[data-ui="3"] .kpi:hover { box-shadow: 0 6px 18px rgba(15,35,38,.12); }


/* quick actions row on the dashboards */
html[data-ui="3"] .kx-qa { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-4); align-items: center; }
html[data-ui="3"] .kx-qa > span { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 650; margin-right: 4px; }
html[data-ui="3"] .kx-qa a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--text); font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow-1); }
html[data-ui="3"] .kx-qa a:hover { border-color: var(--kx-green-aa); text-decoration: none; background: var(--surface-2); }
html[data-ui="3"] .kx-qa a svg { width: 15px; height: 15px; color: var(--primary-ink); }

html[data-ui="3"] .tabs { gap: 4px; margin-bottom: var(--sp-4); }
html[data-ui="3"] .tabs button { padding: 10px 14px; font-size: var(--fs-sm); color: var(--text-3); border-bottom-width: 2px; border-radius: 6px 6px 0 0; }
html[data-ui="3"] .tabs button:hover { color: var(--text); background: var(--surface-3); }
html[data-ui="3"] .tabs button.active { color: var(--primary-ink); border-bottom-color: var(--kx-green-aa); }
html[data-ui="3"] .chip { border-radius: var(--radius-pill); padding: 5px 12px; font-size: 12px; color: var(--text-2); }

/* badges: one look per meaning, set by js/core/ui3.js from the status text (data-st) */
html[data-ui="3"] .badge { border-radius: var(--radius-pill); padding: 2px 9px; font-size: 11.5px; font-weight: 650; background: var(--st-draft-bg); color: var(--st-draft); }
html[data-ui="3"] .b-ok { background: var(--ok-bg); color: var(--ok); }
html[data-ui="3"] .b-info { background: var(--info-bg); color: var(--info); }
html[data-ui="3"] .b-warn, html[data-ui="3"] .b-demo { background: var(--warn-bg); color: var(--warn); }
html[data-ui="3"] .b-danger { background: var(--danger-bg); color: var(--danger); }
html[data-ui="3"] .b-ai { background: var(--ai-bg); color: var(--ai); }
html[data-ui="3"] .badge[data-st]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
html[data-ui="3"] .badge[data-st="draft"] { background: var(--st-draft-bg); color: var(--st-draft); }
html[data-ui="3"] .badge[data-st="pending"] { background: var(--st-pending-bg); color: var(--st-pending); }
html[data-ui="3"] .badge[data-st="approved"] { background: var(--st-approved-bg); color: var(--st-approved); }
html[data-ui="3"] .badge[data-st="rejected"] { background: var(--st-rejected-bg); color: var(--st-rejected); }
html[data-ui="3"] .badge[data-st="outdated"] { background: var(--st-outdated-bg); color: var(--st-outdated); text-decoration: line-through; text-decoration-color: color-mix(in srgb, currentColor 55%, transparent); }
html[data-ui="3"] .steps span.on { background: var(--st-approved-bg); color: var(--st-approved); }

html[data-ui="3"] .alert { border-radius: var(--radius-sm); padding: 10px 14px; font-size: var(--fs-sm); }
html[data-ui="3"] .alert.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
html[data-ui="3"] .alert.danger { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
html[data-ui="3"] .alert.info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
html[data-ui="3"] .alert.ok { background: var(--ok-bg); color: var(--ok); }
html[data-ui="3"] .demo-banner { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-sm); }
html[data-ui="3"] .backend-note { color: var(--info); }

html[data-ui="3"] .modal-bg { background: rgba(8,18,20,.6); backdrop-filter: blur(2px); }
html[data-ui="3"] .modal { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: 90vh; }
html[data-ui="3"] .modal-bg.maxed .modal { max-height: none; }
html[data-ui="3"] .modal-h { padding: var(--sp-3) var(--sp-4); }
html[data-ui="3"] .modal-b { padding: var(--sp-4); flex: 1 1 auto; min-height: 0; }
/* the Save / Cancel bar stays in view at the bottom of the window whatever the length of the form */
html[data-ui="3"] .modal-f { padding: var(--sp-3) var(--sp-4); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); position: sticky; bottom: 0; flex: none; }
html[data-ui="3"] .kx-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: var(--sp-2); justify-content: flex-end; align-items: center; padding: var(--sp-3) var(--sp-4); margin-top: var(--sp-4); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 -4px 16px rgba(15,35,38,.08); }

/* toasts: success and error, with an icon and a close button */
html[data-ui="3"] .toasts { bottom: 20px; right: 20px; gap: var(--sp-2); }
html[data-ui="3"] .toast { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--kx-green-aa); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); max-width: 440px; animation: kx3-in .16s ease-out; }
html[data-ui="3"] .toast.err { border-left-color: var(--st-rejected); }
html[data-ui="3"] .toast .kx-t-ic { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--st-approved-bg); color: var(--st-approved); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
html[data-ui="3"] .toast.err .kx-t-ic { background: var(--st-rejected-bg); color: var(--st-rejected); }
html[data-ui="3"] .toast .kx-t-x { margin-left: auto; flex: none; border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
@keyframes kx3-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 5. Tables ---------- */
html[data-ui="3"] .tbl-tools { padding: var(--sp-2) var(--sp-3); gap: var(--sp-2); }
html[data-ui="3"] .tbl-wrap { max-height: 70vh; }
html[data-ui="3"] table.t { font-size: var(--fs-sm); }
html[data-ui="3"] table.t th { background: var(--surface-2); color: var(--text-2); font-size: 11.5px; letter-spacing: .04em; padding: 9px 10px; border-bottom: 1px solid var(--border-strong); position: sticky; top: 0; z-index: 2; }
html[data-ui="3"] table.t td { padding: var(--row-py) 10px; border-bottom-color: var(--border); }
html[data-ui="3"] table.t tbody tr:hover td { background: var(--surface-2); }
html[data-ui="3"] table.t tfoot td { background: var(--surface-3); }
html[data-ui="3"][data-density="compact"] { --row-py: 4px; }
html[data-ui="3"][data-density="compact"] table.t { font-size: 12px; }
html[data-ui="3"][data-density="compact"] table.t th { padding: 6px 8px; }
html[data-ui="3"][data-density="compact"] table.t td { padding-left: 8px; padding-right: 8px; }
/* numbers: right-aligned, equal-width digits (cells marked by the screens, and number-only cells marked by ui3.js) */
html[data-ui="3"] table.t td.num, html[data-ui="3"] table.t th.num, html[data-ui="3"] table.t td.kx-num, html[data-ui="3"] table.t th.kx-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* row actions: always the last column, kept in view while the table scrolls sideways */
html[data-ui="3"] table.t td.kx-act { position: sticky; right: 0; background: var(--surface); box-shadow: -6px 0 6px -6px rgba(15,35,38,.18); white-space: nowrap; text-align: right; }
html[data-ui="3"] table.t tbody tr:hover td.kx-act { background: var(--surface-2); }
html[data-ui="3"] table.t th.kx-act { position: sticky; right: 0; z-index: 3; text-align: right; }
/* table tools added by the new look: columns, filters, density, page size */
html[data-ui="3"] .kx-tt { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 6px var(--sp-3); border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.kx-tw { max-width: 100%; overflow-x: auto; }
html[data-ui="3"] .kx-tt .kx-tt-n { margin-right: auto; font-size: 12px; color: var(--text-3); }
html[data-ui="3"] .kx-tt button, html[data-ui="3"] .kx-tt select { height: 28px; min-height: 28px; padding: 0 9px; font: inherit; font-size: 12px; font-weight: 600; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
html[data-ui="3"] .kx-tt button:hover { background: var(--surface-3); }
html[data-ui="3"] .kx-tt button[aria-pressed="true"] { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); }
html[data-ui="3"] .kx-colmenu { position: fixed; z-index: 300; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; max-height: 60vh; overflow: auto; min-width: 200px; font-size: var(--fs-sm); }
html[data-ui="3"] .kx-colmenu label { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 5px; cursor: pointer; }
html[data-ui="3"] .kx-colmenu label:hover { background: var(--surface-3); }
html[data-ui="3"] tr.kx-frow th { position: sticky; z-index: 2; background: var(--surface); padding: 4px 6px; border-bottom: 1px solid var(--border-strong); text-transform: none; letter-spacing: 0; }
html[data-ui="3"] tr.kx-frow input { width: 100%; min-width: 46px; min-height: 26px; height: 26px; padding: 2px 6px; font-size: 12px; font-weight: 400; }
html[data-ui="3"] tr.kx-fhide, html[data-ui="3"] tr.kx-phide { display: none; }
html[data-ui="3"] .kx-pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 6px var(--sp-3); font-size: 12px; color: var(--text-3); border-top: 1px solid var(--border); }
html[data-ui="3"] .kx-pager button { height: 26px; padding: 0 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); cursor: pointer; font: inherit; font-size: 12px; }
html[data-ui="3"] .kx-pager button:disabled { opacity: .45; cursor: default; }
html[data-ui="3"] .pager { justify-content: flex-end; }

/* ---------- 6. Forms ---------- */
html[data-ui="3"] label.f { font-size: var(--fs-sm); color: var(--text-2); gap: 5px; }
html[data-ui="3"] .form-grid { gap: var(--sp-3) var(--sp-4); }
html[data-ui="3"] .kx-req { color: var(--st-rejected); font-weight: 700; margin-left: 2px; }
html[data-ui="3"] .kx-help { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 5px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-3); font: 700 10.5px/1 var(--font); cursor: help; vertical-align: 1px; padding: 0; position: relative; }
html[data-ui="3"] .kx-help:hover, html[data-ui="3"] .kx-help:focus-visible { color: var(--text); border-color: var(--text-3); }
html[data-ui="3"] .kx-tip { position: fixed; z-index: 400; max-width: 300px; background: #1c2625; color: #f1f7f5; font-size: 12px; font-weight: 400; line-height: 1.45; padding: 7px 10px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); pointer-events: none; }
html[data-ui="3"] .kx-invalid { border-color: var(--st-rejected) !important; background: color-mix(in srgb, var(--st-rejected-bg) 45%, var(--surface)); }
html[data-ui="3"] .kx-err { color: var(--st-rejected); font-size: 12px; font-weight: 500; }
html[data-ui="3"] .kx-draft { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--info-bg); color: var(--info); border-radius: var(--radius-sm); padding: 8px 12px; font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
html[data-ui="3"] .kx-draft button { height: 26px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
html[data-ui="3"] .modal-b h3, html[data-ui="3"] .modal-b h4 { margin: var(--sp-4) 0 var(--sp-2); padding-bottom: 6px; border-bottom: 1px solid var(--border); }
html[data-ui="3"] .modal-b > h3:first-child, html[data-ui="3"] .modal-b > h4:first-child { margin-top: 0; }

/* ---------- 7. States ---------- */
html[data-ui="3"] .tbl-empty, html[data-ui="3"] .empty-state { padding: 36px 20px; color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
html[data-ui="3"] .tbl-empty::before, html[data-ui="3"] .empty-state:not(.small)::before { content: ""; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3) center / 22px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23566764' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M4 12h10M4 17h6'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3Cpath d='m20.5 18.5 1.5 1.5'/%3E%3C/svg%3E"); }
html[data-ui="3"] .empty-state h2 { color: var(--text); }
html[data-ui="3"] .kx-empty-act { margin-top: 2px; }
/* skeleton while a screen is being drawn (the view is empty until the module has rendered) */
html[data-ui="3"] #view:empty { min-height: 60vh; background:
  linear-gradient(var(--surface-3), var(--surface-3)) 0 6px / 260px 26px no-repeat,
  linear-gradient(var(--surface-3), var(--surface-3)) 0 44px / 420px 12px no-repeat,
  linear-gradient(var(--surface-3), var(--surface-3)) 0 84px / 23.5% 86px no-repeat,
  linear-gradient(var(--surface-3), var(--surface-3)) 25.5% 84px / 23.5% 86px no-repeat,
  linear-gradient(var(--surface-3), var(--surface-3)) 51% 84px / 23.5% 86px no-repeat,
  linear-gradient(var(--surface-3), var(--surface-3)) 76.5% 84px / 23.5% 86px no-repeat,
  linear-gradient(var(--surface-3), var(--surface-3)) 0 194px / 100% 320px no-repeat;
  border-radius: var(--radius); animation: kx3-pulse 1.1s ease-in-out infinite alternate; }
@keyframes kx3-pulse { from { opacity: .55; } to { opacity: 1; } }
html[data-ui="3"] .kx-tasks-btn { border-radius: var(--radius-pill); box-shadow: var(--shadow-lg); }

/* ---------- 8. Command palette ---------- */
html[data-ui="3"] .kx-cmdk { position: fixed; inset: 0; z-index: 500; background: rgba(8,18,20,.55); backdrop-filter: blur(2px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
html[data-ui="3"] .kx-cmdk-box { width: min(680px, 100%); background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; border: 1px solid var(--border); }
html[data-ui="3"] .kx-cmdk-in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
html[data-ui="3"] .kx-cmdk-in svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
html[data-ui="3"] .kx-cmdk-in input { flex: 1; border: 0; outline: 0; background: none; font-size: var(--fs-lg); min-height: 30px; padding: 0; }
html[data-ui="3"] .kx-cmdk-list { overflow: auto; padding: 6px; }
html[data-ui="3"] .kx-cmdk-g { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); font-weight: 650; padding: 10px 10px 4px; }
html[data-ui="3"] .kx-cmdk-o { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: var(--fs-sm); }
html[data-ui="3"] .kx-cmdk-o .k { color: var(--text-3); font-size: 11.5px; min-width: 64px; font-variant-numeric: tabular-nums; }
html[data-ui="3"] .kx-cmdk-o .s { margin-left: auto; color: var(--text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
html[data-ui="3"] .kx-cmdk-o.hi { background: var(--info-bg); color: var(--text); }
html[data-ui="3"] .kx-cmdk-o mark { background: rgba(80,216,144,.35); color: inherit; border-radius: 2px; }
html[data-ui="3"] .kx-cmdk-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); background: var(--surface-2); flex-wrap: wrap; }
html[data-ui="3"] .kx-cmdk-none { padding: 26px; text-align: center; color: var(--text-3); font-size: var(--fs-sm); }

/* ---------- 9. Sign-in: showcase left, panel right ---------- */
html[data-ui="3"] #kx-gate.kx-gate3 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); padding: 0; background: var(--bg); align-items: stretch; justify-content: stretch; overflow: auto; }
html[data-ui="3"] .kx-show { position: relative; overflow: hidden; color: #eafaf4; background: radial-gradient(1200px 700px at 15% 0%, #1d4a48 0%, transparent 60%), linear-gradient(160deg, #0b1d21 0%, #102e32 55%, #123a4a 100%); display: flex; }
html[data-ui="3"] .kx-show-bg { position: absolute; inset: 0; width: 100%; height: 100%; color: #7fe3ae; opacity: .22; pointer-events: none; }
html[data-ui="3"] .kx-show-in { position: relative; display: flex; flex-direction: column; gap: 18px; padding: clamp(28px, 5vw, 64px); width: 100%; max-width: 760px; margin: auto; }
html[data-ui="3"] .kx-show-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .1em; font-size: 13px; }
html[data-ui="3"] .kx-show-mark { padding: 5px 10px; border-radius: 6px; background: linear-gradient(135deg, #50d890, #4f98ca); color: #06151d; }
html[data-ui="3"] .kx-show-prod { color: #c9efe0; }
html[data-ui="3"] .kx-show-tag { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.05; font-weight: 800; letter-spacing: .02em; margin: 6px 0 0; background: linear-gradient(90deg, #ffffff 0%, #8af0b4 60%, #9cc7e6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-ui="3"] .kx-show-lead { margin: 0; font-size: 16px; color: #cfe6df; max-width: 520px; }
html[data-ui="3"] .kx-slider { margin-top: 14px; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); padding: 20px 22px 14px; backdrop-filter: blur(4px); max-width: 560px; }
html[data-ui="3"] .kx-slider:focus-visible { outline: 2px solid #8af0b4; outline-offset: 3px; }
html[data-ui="3"] .kx-slides { display: grid; }
html[data-ui="3"] .kx-slide { grid-area: 1 / 1; display: flex; gap: 16px; align-items: flex-start; opacity: 0; visibility: hidden; transform: translateX(10px); transition: opacity .35s ease, transform .35s ease, visibility 0s .35s; min-height: 108px; }
html[data-ui="3"] .kx-slide.on { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .35s ease; }
html[data-ui="3"] .kx-slide-ic { flex: none; width: 60px; height: 60px; border-radius: 14px; background: linear-gradient(135deg, rgba(80,216,144,.28), rgba(79,152,202,.28)); border: 1px solid rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; color: #b4f5d2; }
html[data-ui="3"] .kx-slide-ic svg { width: 34px; height: 34px; }
html[data-ui="3"] .kx-slide h2 { font-size: 19px; color: #fff; margin: 2px 0 6px; }
html[data-ui="3"] .kx-slide p { margin: 0; font-size: 14px; line-height: 1.5; color: #d3e8e1; }
html[data-ui="3"] .kx-slider-ctl { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
html[data-ui="3"] .kx-sl-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.06); color: #eafaf4; cursor: pointer; font-size: 15px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
html[data-ui="3"] .kx-sl-btn:hover { background: rgba(255,255,255,.16); }
html[data-ui="3"] .kx-sl-pause { font-size: 10px; margin-left: auto; }
html[data-ui="3"] .kx-sl-btn:focus-visible, html[data-ui="3"] .kx-dot:focus-visible { outline: 2px solid #8af0b4; outline-offset: 2px; }
html[data-ui="3"] .kx-dots { display: flex; gap: 2px; align-items: center; }
html[data-ui="3"] .kx-dot { width: 24px; height: 24px; border: 0; background: none; cursor: pointer; padding: 0; position: relative; }
html[data-ui="3"] .kx-dot::after { content: ""; position: absolute; left: 7px; top: 10px; width: 10px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.4); transition: all .2s; }
html[data-ui="3"] .kx-dot.on::after { left: 2px; width: 20px; background: #50d890; }
html[data-ui="3"] .kx-show-foot { margin-top: 18px; font-size: 12px; color: #a9c9bf; letter-spacing: .03em; }

html[data-ui="3"] .kx-gate-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 22px; min-height: 100vh; background: var(--bg); }
html[data-ui="3"] .kx-gate3 .kx-gate-card { max-width: 400px; width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: 0 10px 36px rgba(15,35,38,.12); padding: 28px 28px 18px; background: var(--surface); text-align: center; }
html[data-ui="3"] .kx-gate3 .kx-gate-logo { width: 150px; height: auto; max-height: none; margin-bottom: 8px; }
html[data-ui="3"] .kx-gate3 .kx-gate-title { font-size: 17px; letter-spacing: .08em; }
html[data-ui="3"] .kx-gate3 .kx-gate-sub { color: var(--text-2); font-size: var(--fs-sm); }
html[data-ui="3"] .kx-gate3 .kx-gate-card .f { margin-bottom: 10px; }
html[data-ui="3"] .kx-gate3 .kx-gate-card .f input { min-height: 40px; font-size: 14px; }
html[data-ui="3"] .kx-gate3 .kx-gate-btn { min-height: 42px; font-size: 14px; }
html[data-ui="3"] .kx-gate3 .kx-gate-msg { font-size: var(--fs-sm); text-align: left; }
html[data-ui="3"] .kx-gate3 .kx-gate-msg.err { color: var(--st-rejected); font-weight: 600; }
html[data-ui="3"] .kx-gate3 .kx-gate-msg.err:not(:empty)::before { content: "! "; font-weight: 800; }
html[data-ui="3"] .kx-gate3 .kx-gate-msg.ok { color: var(--text-3); }
html[data-ui="3"] .kx-gate3 .kx-login-tc { text-align: left; }
html[data-ui="3"] .kx-login-links { display: flex; gap: 14px; justify-content: space-between; text-align: left; }
html[data-ui="3"] .kx-login-links a { color: var(--secondary-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
html[data-ui="3"] .kx-forgot { text-align: left; font-size: var(--fs-sm); line-height: 1.5; background: var(--info-bg); color: var(--text); border-radius: var(--radius-sm); padding: 10px 12px; margin: 4px 0 8px; }
html[data-ui="3"] .kx-gate-mhead { display: none; }
html[data-ui="3"] #kx-gate.kx-gate3.kx-gate-wide { grid-template-columns: 1fr; }
html[data-ui="3"] #kx-gate.kx-gate3.kx-gate-wide .kx-show { display: none; }
html[data-ui="3"] #kx-gate.kx-gate3.kx-gate-wide .kx-gate-card { max-width: 860px; }
html[data-ui="3"] #kx-gate.kx-gate3.kx-gate-wide .kx-gate-logo { width: 90px; }

/* ---------- 10. Responsive ---------- */
@media (max-width: 1100px) { html[data-ui="3"] .kx-cmdk-btn span.t { display: none; } html[data-ui="3"] .search-wrap { max-width: 260px; } }
@media (max-width: 980px) {
  /* phone and small tablet: the sign-in panel only, under a compact brand header */
  html[data-ui="3"] #kx-gate.kx-gate3 { grid-template-columns: 1fr; }
  html[data-ui="3"] .kx-show { display: none; }
  html[data-ui="3"] .kx-gate-side { justify-content: flex-start; padding: 0 16px 28px; }
  html[data-ui="3"] .kx-gate-mhead { display: flex; align-items: center; gap: 12px; width: calc(100% + 32px); margin: 0 -16px 22px; padding: 12px 16px; background: linear-gradient(120deg, #0b1d21, #123a4a); color: #fff; }
  html[data-ui="3"] .kx-gate-mhead img { width: 64px; height: auto; background: #fff; border-radius: 8px; padding: 3px 5px; }
  html[data-ui="3"] .kx-gate-mhead b { display: block; font-size: 15px; letter-spacing: .08em; }
  html[data-ui="3"] .kx-gate-mhead span { display: block; font-size: 10.5px; letter-spacing: .12em; color: #8af0b4; }
  html[data-ui="3"] .kx-gate3 .kx-gate-card .kx-gate-logo, html[data-ui="3"] .kx-gate3 .kx-gate-card .kx-gate-title { display: none; }
  html[data-ui="3"] .kx-gate3 .kx-gate-card { padding: 20px 18px 14px; }
}
@media (max-width: 860px) {
  html[data-ui="3"] .app, html[data-ui="3"] .app.kx-rail { grid-template-columns: 1fr; --sidebar-w: 256px; }
  html[data-ui="3"] .app.kx-rail .brand .product, html[data-ui="3"] .app.kx-rail .brand .tagline, html[data-ui="3"] .app.kx-rail .sidebar-foot { display: block; }
  html[data-ui="3"] .kx-rail-btn, html[data-ui="3"] .kx-cmdk-btn .kx-kbd, html[data-ui="3"] .kx-cmdk-btn span.t { display: none; }
  html[data-ui="3"] .content { padding: var(--sp-3) var(--sp-3) 56px; }
  html[data-ui="3"] .topbar { padding: 0 var(--sp-2); gap: 6px; }
  html[data-ui="3"] .btn { min-height: 40px; }
  html[data-ui="3"] .btn-sm { min-height: 32px; }
  html[data-ui="3"] input, html[data-ui="3"] select, html[data-ui="3"] textarea { min-height: 40px; font-size: 16px; } /* 16px: iOS does not zoom the page on focus */
  html[data-ui="3"] table.t input, html[data-ui="3"] table.t select, html[data-ui="3"] tr.kx-frow input { min-height: 32px; font-size: 14px; }
  html[data-ui="3"] .modal-bg { padding: 0; align-items: stretch; }
  html[data-ui="3"] .modal { width: 100%; max-height: 100vh; border-radius: 0; }
  html[data-ui="3"] .modal-f { border-radius: 0; flex-wrap: wrap; }
  html[data-ui="3"] .kx-crumbs ol li:not(:last-child):not(:first-child) { display: none; }
  html[data-ui="3"] .kx-cmdk { padding: 0; } html[data-ui="3"] .kx-cmdk-box { max-height: 100vh; height: 100%; border-radius: 0; width: 100%; }
  html[data-ui="3"] table.t td.kx-act, html[data-ui="3"] table.t th.kx-act { position: static; box-shadow: none; }
  html[data-ui="3"] .toasts { left: 12px; right: 12px; bottom: 12px; } html[data-ui="3"] .toast { max-width: none; }
}

/* helpers set by js/core/ui3.js */
html[data-ui="3"] .kx-chide { display: none !important; }
html[data-ui="3"] .kx-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* corrections after the first screen review */
html[data-ui="3"] .nav a, html[data-ui="3"] .kx-quick a { color: var(--sidebar-text); }
html[data-ui="3"] .nav a.active { color: #fff; }
html[data-ui="3"] .search-wrap input { padding-left: 32px; }
html[data-ui="3"] table.t input, html[data-ui="3"] table.t select { min-height: 28px; padding: 3px 6px; font-size: 12.5px; }
html[data-ui="3"] table.t input[type=checkbox], html[data-ui="3"] table.t input[type=radio] { min-height: 0; width: auto; }
html[data-ui="3"] .sidebar a:focus-visible, html[data-ui="3"] .sidebar button:focus-visible { outline-color: #8af0b4; }
html[data-ui="3"] .kx-lab { display: inline-flex; align-items: center; flex-wrap: wrap; }
@media (max-width: 860px) { html[data-ui="3"] .topbar .search-wrap { display: none; } html[data-ui="3"] .topbar #project-select { flex: 1 1 auto; max-width: none; min-width: 0; } }

/* contrast corrections found by tests/b6-contrast.js (WCAG AA) */
html[data-ui="3"] .icon-btn .dot { background: #b3261e; color: #fff; }
html[data-ui="3"] .nav a .num.new { color: #9af2c1; }
html[data-ui="3"] .seg button.on { background: var(--kx-green-aa); color: #fff; }
html[data-ui="3"] .pos { color: var(--st-approved); } html[data-ui="3"] .neg { color: var(--st-rejected); }
html[data-ui="3"][data-theme="dark"] [style*="color:#c0392b"], html[data-ui="3"][data-theme="dark"] [style*="color: #c0392b"] { color: var(--st-rejected) !important; }
html[data-ui="3"][data-theme="dark"] [style*="color:#1e8e5a"], html[data-ui="3"][data-theme="dark"] [style*="color: #1e8e5a"] { color: var(--st-approved) !important; }
html[data-ui="3"] { --card: var(--surface); }

/* =====================================================================
   11. V2.20 (Batch 8 item 5): the new look made clearly different from the classic look.
   Root cause of "no visible difference": the Batch 6 look kept the classic palette, the dark sidebar and
   the same card, table and form shapes on purpose, so the two looked almost the same.
   From here: own typeface, blue primary colour on a cool grey page, light sidebar with icon tiles,
   floating header, larger radius, pill tabs, lighter tables, taller form fields.
   Still screen only (this file is media="screen"): prints, PDFs and Excel files do not change.
   ===================================================================== */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

html[data-ui="3"] {
  --kx-blue-1: #2253c9;           /* primary: 6.5:1 with white text */
  --kx-green-aa: #2253c9;         /* the accent of Batch 6 (tabs, switches, ticks) follows the new primary colour */
  --kx-gradient-aa: linear-gradient(135deg, #2253c9, #17805c);
  --primary: #2253c9; --primary-hover: #1b44a8; --primary-ink: #1e4bb8; --primary-soft: #e8eefc;
  --secondary: #17805c; --secondary-ink: #1e4bb8;
  --bg: #f2f4f8; --surface: #ffffff; --surface-2: #f7f8fb; --surface-3: #eceff5;
  --text: #131a2b; --text-2: #3a4357; --text-3: #586176;
  --border: #e3e7ef; --border-strong: #c9d0dd;
  --sidebar-bg: #ffffff; --sidebar-text: #2a3347; --sidebar-muted: #586176; --sidebar-line: #e3e7ef;
  --focus: #2253c9;
  --st-draft: #434c5e; --st-draft-bg: #eaedf3;
  --info: #1e4bb8; --info-bg: #e8eefc;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xl: 24px; --fs-2xl: 28px;
  --radius-sm: 10px; --radius: 16px; --radius-lg: 20px;
  --shadow-1: 0 1px 2px rgba(19,26,43,.05);
  --shadow: 0 1px 2px rgba(19,26,43,.04), 0 6px 20px rgba(19,26,43,.06);
  --shadow-lg: 0 16px 48px rgba(19,26,43,.22);
  --header-h: 64px; --sidebar-w: 272px; --row-py: 11px;
}
html[data-ui="3"][data-theme="dark"] {
  --kx-green-aa: #3565e6; --primary: #3565e6; --primary-hover: #4673ee; --primary-ink: #a9c0ff; --primary-soft: #1b2a55; --secondary-ink: #a9c0ff;
  --bg: #0b1020; --surface: #121a2e; --surface-2: #17213a; --surface-3: #1e2a47;
  --text: #e8ecf6; --text-2: #c3cbdd; --text-3: #9aa6c0;
  --border: #26324f; --border-strong: #36456b;
  --sidebar-bg: #0e1528; --sidebar-text: #d5dcee; --sidebar-muted: #9aa6c0; --sidebar-line: #26324f;
  --focus: #a9c0ff; --st-draft: #c3cbdd; --st-draft-bg: #24304d; --info: #a9c0ff; --info-bg: #1b2a55;
}
html[data-ui="3"] body { font-family: var(--font); font-feature-settings: "tnum" 0; letter-spacing: -.003em; }
html[data-ui="3"] button, html[data-ui="3"] input, html[data-ui="3"] select, html[data-ui="3"] textarea { font-family: var(--font); }
html[data-ui="3"] h1 { font-weight: 750; letter-spacing: -.025em; line-height: 1.2; }
html[data-ui="3"] h2, html[data-ui="3"] h3 { letter-spacing: -.012em; font-weight: 700; }
html[data-ui="3"] ::selection { background: color-mix(in srgb, var(--primary) 28%, transparent); }

/* sidebar: light, with a coloured icon tile for every screen; the open screen is a solid blue pill */
html[data-ui="3"] .sidebar { background: var(--sidebar-bg); color: var(--sidebar-text); border-right: 1px solid var(--sidebar-line); }
html[data-ui="3"] .brand { border-bottom: 0; padding: 16px 16px 8px; }
html[data-ui="3"] .brand .logo-box { background: transparent; padding: 0; justify-content: flex-start; min-height: 0; }
html[data-ui="3"][data-theme="dark"] .brand .logo-box { background: #fff; padding: 6px 8px; border-radius: 12px; }
html[data-ui="3"] .brand .logo-box img { max-height: 54px; }
html[data-ui="3"] .brand .product { color: var(--text); font-size: 13px; letter-spacing: .1em; font-weight: 800; }
html[data-ui="3"] .brand .tagline { color: var(--primary-ink); font-weight: 650; }
html[data-ui="3"] .nav-tools input { background: var(--surface-2); border-color: var(--border); color: var(--text); border-radius: 10px; height: 34px; }
html[data-ui="3"] .nav-tg { background: var(--surface-2); border-color: var(--border); color: var(--text-2); border-radius: 10px; height: 34px; width: 34px; }
html[data-ui="3"] .nav-tg.on { background: var(--primary-soft); color: var(--primary-ink); }
html[data-ui="3"] .nav { padding: 4px 12px 18px; }
html[data-ui="3"] .nav-sec .nav-group { color: var(--sidebar-muted); font-weight: 700; padding: 16px 8px 6px; }
html[data-ui="3"] .nav-sec .nav-group:hover { color: var(--text); }
html[data-ui="3"] .nav-sec .gi { background: color-mix(in srgb, var(--gc, #50d890) 18%, transparent); color: color-mix(in srgb, var(--gc, #50d890) 45%, var(--text)); font-weight: 800; border-radius: 6px; width: 18px; height: 18px; }
html[data-ui="3"] .nav a, html[data-ui="3"] .kx-quick a { color: var(--sidebar-text); font-size: 13px; font-weight: 550; padding: 5px 8px; border-radius: 12px; min-height: 40px; gap: 10px; }
html[data-ui="3"] .nav-sec .nav-items a, html[data-ui="3"] .nav-sec .nav-items a.active { box-shadow: none; }
html[data-ui="3"] .nav a:hover, html[data-ui="3"] .kx-quick a:hover { background: var(--surface-3); }
html[data-ui="3"] .nav a svg, html[data-ui="3"] .kx-quick a svg { width: 30px; height: 30px; padding: 7px; border-radius: 9px; opacity: 1; background: color-mix(in srgb, var(--gc, var(--primary)) 16%, transparent); color: color-mix(in srgb, var(--gc, var(--primary)) 55%, var(--text)); }
html[data-ui="3"] .nav-sec .nav-items a svg { color: color-mix(in srgb, var(--gc, var(--primary)) 55%, var(--text)); }
html[data-ui="3"] .nav a .sn { color: var(--sidebar-muted); min-width: 24px; }
html[data-ui="3"] .nav a.active { background: var(--primary); color: #fff; font-weight: 700; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 35%, transparent); }
html[data-ui="3"] .nav a.active .sn { color: #fff; }
html[data-ui="3"] .nav a.active svg, html[data-ui="3"] .nav-sec .nav-items a.active svg { background: rgba(255,255,255,.2); color: #fff; }
html[data-ui="3"] .nav a .num.new { background: var(--primary-soft); color: var(--primary-ink); font-weight: 700; }
html[data-ui="3"] .nav a.active .num.new { background: #fff; color: #1e4bb8; }
html[data-ui="3"] .nav a .grp { color: var(--sidebar-muted); }
html[data-ui="3"] .nav mark, html[data-ui="3"] .kx-cmdk-o mark { background: color-mix(in srgb, var(--primary) 22%, transparent); }
html[data-ui="3"] .nav-sec.collapsed.has-active > .nav-group { color: var(--primary-ink); box-shadow: none; }
html[data-ui="3"] .kx-quick { padding: 6px 12px 0; }
html[data-ui="3"] .kx-quick h4 { padding: 8px 8px 4px; }
html[data-ui="3"] .sidebar-foot { border-top: 1px solid var(--sidebar-line); color: var(--sidebar-muted); }
html[data-ui="3"] .sidebar a:focus-visible, html[data-ui="3"] .sidebar button:focus-visible { outline-color: var(--focus); }
html[data-ui="3"] .app.kx-rail .nav a, html[data-ui="3"] .app.kx-rail .kx-quick a { padding: 5px 2px; min-height: 0; }

/* header: floats on the page colour, pill-shaped fields */
html[data-ui="3"] .topbar { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; box-shadow: none; padding: 0 var(--sp-5); gap: 10px; }
html[data-ui="3"] .topbar select, html[data-ui="3"] .topbar input, html[data-ui="3"] .kx-cmdk-btn { height: 40px; }
html[data-ui="3"] .topbar #project-select, html[data-ui="3"] .search-wrap input, html[data-ui="3"] .kx-cmdk-btn { background-color: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); box-shadow: var(--shadow-1); }
html[data-ui="3"] .topbar #project-select { padding-left: 16px; }
html[data-ui="3"] .icon-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); }
html[data-ui="3"] .icon-btn:hover { background: var(--surface-3); }
html[data-ui="3"] .user-chip { background: var(--surface); box-shadow: var(--shadow-1); min-height: 40px; }
html[data-ui="3"] .popover { border-radius: var(--radius); border-color: var(--border); }
html[data-ui="3"] .content { padding: var(--sp-2) var(--sp-5) 56px; }
html[data-ui="3"] .kx-crumb-btn { border-radius: var(--radius-pill); height: 30px; padding: 0 12px; }

/* cards, dashboards */
html[data-ui="3"] .card { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
html[data-ui="3"] .card-h { padding: 14px 18px; border-bottom-color: var(--border); }
html[data-ui="3"] .card-h h3 { font-size: 15px; }
html[data-ui="3"] .card-b { padding: 18px; }
html[data-ui="3"] .card-b.flush { padding: 0; }
html[data-ui="3"] .card > .tbl-wrap:last-child, html[data-ui="3"] .card > .card-b:last-child { border-radius: 0 0 var(--radius) var(--radius); }
html[data-ui="3"] .grid { gap: 18px; }
html[data-ui="3"] .page-head { margin-bottom: var(--sp-5); }
html[data-ui="3"] .kpi { padding: 18px 18px 16px; border-radius: var(--radius); }
html[data-ui="3"] .kpi::before { left: auto; right: 16px; top: 16px; bottom: auto; width: 34px; height: 34px; border-radius: 11px; background: var(--primary-soft) center / 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232253c9' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V10M10 19V5M16 19v-7M21 19H3'/%3E%3C/svg%3E"); }
html[data-ui="3"] .grid > .kpi:nth-child(4n+2)::before { background-color: #dcf5e7; filter: hue-rotate(-75deg); }
html[data-ui="3"] .grid > .kpi:nth-child(4n+3)::before { background-color: #fdf0d3; filter: hue-rotate(160deg); }
html[data-ui="3"] .grid > .kpi:nth-child(4n+4)::before { background-color: #ece8f6; filter: hue-rotate(40deg); }
html[data-ui="3"][data-theme="dark"] .kpi::before { filter: none; background-color: var(--primary-soft); }
html[data-ui="3"] .kpi .lbl { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--text-3); padding-right: 44px; }
html[data-ui="3"] .kpi .val { font-size: var(--fs-2xl); font-weight: 750; letter-spacing: -.03em; margin-top: 10px; }
html[data-ui="3"] .kpi:hover { box-shadow: 0 10px 28px rgba(19,26,43,.12); }
html[data-ui="3"] .kx-welcome .card-b { background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 12%, transparent), color-mix(in srgb, #17805c 9%, transparent)); }
html[data-ui="3"] .kx-qa a:hover { border-color: var(--primary); }

/* buttons, tabs, chips */
html[data-ui="3"] .btn { height: 38px; padding: 0 16px; border-radius: var(--radius-sm); font-size: 13px; border-color: var(--border-strong); box-shadow: var(--shadow-1); }
html[data-ui="3"] .btn-primary { background: var(--primary); color: #fff; border: 0; box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 30%, transparent); }
html[data-ui="3"] .btn-primary:hover { background: var(--primary-hover); box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 40%, transparent); }
html[data-ui="3"] .btn-sm { height: 30px; padding: 0 11px; border-radius: 8px; box-shadow: none; }
html[data-ui="3"] .btn-link { box-shadow: none; }
html[data-ui="3"] .tabs { display: inline-flex; max-width: 100%; gap: 2px; padding: 4px; border-bottom: 0; background: var(--surface-3); border-radius: 14px; margin-bottom: var(--sp-4); }
html[data-ui="3"] .tabs button { padding: 8px 14px; border: 0; border-radius: 10px; color: var(--text-2); font-weight: 600; }
html[data-ui="3"] .tabs button:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--text); }
html[data-ui="3"] .tabs button.active { background: var(--surface); color: var(--primary-ink); box-shadow: var(--shadow-1); font-weight: 700; }
html[data-ui="3"] .seg button.on { background: var(--primary); color: #fff; }

/* tables: lighter header, more air, blue hover */
html[data-ui="3"] table.t th { background: var(--surface); color: var(--text-3); font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; padding: 12px 12px; border-bottom: 1px solid var(--border); }
html[data-ui="3"] table.t td { padding: var(--row-py) 12px; }
html[data-ui="3"] table.t tbody tr:hover td { background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
html[data-ui="3"] table.t tbody tr:hover td.kx-act { background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
html[data-ui="3"] table.t tfoot td { background: var(--surface-2); font-weight: 700; }
html[data-ui="3"][data-density="compact"] { --row-py: 5px; }
html[data-ui="3"] .tbl-tools input { border-radius: var(--radius-pill); padding-left: 14px; }
html[data-ui="3"] .kx-tt button, html[data-ui="3"] .kx-tt select, html[data-ui="3"] .kx-pager button { border-radius: 8px; }

/* forms: taller fields, soft focus ring */
html[data-ui="3"] input, html[data-ui="3"] select, html[data-ui="3"] textarea { min-height: 38px; padding: 7px 12px; border-radius: var(--radius-sm); border-color: var(--border-strong); background-color: var(--surface); }
html[data-ui="3"] input:focus, html[data-ui="3"] select:focus, html[data-ui="3"] textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
html[data-ui="3"] input[type=checkbox], html[data-ui="3"] input[type=radio] { min-height: 0; padding: 0; box-shadow: none; accent-color: var(--primary); }
html[data-ui="3"] input[type=file], html[data-ui="3"] input[type=range], html[data-ui="3"] input[type=color] { box-shadow: none; }
html[data-ui="3"] label.f { font-weight: 600; color: var(--text-2); gap: 6px; }
html[data-ui="3"] table.t input, html[data-ui="3"] table.t select, html[data-ui="3"] .kx-tt select { min-height: 28px; padding: 3px 6px; border-radius: 7px; }
html[data-ui="3"] tr.kx-frow input { border-radius: 7px; }
html[data-ui="3"] .modal { border-radius: var(--radius-lg); }
html[data-ui="3"] .modal-h h3 { font-size: 17px; }
html[data-ui="3"] .toast { border-left-color: var(--st-approved); border-radius: 12px; }
html[data-ui="3"] .kx-tip { background: #131a2b; border-radius: 8px; }
html[data-ui="3"] .alert, html[data-ui="3"] .demo-banner { border-radius: 12px; }

/* sign-in: blue showcase */
html[data-ui="3"] .kx-show { background: radial-gradient(1100px 700px at 10% 0%, #2f66e0 0%, transparent 60%), linear-gradient(160deg, #0d1b46 0%, #14307a 55%, #0f5a5c 100%); color: #eef3ff; }
html[data-ui="3"] .kx-show-bg { color: #a9c0ff; }
html[data-ui="3"] .kx-show-prod { color: #d5e0ff; }
html[data-ui="3"] .kx-show-lead, html[data-ui="3"] .kx-slide p { color: #dbe5ff; }
html[data-ui="3"] .kx-show-foot { color: #b9c9f5; }
html[data-ui="3"] .kx-show-tag { background: linear-gradient(90deg, #ffffff 0%, #b7ccff 55%, #8af0b4 100%); -webkit-background-clip: text; background-clip: text; }
html[data-ui="3"] .kx-gate3 .kx-gate-card { border-radius: 24px; box-shadow: 0 18px 50px rgba(19,26,43,.14); padding: 32px 30px 20px; }
html[data-ui="3"] .kx-gate3 .kx-gate-card .f input { min-height: 44px; border-radius: 12px; }
html[data-ui="3"] .kx-gate3 .kx-gate-btn { min-height: 46px; border-radius: 12px; background: var(--primary); }
@media (max-width: 980px) { html[data-ui="3"] .kx-gate-mhead { background: linear-gradient(120deg, #0d1b46, #14307a); } html[data-ui="3"] .kx-gate-mhead span { color: #b7ccff; } }
@media (max-width: 860px) {
  html[data-ui="3"] .topbar { padding: 0 var(--sp-2); gap: 6px; background: var(--bg); }
  html[data-ui="3"] .content { padding: var(--sp-2) var(--sp-3) 56px; }
  html[data-ui="3"] .kpi .val { font-size: 21px; } html[data-ui="3"] .kpi .lbl { font-size: 12px; padding-right: 0; } html[data-ui="3"] .kpi::before { display: none; }
  html[data-ui="3"] .tabs { display: flex; }
  html[data-ui="3"] input, html[data-ui="3"] select, html[data-ui="3"] textarea { min-height: 42px; }
  html[data-ui="3"] table.t input, html[data-ui="3"] table.t select, html[data-ui="3"] tr.kx-frow input { min-height: 32px; }
}

/* V2.21 (Batch 9 item 8): Favourites and Recent fold */
html[data-ui="3"] .kx-quick h4 { padding: 0; }
html[data-ui="3"] .kx-quick-h { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 6px; padding: 8px 10px 4px; cursor: pointer; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
html[data-ui="3"] .kx-quick-h:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 6px; }
html[data-ui="3"] .kx-quick-h .n { margin-left: auto; font-variant-numeric: tabular-nums; opacity: .8; }
html[data-ui="3"] .kx-quick-h .car { font-size: 10px; }
html[data-ui="3"] .app.kx-rail .kx-quick-h { justify-content: center; padding: 6px 0 2px; }
html[data-ui="3"] .app.kx-rail .kx-quick-h span { display: none; }
