/* Inter (SIL Open Font License, static/vendor/inter/LICENSE) - bundled, works without internet */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../vendor/inter/inter-latin-wght-normal.woff2") format("woff2-variations"), url("../vendor/inter/inter-latin-wght-normal.woff2") format("woff2"); }
/* =====================================================================
   EWS Lite theme on top of Bootstrap 5.3.
   Colours and sizes are variables at the top - change them there.
   Our own small classes (panel, field, due, ...) are styled here so the
   page code stays short; Bootstrap classes are used directly where they fit.
   ===================================================================== */
:root {
  --ink: #0F1B3D;
  --ink-2: #475A80;
  --ink-3: #7B8BB0;
  --paper: #F4F7FD;
  --surface: #FFFFFF;
  --line: #DCE4F2;
  --line-2: #EDF2FB;
  --brand: #3B82F6;
  --brand-600: #2563EB;
  --brand-700: #1D4ED8;
  --brand-soft: #EEF4FF;
  --brand-glow: #60A5FA;
  --late: #BE185D;
  --late-soft: #FDE8F1;
  --soon: #B7790A;
  --soon-soft: #FDF3DC;
  --ok: #24804F;
  --ok-soft: #E3F4EA;
  --hold: #6A4FA3;
  --hold-soft: #EEE8F8;
  /* red-violet: the highlight colour (active menu item, current step, counts, key buttons) */
  --accent: #C0267E;
  --accent-600: #A21F6A;
  --accent-soft: #FCE7F3;
  --nav: #0B1E4A;
  --nav-2: #102A63;
  --nav-ink: #C7D4F2;
  --sidebar-w: 264px;
  --radius: .55rem;
  --radius-lg: .85rem;
  --shadow-sm: 0 1px 2px rgba(11, 30, 74, .05);
  --shadow: 0 1px 2px rgba(11, 30, 74, .04), 0 6px 20px -10px rgba(11, 30, 74, .14);
  --shadow-lg: 0 18px 50px -12px rgba(11, 30, 74, .30);
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Bootstrap variables */
  --bs-primary: var(--brand);
  --bs-primary-rgb: 59, 130, 246;
  --bs-link-color: var(--brand-600);
  --bs-link-color-rgb: 29, 78, 216;
  --bs-link-hover-color: var(--brand-700);
  --bs-link-hover-color-rgb: 30, 58, 138;
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--ink);
  --bs-secondary-color: var(--ink-2);
  --bs-border-color: var(--line);
  --bs-border-radius: var(--radius);
  --bs-border-radius-lg: var(--radius-lg);
  --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-size: .9375rem;
  --bs-focus-ring-color: rgba(29, 78, 216, .25);
}

body { font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .h1, .h2, .h3 { font-weight: 650; letter-spacing: -.01em; color: var(--ink); margin: 0; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.08rem; }
h3 { font-size: .98rem; }
p { max-width: 75ch; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: .86rem; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.spacer { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; z-index: 2000; top: 8px; left: 8px; background: #fff; padding: 8px 12px; border-radius: 6px; }

/* ---------------------------------------------------------------- Bootstrap components in brand colours */
.btn { --bs-btn-font-weight: 600; --bs-btn-padding-x: .95rem; --bs-btn-border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  transition: transform .14s var(--ease), box-shadow .16s var(--ease), background-color .16s, border-color .16s, color .16s; }
.btn:hover:not(:disabled):not(.btn-link) { transform: translateY(-1px); text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn-sm { --bs-btn-padding-x: .7rem; --bs-btn-font-size: .84rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-600);
  --bs-btn-hover-border-color: var(--brand-600); --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700);
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); --bs-btn-focus-shadow-rgb: 29, 78, 216;
  box-shadow: 0 1px 2px rgba(29, 78, 216, .25), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 16px -6px rgba(29, 78, 216, .55); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: #B4C6F0; --bs-btn-bg: #fff;
  --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand-600);
  --bs-btn-active-border-color: var(--brand-600); --bs-btn-focus-shadow-rgb: 29, 78, 216; }
.btn-outline-danger { --bs-btn-bg: #fff; --bs-btn-border-color: #EBB8B1; }
.btn-outline-secondary { --bs-btn-bg: #fff; --bs-btn-color: var(--hold); --bs-btn-border-color: #D2C7E8;
  --bs-btn-hover-bg: var(--hold); --bs-btn-hover-border-color: var(--hold); }
.btn-link { --bs-btn-color: var(--brand); font-weight: 500; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; color: var(--ink-2); font-size: 1.15rem; border: 0; }
.btn-icon:hover { background: var(--line-2); color: var(--ink); }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink-2);
  display: inline-grid; place-items: center; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover { background: var(--late-soft); border-color: #EBB8B1; color: var(--late); }
.icon-btn[data-mv]:hover { background: var(--brand-soft); border-color: #B4C6F0; color: var(--brand); }

.form-control, .form-select { border-color: #CBD6EE; border-radius: var(--radius); min-height: 40px;
  transition: border-color .15s, box-shadow .15s; }
.form-control:focus, .form-select:focus { border-color: #7C9CEB; box-shadow: 0 0 0 .22rem rgba(29, 78, 216, .16); }
.form-control[readonly] { background: var(--paper); }
.form-check-input { margin: 0; cursor: pointer; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: #7C9CEB; box-shadow: 0 0 0 .2rem rgba(29, 78, 216, .16); }
.form-label, label { font-weight: 600; font-size: .86rem; color: var(--ink); margin-bottom: .3rem; display: block; }
label .req { color: var(--late); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--brand); border-color: var(--line); border-radius: var(--radius-lg);
  animation: pop .16s var(--ease); }
.dropdown-item { border-radius: 6px; margin: 0 .35rem; width: auto; }
.dropdown-menu { padding: .35rem 0; }

/* ---------------------------------------------------------------- shell */
.sidebar { --bs-offcanvas-width: var(--sidebar-w); background: linear-gradient(180deg, var(--nav) 0%, var(--nav-2) 100%) !important;
  color: var(--nav-ink); display: flex; flex-direction: column; }
@media (min-width: 992px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1030; }
  .main-wrap { margin-left: var(--sidebar-w); }
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 1.15rem 1.1rem .9rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; color: #fff; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 1.25rem; color: #fff;
  background: linear-gradient(135deg, #14A3C7 0%, var(--brand) 100%); box-shadow: 0 6px 16px -6px rgba(20, 163, 199, .7); }
.brand-text { font-weight: 700; font-size: 1.05rem; line-height: 1.15; }
.brand-text small { display: block; font-weight: 400; font-size: .78rem; color: var(--nav-ink); }
.sidebar-search { position: relative; margin: 0 .9rem .6rem; }
.sidebar-search i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: #7E93A6; font-size: .85rem; }
.sidebar-search input { width: 100%; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09); color: #fff;
  border-radius: var(--radius); padding: .5rem .75rem .5rem 2.1rem; font-size: .88rem; transition: background .15s, border-color .15s; }
.sidebar-search input::placeholder { color: #7E93A6; }
.sidebar-search input:focus { outline: none; background: rgba(255, 255, 255, .1); border-color: rgba(96, 165, 250, .55); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .25rem .6rem 1rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nav-group + .nav-group { margin-top: .15rem; }
.nav-group-btn { width: 100%; display: flex; align-items: center; gap: .65rem; background: none; border: 0; color: #8FA3B5;
  font-size: .8rem; font-weight: 600; padding: .55rem .6rem; border-radius: var(--radius); text-align: left; transition: color .15s, background .15s; }
.nav-group-btn:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.nav-group-btn > .bi:first-child { font-size: .95rem; width: 1.1rem; text-align: center; }
.nav-group-btn .chev { margin-left: auto; font-size: .7rem; transition: transform .25s var(--ease); }
.nav-group-btn.collapsed .chev { transform: rotate(-90deg); }
.nav-link-item { position: relative; display: flex; align-items: center; gap: .65rem; color: var(--nav-ink); padding: .5rem .6rem .5rem 1.05rem;
  margin: 1px 0; border-radius: var(--radius); font-size: .9rem; text-decoration: none; transition: background .15s, color .15s, padding-left .2s var(--ease); }
.nav-link-item .bi { font-size: .95rem; opacity: .85; width: 1.1rem; text-align: center; }
.nav-link-item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; padding-left: 1.2rem; }
.nav-link-item.active { background: linear-gradient(90deg, rgba(96, 165, 250, .22), rgba(96, 165, 250, .06)); color: #fff; font-weight: 600; }
.nav-link-item.active::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 3px; background: var(--brand-glow);
  box-shadow: 0 0 10px rgba(96, 165, 250, .8); }
.sidebar-foot { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-foot .who strong { display: block; color: #fff; font-size: .88rem; }
.sidebar-foot .who small { color: #8FA3B5; font-size: .76rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #3B82F6, var(--brand)); flex: 0 0 auto; }
.avatar.sm { width: 28px; height: 28px; font-size: .8rem; }

.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem; height: 62px; padding: 0 1.75rem;
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.quick-find { position: relative; flex: 1; max-width: 460px; }
.quick-find i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.quick-find input { width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: .5rem 1rem .5rem 2.3rem;
  font-size: .9rem; transition: background .15s, border-color .15s, box-shadow .15s; }
.quick-find input:focus { outline: none; background: #fff; border-color: #7C9CEB; box-shadow: 0 0 0 .22rem rgba(29, 78, 216, .14); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.bell-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--late);
  color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; animation: bump .5s var(--ease) .3s both; }
.user-btn { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid transparent; font-weight: 600; color: var(--ink); }
.user-btn:hover, .user-btn.show { background: var(--line-2); }

.page { padding: 1.6rem 1.9rem 3rem; max-width: 1440px; }
@media (max-width: 991.98px) { .topbar { padding: 0 1rem; } .page { padding: 1.1rem 1rem 2.5rem; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.35rem; flex-wrap: wrap; }
.page-head p { margin: .3rem 0 0; color: var(--ink-2); }

/* one orchestrated entrance per page: sections rise in, staggered */
.page > * { animation: rise .45s var(--ease) both; }
.page > *:nth-child(2) { animation-delay: .04s; }
.page > *:nth-child(3) { animation-delay: .08s; }
.page > *:nth-child(4) { animation-delay: .12s; }
.page > *:nth-child(5) { animation-delay: .16s; }
.page > *:nth-child(n+6) { animation-delay: .2s; }

/* ---------------------------------------------------------------- cards & layout */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.3rem 1.5rem; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 1rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .6rem; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }
.actions { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: 1.1rem; align-items: center; }

/* ---------------------------------------------------------------- stat figures */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .9rem; }
.figures .figure, .figure { display: block; margin: 0; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1rem 1.15rem 1rem 1.3rem; box-shadow: var(--shadow); overflow: hidden; color: inherit; text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.figure::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line); }
.figure.late::before { background: var(--late); }
.figure.soon::before { background: var(--soon); }
.figure.ok::before { background: var(--ok); }
.figure b { display: block; font-size: 1.9rem; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.figure span { color: var(--ink-2); font-size: .86rem; }
.figure.late b { color: var(--late); }
.figure.soon b { color: var(--soon); }
.figure.ok b { color: var(--ok); }
a.figure:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }

/* ---------------------------------------------------------------- shift strip (dashboard) */
.shift { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.3rem 1.5rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.shift-title { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.shift-title h2 { font-size: 1.25rem; }
.shift-track { position: relative; height: 64px; margin: 1.5rem 0 .5rem; border-bottom: 2px solid var(--ink); }
.shift-past { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(20, 37, 54, .03), rgba(20, 37, 54, .07));
  border-radius: 6px 0 0 0; transform-origin: left; animation: grow-x .8s var(--ease) both; }
.shift-now { position: absolute; top: -10px; bottom: -6px; width: 2px; background: var(--ink); }
.shift-now::before { content: ""; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-glow);
  box-shadow: 0 0 0 0 rgba(96, 165, 250, .6); animation: pulse 2s infinite; }
.shift-now::after { content: attr(data-label); position: absolute; top: -22px; left: 10px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.shift-tick { position: absolute; bottom: 0; width: 14px; margin-left: -7px; border-radius: 4px 4px 0 0; background: var(--brand); display: block;
  transform-origin: bottom; animation: grow-y .6s var(--ease) both; animation-delay: .25s; transition: filter .15s; }
.shift-tick:hover, .shift-tick:focus-visible { filter: brightness(1.25); }
.shift-tick.late { background: var(--late); }
.shift-tick.soon { background: var(--soon); }
.shift-axis { position: relative; height: 18px; font-size: .78rem; color: var(--ink-3); }
.shift-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.shift-axis span:first-child { transform: none; }
.shift-axis span:last-child { transform: translateX(-100%); }
.shift-later { margin-top: .75rem; font-size: .9rem; color: var(--ink-2); }

/* ---------------------------------------------------------------- tables */
.table-card, .table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.table-wrap { overflow-x: auto; }
.panel .table-card, .panel .table-wrap, .modal .table-card { box-shadow: none; border-radius: var(--radius); }
.table { --bs-table-hover-bg: rgba(29, 78, 216, .045); --bs-table-border-color: var(--line-2); font-size: .91rem; }
.table > thead th { background: #F6F8FA; color: var(--ink-2); font-size: .8rem; font-weight: 650; white-space: nowrap; padding: .7rem .85rem;
  border-bottom: 1px solid var(--line); }
.table > tbody td { padding: .7rem .85rem; }
.table > tbody tr:last-child td { border-bottom: 0; }
.rows-in > tr { animation: row-in .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms); }
tbody tr.link { cursor: pointer; }
tbody tr.link:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
td.num, th.num { text-align: right; }
.empty { padding: 2.6rem 1rem; text-align: center; color: var(--ink-2); }
.empty .bi { display: block; font-size: 2rem; color: #B5C3CF; margin-bottom: .4rem; }
.row-late td:first-child { box-shadow: inset 3px 0 0 var(--late); }
.row-soon td:first-child { box-shadow: inset 3px 0 0 var(--soon); }
/* tables pages build by hand (no .table class) */
table:not(.table) { width: 100%; border-collapse: collapse; font-size: .9rem; }
table:not(.table) th, table:not(.table) td { padding: .6rem .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-2); }
table:not(.table) th { font-weight: 650; color: var(--ink-2); background: #F6F8FA; font-size: .8rem; white-space: nowrap; }

/* report / task-list grids */
.grid-wrap { max-height: 70vh; }
table.grid { font-size: .85rem; }
table.grid th { position: sticky; top: 0; z-index: 1; white-space: normal; min-width: 90px; vertical-align: bottom; }
table.grid td { white-space: nowrap; }
table.grid td.cell-late { background: var(--late-soft); color: #7A1E0E; font-weight: 650; }
table.grid td.cell-ok { background: var(--ok-soft); color: #1F5A37; }
table.grid td.cell-open { background: var(--soon-soft); color: #6B4A00; }

/* ---------------------------------------------------------------- status badges & scores */
.due { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem; border-radius: 999px; font-size: .77rem; font-weight: 650; white-space: nowrap; }
.due::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.due.late { background: var(--late-soft); color: var(--late); }
.due.late::before { animation: pulse-dot 1.6s infinite; }
.due.soon { background: var(--soon-soft); color: #8A5A00; }
.due.ok { background: var(--ok-soft); color: var(--ok); }
.due.plain { background: var(--line-2); color: var(--ink-2); }
.due.warn { background: #FFF4E0; color: #B45309; }
.due.hold { background: var(--hold-soft); color: var(--hold); }
.score { font-weight: 700; }
.score.bad { color: var(--late); }
.score.mid { color: #8A5A00; }
.score.good { color: var(--ok); }
.route-chip { display: inline-block; padding: 0 .45rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-700); font-size: .72rem; font-weight: 650; }

/* ---------------------------------------------------------------- forms */
.field { margin-bottom: 1rem; }
.field .help, .help { font-size: .82rem; color: var(--ink-2); margin-top: .3rem; }
.field .err { font-size: .84rem; color: var(--late); margin-top: .3rem; font-weight: 600; animation: rise .25s var(--ease) both; }
.field.has-err .form-control, .field.has-err .form-select { border-color: var(--late); box-shadow: 0 0 0 .2rem rgba(192, 57, 43, .12); }
.field.has-err { animation: shake .35s var(--ease); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-heading { grid-column: 1 / -1; margin: .5rem 0 .9rem; padding-bottom: .45rem; border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--brand-700); }
.choice { display: inline-flex; align-items: center; gap: .45rem; margin: .25rem 1.1rem .25rem 0; font-weight: 400; cursor: pointer; font-size: .9rem; }
textarea.form-control { min-height: 90px; }
.inline-input { display: flex; gap: .5rem; }
.inline-input .form-control { flex: 1; }
.filters { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: .8rem 1rem; box-shadow: var(--shadow-sm); }
.filters .field { margin: 0; min-width: 150px; flex: 0 1 220px; }
.filters .choice { margin-bottom: .55rem; }
.subtable .form-control { min-height: 34px; padding: .25rem .5rem; }
.subtable td, .subtable th { padding: .3rem .4rem !important; }

/* ---------------------------------------------------------------- tabs (underline, animated) */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; overflow-x: auto; }
.tabs button { position: relative; background: none; border: 0; padding: .65rem 1rem; color: var(--ink-2); font-weight: 600; font-size: .9rem; white-space: nowrap;
  border-radius: var(--radius) var(--radius) 0 0; transition: color .15s, background .15s; }
.tabs button:hover { color: var(--ink); background: rgba(29, 78, 216, .04); }
.tabs button::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--brand); transform: scaleX(0); transition: transform .25s var(--ease); }
.tabs button.active { color: var(--brand-700); }
.tabs button.active::after { transform: scaleX(1); }

/* ---------------------------------------------------------------- notices */
.notice { padding: .8rem 1rem; border-radius: var(--radius); background: var(--brand-soft); border-left: 4px solid var(--brand); margin-bottom: 1rem; animation: rise .3s var(--ease) both; }
.notice.warn { background: var(--soon-soft); border-left-color: var(--soon); }
.notice.bad { background: var(--late-soft); border-left-color: var(--late); color: #7A1E0E; }
.notice ul { margin: .4rem 0 0; padding-left: 1.2rem; }

/* ---------------------------------------------------------------- timeline & key/value */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1.7rem; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff;
  border: 2px solid var(--ink-3); z-index: 1; }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--ok); border-color: var(--ok); }
.timeline li.pending::before { background: var(--soon); border-color: var(--soon); box-shadow: 0 0 0 4px rgba(183, 121, 10, .15); }
.timeline li.late::before { background: var(--late); border-color: var(--late); box-shadow: 0 0 0 4px rgba(192, 57, 43, .15); }
.timeline li.reject::before { background: #fff; border-color: var(--late); }
.timeline .when { font-size: .84rem; color: var(--ink-2); }
dl.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: .45rem .9rem; margin: 0; font-size: .91rem; }
dl.kv dt { color: var(--ink-2); font-weight: 500; }
dl.kv dd { margin: 0; word-break: break-word; }

/* ---------------------------------------------------------------- modal & toast */
.app-modal .modal-content { border: 0; border-radius: 1rem; box-shadow: var(--shadow-lg); }
.app-modal .modal-header { border-bottom-color: var(--line-2); padding: 1rem 1.4rem; }
.app-modal .modal-body { padding: 1.3rem 1.4rem; }
.modal.fade .modal-dialog { transform: translateY(14px) scale(.97); transition: transform .26s var(--ease), opacity .2s; }
.modal.show .modal-dialog { transform: none; }
.modal-backdrop.show { opacity: .42; }
.app-toast { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: toast-in .35s var(--ease) both; }

/* ---------------------------------------------------------------- loading skeleton */
.skel-wrap { padding: .5rem 0; }
.skel { height: 14px; margin: 12px 0; border-radius: 6px;
  background: linear-gradient(90deg, #E9EEF2 0%, #F5F8FA 40%, #E9EEF2 80%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; }

/* ---------------------------------------------------------------- process builder */
.builder { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1.1rem; align-items: start; }
@media (max-width: 1100px) { .builder { grid-template-columns: 1fr; } }
.steplist { list-style: none; margin: 0; padding: 0; max-height: 72vh; overflow-y: auto; }
.steplist li button { display: flex; gap: .75rem; width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: var(--radius);
  padding: .6rem; cursor: pointer; color: var(--ink); align-items: flex-start; transition: background .15s, border-color .15s; }
.steplist li button:hover { background: var(--paper); }
.steplist li button.active { background: var(--brand-soft); border-color: #C7D5F5; }
.steplist .no { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: .78rem; font-weight: 700; }
.steplist button.active .no { background: var(--brand); }
.steplist .inactive { opacity: .5; }
.steplist .sub { font-size: .8rem; color: var(--ink-2); display: block; }
.routes { margin: .2rem 0 .5rem 2.4rem; font-size: .8rem; color: var(--ink-2); line-height: 1.6; }
.fieldrow { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto auto; gap: .5rem; align-items: center; padding: .6rem; border: 1px solid var(--line-2);
  border-radius: var(--radius); margin-bottom: .5rem; background: #FAFCFD; transition: border-color .15s, box-shadow .15s; animation: rise .25s var(--ease) both; }
.fieldrow:hover { border-color: var(--line); box-shadow: var(--shadow-sm); }
.fieldrow .opts { grid-column: 1 / -1; }
.fieldrow details.more summary { cursor: pointer; color: var(--brand); }
.fieldrow details.more { border-top: 1px dashed var(--line); padding-top: 6px; }
@media (max-width: 700px) { .fieldrow { grid-template-columns: 1fr 1fr; } }
.cond { display: grid; grid-template-columns: 1.2fr .8fr 1.2fr auto; gap: .5rem; margin-bottom: .5rem; }
.route-time { background: var(--paper); border-radius: var(--radius); padding: .75rem .85rem; margin-bottom: .9rem; }

/* ---------------------------------------------------------------- task list diagram */
.flow { display: flex; flex-direction: column; align-items: stretch; max-width: 780px; }
.flow-step { display: flex; gap: .75rem; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line);
  border-radius: var(--radius-lg); padding: .75rem 1rem; box-shadow: var(--shadow-sm); animation: rise .35s var(--ease) both; }
.flow-step.ok { border-left-color: var(--ok); }
.flow-step.late { border-left-color: var(--late); }
.flow-step.soon { border-left-color: var(--soon); }
.flow-step.hold { border-left-color: var(--hold); }
.flow-step.plain { opacity: .75; }
.flow-no { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .82rem; }
.flow-arrow { width: 2px; height: 18px; background: var(--ink-3); margin: 0 0 0 30px; position: relative; }
.flow-arrow::after { content: ""; position: absolute; bottom: -2px; left: -4px; border: 5px solid transparent; border-top-color: var(--ink-3); }

/* ---------------------------------------------------------------- process flow chart (editor) */
.flowchart-wrap { position: relative; background:
  radial-gradient(circle, #D9E2E9 1px, transparent 1.2px) 0 0 / 22px 22px, #FBFCFD; border: 1px solid var(--line); border-radius: var(--radius-lg);
  height: 72vh; overflow: hidden; cursor: grab; user-select: none; }
.flowchart-wrap.dragging { cursor: grabbing; }
.flowchart-wrap svg { width: 100%; height: 100%; display: block; }
.fc-tools { position: absolute; top: .7rem; right: .7rem; display: flex; gap: .35rem; z-index: 2; }
.fc-tools .btn { background: #fff; }
.fc-legend { position: absolute; left: .8rem; bottom: .7rem; display: flex; gap: .9rem; flex-wrap: wrap; font-size: .76rem; color: var(--ink-2);
  background: rgba(255,255,255,.9); padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); z-index: 2; }
.fc-legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: .3rem; border-radius: 2px; }
.fc-node { cursor: pointer; }
.fc-node rect { transition: filter .15s, stroke-width .15s; }
.fc-node:hover rect.fc-card { filter: drop-shadow(0 6px 12px rgba(11, 30, 74, .18)); }
.fc-node.selected rect.fc-card { stroke: var(--brand-glow); stroke-width: 3; }
.fc-edge path { fill: none; stroke-width: 1.6; }
.fc-edge text, .fc-node text { font-family: var(--bs-body-font-family); }
.fc-in { animation: fade .5s var(--ease) both; }

/* ---------------------------------------------------------------- login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--paper); }
.login-side { position: relative; overflow: hidden; color: #DCE6FA; padding: 3.2rem; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(1200px 600px at -10% -10%, rgba(20, 163, 199, .35), transparent 60%),
              radial-gradient(900px 500px at 110% 110%, rgba(29, 78, 216, .45), transparent 60%), linear-gradient(160deg, var(--nav), #0A1826); }
.login-side::after { content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 36px 36px; mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); }
.login-side > * { position: relative; z-index: 1; }
.login-side h1 { color: #fff; font-size: 2.5rem; max-width: 15ch; line-height: 1.15; animation: rise .6s var(--ease) both .1s; }
.login-side p { color: #B9C8EC; animation: rise .6s var(--ease) both .2s; }
.login-form { display: grid; place-items: center; padding: 2.5rem; }
.login-card { width: min(400px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 1.1rem; padding: 2rem; box-shadow: var(--shadow-lg);
  animation: rise .55s var(--ease) both .15s; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-side { padding: 2rem 1.5rem; } .login-side h1 { font-size: 1.8rem; } }

/* ---------------------------------------------------------------- animations */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
@keyframes bump { 0% { transform: scale(0); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(96, 165, 250, .55); } 70% { box-shadow: 0 0 0 10px rgba(96, 165, 250, 0); } 100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0); } }
@keyframes pulse-dot { 0%, 100% { opacity: .9; } 50% { opacity: .3; } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* inputs are white on the grey page (Bootstrap would use the page colour) */
.form-control, .form-select, .input-group-text { background-color: #fff; }
.form-control:disabled, .form-select:disabled { background-color: var(--line-2); }
.shift-now.flip::after { left: auto; right: 10px; }

/* coming-soon pages */
.soon-icon { width: 68px; height: 68px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.9rem;
  color: var(--brand); background: var(--brand-soft, #E8EEFF); animation: pulse 2.4s infinite; }
/* top-level menu links sit flush with group buttons */
.nav-group-btn { color: var(--nav-ink); font-size: .9rem; font-weight: 500; padding: .5rem .6rem; }
.nav-group-btn[aria-expanded="true"] { color: #fff; }
.nav-group .collapse .nav-link-item, .nav-group .collapsing .nav-link-item { padding-left: 2.35rem; font-size: .86rem; }
.nav-group .collapse .nav-link-item:hover { padding-left: 2.5rem; }
.nav-group .collapse .nav-link-item .bi { font-size: .85rem; }
.nav-top .nav-link-item { padding-left: .6rem; }
.nav-top .nav-link-item:hover { padding-left: .75rem; }
.nav-logout { width: 100%; background: none; border: 0; text-align: left; margin-top: .4rem; }
.nav-logout:hover { color: #FF9B8F; }

/* ---------------------------------------------------------------- masters: cards */
.master-tools { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.search-box { position: relative; flex: 1; max-width: 420px; min-width: 220px; }
.search-box i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search-box input { padding-left: 2.3rem; border-radius: 999px; }
.master-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.master-card { position: relative; display: flex; align-items: center; gap: .85rem; padding: 1rem 1rem 1rem 1.05rem; min-height: 84px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; overflow: hidden;
  box-shadow: 0 1px 2px rgba(11, 30, 74, .04); animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
.master-card::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-glow));
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.master-card:hover, .master-card:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(11, 30, 74, .10); border-color: #C7D5F5;
  color: var(--ink); text-decoration: none; }
.master-card:hover::after, .master-card:focus-visible::after { transform: scaleX(1); }
.master-card:active { transform: translateY(-1px) scale(.99); }
.mc-icon { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem;
  color: var(--brand); background: linear-gradient(135deg, #E6F4F8, #D3ECF3); transition: transform .25s var(--ease), background .25s, color .25s; }
.master-card:hover .mc-icon { transform: rotate(-6deg) scale(1.06); background: linear-gradient(135deg, var(--brand), #1592B5); color: #fff; }
.mc-body { display: flex; flex-direction: column; min-width: 0; }
.mc-body strong { font-size: .98rem; font-weight: 650; line-height: 1.25; }
.mc-body small { color: var(--ink-3); font-size: .8rem; margin-top: .15rem; }
.mc-go { margin-left: auto; color: var(--ink-3); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s var(--ease); }
.master-card:hover .mc-go { opacity: 1; transform: none; color: var(--brand); }
.master-card.off { opacity: .6; }
.skel-card { flex-direction: column; align-items: flex-start; justify-content: center; animation: none; }
.breadcrumb a { text-decoration: none; }
@media (max-width: 575.98px) { .master-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .master-card { flex-direction: column; align-items: flex-start; min-height: 112px; padding: .85rem; }
  .mc-go { display: none; } }

/* ---------------------------------------------------------------- section pages (cards everywhere) */
.master-grid.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.master-card.tall { align-items: flex-start; min-height: 104px; }
.master-card .mc-body small.desc { margin-top: .3rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.master-card.tall .mc-body small { line-height: 1.4; }
.master-card.proc { cursor: pointer; padding-right: 3.2rem; }
.proc-code { font-size: .72rem; font-weight: 800; letter-spacing: .02em; }
.master-card:hover .proc-code { color: #fff; }
.proc-copy { position: absolute; top: .6rem; right: .6rem; opacity: 0; transition: opacity .2s; background: #fff; }
.master-card:hover .proc-copy, .proc-copy:focus-visible { opacity: 1; }
@media (hover: none) { .proc-copy { opacity: 1; } }
.section-label { display: flex; align-items: center; gap: .5rem; font-size: .95rem; font-weight: 700; color: var(--ink-2); margin: 1.4rem 0 .7rem; }
.section-label:first-child { margin-top: .2rem; }
.section-label span { font-weight: 500; color: var(--ink-3); font-size: .82rem; }
@media (max-width: 575.98px) { .master-grid.wide { grid-template-columns: 1fr; }
  .master-card.tall, .master-card.proc { flex-direction: row; min-height: 0; } }

/* ---------------------------------------------------------------- task list filters */
.filter-panel { margin-bottom: 1rem; padding: 1rem 1.1rem; }
.filter-panel.tl-panel { padding: 1.1rem 1.25rem 0; overflow: visible; position: relative; z-index: 6; }
/* task list filters: 12 columns, two tidy rows on a computer screen */
.tl-filters { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .9rem 1rem; align-items: end; }
.tl-filters .field { margin: 0; min-width: 0; grid-column: span 2; }
.tl-filters .field.wide { grid-column: span 4; }   /* older page layout: still two tidy rows */
.tl-filters .f-plant { grid-column: span 3; } .tl-filters .f-wf { grid-column: span 6; } .tl-filters .f-eid { grid-column: span 3; }
.tl-filters .f-q { grid-column: span 6; } .tl-filters .f-date { grid-column: span 3; }
.tl-filters:has(.f-st) .f-q { grid-column: span 4; } .tl-filters .f-st { grid-column: span 2; }
/* two search boxes: search + "And also" side by side, then the dates */
.tl-filters:has(.f-q2) .f-q { grid-column: span 3; }
.tl-filters:has(.f-q2):has(.f-st) .f-q { grid-column: span 3; } .tl-filters:has(.f-q2):has(.f-st) .f-date { grid-column: span 2; }
.tl-filters input, .tl-filters .combo-input, .tl-filters .search-box input { height: 42px; }
.tl-foot { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin: 1rem -1.25rem 0; padding: .7rem 1.25rem;
  border-top: 1px solid var(--line-2); background: var(--paper); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.tl-count { font-weight: 600; color: var(--ink-2); font-size: .9rem; }
.tl-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.fx-menu { z-index: 1060; width: 300px; max-height: 360px; overflow-y: auto; padding: .4rem 0; }
.fx-head { padding: .3rem .9rem .5rem; font-size: .78rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.fx-item { display: flex; align-items: flex-start; gap: .55rem; padding: .4rem .9rem; margin: 0; cursor: pointer; }
.fx-item:hover { background: var(--brand-soft); }
.fx-item input { margin-top: .2rem; flex: none; }
.fx-empty { padding: .3rem .9rem; margin: 0; color: var(--ink-3); }
.fx-foot { border-top: 1px solid var(--line-2); margin-top: .3rem; padding: .5rem .9rem 0; }
@media (max-width: 1199.98px) {
  .tl-filters .f-plant, .tl-filters .f-eid { grid-column: span 3; } .tl-filters .f-wf { grid-column: span 6; }
  .tl-filters .f-q, .tl-filters:has(.f-st) .f-q { grid-column: span 12; } .tl-filters .f-date { grid-column: span 6; }
  .tl-filters:has(.f-st) .f-date { grid-column: span 4; } .tl-filters .f-st { grid-column: span 4; }
  .tl-filters:has(.f-q2) .f-q, .tl-filters:has(.f-q2):has(.f-st) .f-q { grid-column: span 6; }
  .tl-filters:has(.f-q2):has(.f-st) .f-date { grid-column: span 4; }
}
@media (max-width: 767.98px) {
  .tl-filters .field, .tl-filters:has(.f-st) .field { grid-column: span 6 !important; }
  .tl-filters .f-wf, .tl-filters .f-q, .tl-filters:has(.f-st) .f-q { grid-column: span 12 !important; }
  .tl-filters .f-wf { order: 1; } .tl-filters .f-q { order: 2; } .tl-filters .f-date, .tl-filters .f-st { order: 3; }
  .tl-foot { margin-top: .9rem; } .tl-actions { width: 100%; justify-content: flex-end; }
}

/* ---------------------------------------------------------------- shared processes: people per plant, access */
.plant-doers { margin: .4rem 0 1rem; padding: .75rem .9rem; border: 1px dashed #C7D5F5; border-radius: var(--radius); background: #F7F9FF; }
.pd-row { display: flex; align-items: center; gap: .75rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.pd-row:first-of-type { border-top: 0; }
.pd-plant { font-weight: 600; min-width: 130px; }
.pd-who { flex: 1; font-size: .87rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-list { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: .35rem .75rem; }
.pick-sum { display: flex; flex-wrap: wrap; gap: .3rem; min-height: 1.6rem; }
.chip { display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .8rem; font-weight: 600; }
@media (max-width: 575.98px) { .pd-row { flex-wrap: wrap; } .pd-who { white-space: normal; flex-basis: 100%; order: 3; } }

/* ---------------------------------------------------------------- checklist sheet (old Template forms) */
.grid-sheet-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.grid-sheet { width: 100%; border-collapse: collapse; font-size: .86rem; }
.grid-sheet td, .grid-sheet th { border: 1px solid #D5DEE5; padding: .3rem .45rem; vertical-align: middle; min-width: 70px; }
.grid-sheet th.g-head { background: #EEF3FF; font-weight: 700; text-align: center; color: var(--ink); }
.grid-sheet td.g-label { background: #FAFCFD; color: var(--ink-2); }
.grid-sheet td.g-box { padding: .15rem; min-width: 110px; }
.grid-sheet td.g-box input:not([type=checkbox]), .grid-sheet td.g-box select { width: 100%; border: 1px solid transparent; border-radius: 4px; padding: .3rem .4rem; background: #FFFDF5; font-size: .86rem; }
.grid-sheet td.g-box input:focus, .grid-sheet td.g-box select:focus { outline: none; border-color: var(--brand-glow); background: #fff; }
.grid-sheet td.g-box input[type=checkbox] { margin: .3rem auto; display: block; }

/* ---------------------------------------------------------------- form builder (static/js/form_builder.js) */
.fb-bar { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; padding: .55rem .7rem;
  background: rgba(246, 250, 252, .95); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: .9rem; position: sticky; top: 70px; z-index: 6; }
.fb-menu { width: min(560px, 92vw); padding: .7rem .8rem; border-radius: var(--radius-lg); }
.fb-menu.show { animation: pop .18s var(--ease); }
.fb-palette { display: flex; flex-direction: column; gap: .45rem; }
.fb-empty .fb-palette { align-items: center; margin-top: .8rem; }
.fb-pal-group { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.fb-pal-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); width: 58px; }
.fb-chip { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .2rem .65rem;
  font-size: .8rem; color: var(--ink-2); transition: transform .15s var(--ease), border-color .15s, color .15s, box-shadow .15s; }
.fb-chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(29, 78, 216, .12); }
.fb-chip:active { transform: scale(.97); }
.fb-tools { display: flex; flex-wrap: wrap; gap: .35rem; }
.fb-list { display: flex; flex-direction: column; gap: .5rem; }
.fb-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow .2s, border-color .2s; animation: rise .3s var(--ease) both; }
.fb-card:hover { border-color: #C7D5F5; }
.fb-card.open { border-color: var(--brand); box-shadow: 0 6px 20px -8px rgba(29, 78, 216, .35); }
.fb-card.is-heading { background: #F3F7F9; }
.fb-card.dragging { opacity: .45; }
.fb-card.drop-before { box-shadow: 0 -3px 0 var(--brand-glow); }
.fb-card.drop-after { box-shadow: 0 3px 0 var(--brand-glow); }
.fb-head { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; cursor: pointer; user-select: none; }
.fb-grip { color: var(--ink-3); cursor: grab; padding: 0 .1rem; font-size: 1.05rem; }
.fb-grip:active { cursor: grabbing; }
.fb-ico { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.fb-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fb-title strong { font-weight: 600; font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-title small { color: var(--ink-3); font-size: .75rem; }
.fb-badges { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; }
.fb-badge { font-size: .7rem; padding: .1rem .45rem; border-radius: 999px; background: #EEF2F5; color: var(--ink-2); white-space: nowrap; }
.fb-badge.req { background: #FDECEA; color: #B23A2E; }
.fb-badge.src { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.fb-acts { display: flex; align-items: center; gap: .15rem; opacity: .55; transition: opacity .15s; }
.fb-card:hover .fb-acts, .fb-card.open .fb-acts { opacity: 1; }
.fb-chev { margin-left: .25rem; transition: transform .25s var(--ease); color: var(--ink-3); }
.fb-card.open .fb-chev { transform: rotate(180deg); }
.fb-body { padding: .3rem 1rem 1rem 3.4rem; border-top: 1px dashed var(--line); animation: fade .25s var(--ease); }
.fb-sec { margin: .4rem 0 .8rem; }
.fb-more { margin-top: .4rem; }
.fb-more > summary { cursor: pointer; font-size: .85rem; color: var(--brand); font-weight: 600; }
.fb-peek { margin: .35rem 0 .5rem; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; min-height: 1.6rem; }
.fb-grid-prev { max-height: 260px; overflow: auto; }
.fb-empty { text-align: center; padding: 2rem 1rem; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--radius-lg); }
.fb-empty .bi { font-size: 2rem; color: #C7D5F5; }
.fb-empty p { margin: .3rem 0 0; }
/* template picker */
.tpl-pick { display: grid; grid-template-columns: minmax(240px, 1fr) 1.4fr; gap: .9rem; height: 56vh; }
.tpl-list, .tpl-prev { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem; background: #fff; }
.tpl-prev { padding: .8rem 1rem; }
.tpl-group { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: .5rem .4rem .25rem; }
.tpl-item { display: block; width: 100%; text-align: left; border: 0; background: none; border-radius: 8px; padding: .45rem .55rem; }
.tpl-item:hover { background: #F2F7F9; }
.tpl-item.active { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.tpl-item strong { display: block; font-size: .88rem; font-weight: 600; }
.tpl-item small { display: block; color: var(--ink-3); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* checklist sheet editor */
.ge-bar { display: flex; gap: .4rem; align-items: center; margin-bottom: .6rem; flex-wrap: wrap; }
.ge-wrap { display: grid; grid-template-columns: 1fr 250px; gap: .9rem; }
.ge-sheet { overflow: auto; max-height: 60vh; border: 1px solid var(--line); border-radius: var(--radius); }
.ge-table td { cursor: pointer; min-width: 80px; height: 34px; }
.ge-table td:hover { outline: 2px solid #C7D5F5; outline-offset: -2px; }
.ge-table td.sel { outline: 2px solid var(--brand); outline-offset: -2px; background: #F2FAFD; }
.ge-table td.ge-header { background: #EEF3FF; font-weight: 700; text-align: center; }
.ge-table td.ge-empty { background: repeating-linear-gradient(45deg, #fff 0 6px, #F7F9FA 6px 12px); }
.ge-box { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--brand); background: #FFFDF0; border: 1px dashed #E8D9A8; border-radius: 4px; padding: .1rem .4rem; }
.ge-side { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; background: #FAFCFD; }
@media (max-width: 767.98px) { .tpl-pick, .ge-wrap { grid-template-columns: 1fr; height: auto; } .tpl-list { max-height: 30vh; } .fb-body { padding-left: 1rem; } .fb-badges { display: none; } }

/* ---------------------------------------------------------------- process editor: step cards / list */
.step-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .9rem; }
.step-card { position: relative; display: flex; flex-direction: column; gap: .55rem; text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: .9rem 1rem .75rem; cursor: pointer; animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
.step-card:hover, .step-card:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 26px -12px rgba(11, 30, 74, .28); border-color: #C7D5F5; outline: none; }
.step-card.is-start { border-top: 3px solid var(--brand); }
.step-card.inactive { opacity: .6; }
.step-card header { display: flex; align-items: center; gap: .55rem; }
.step-card h3 { font-size: 1rem; font-weight: 650; margin: 0; flex: 1; line-height: 1.25; }
.step-no { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ink); color: #fff; font-size: .8rem; font-weight: 700; }
.step-no.start { background: var(--brand); }
.step-card dl { margin: 0; display: grid; gap: .2rem; }
.step-card dl div { display: flex; gap: .45rem; font-size: .85rem; color: var(--ink-2); }
.step-card dt { font-weight: 400; color: var(--ink-3); }
.step-card dd { margin: 0; }
.step-form { display: flex; align-items: center; gap: .4rem; width: 100%; border: 1px dashed #C7D5F5; background: #F6FBFD; border-radius: 8px;
  padding: .4rem .6rem; font-size: .83rem; color: var(--brand); text-align: left; transition: background .15s, border-color .15s; }
.step-form span { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.step-form:hover { background: var(--brand-soft); border-color: var(--brand); }
.route-mini { list-style: none; margin: 0; padding: 0; font-size: .8rem; color: var(--ink-2); display: grid; gap: .15rem; }
.route-mini li { display: flex; gap: .35rem; align-items: baseline; flex-wrap: wrap; }
.route-mini li .bi { color: var(--brand); }
.route-mini li.rej, .route-mini li.rej .bi { color: var(--late, #C0392B); }
.step-card footer { display: flex; align-items: center; gap: .3rem; margin-top: auto; padding-top: .35rem; border-top: 1px solid #EEF2F5; }
.chip-sm { font-size: .7rem; padding: .1rem .45rem; border-radius: 999px; background: #EEF2F5; color: var(--ink-2); }
.open-hint { font-size: .78rem; color: var(--brand); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s var(--ease); }
.step-card:hover .open-hint { opacity: 1; transform: none; }
.step-card.add { align-items: center; justify-content: center; min-height: 180px; border: 2px dashed #C9D9E2; background: transparent; color: var(--brand); font-weight: 600; }
.step-card.add .bi { font-size: 1.8rem; }
.step-table td { vertical-align: top; }
.step-table tr.inactive { opacity: .6; }
.step-nav { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; flex-wrap: wrap; }
.step-panel { animation: rise .3s var(--ease); }

/* ---------------------------------------------------------------- MIS dashboard (old portal layout) */
.mis-filter { padding: 1rem 1.1rem; margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.mis-filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem 1rem; flex: 2 1 520px; }
.mis-filter-grid .field { margin: 0; }
.mis-filter-grid #week { min-width: 0; }
.mis-cards { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: .75rem; flex: 3 1 520px; }
.mis-card { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-lg); padding: .75rem .9rem; display: flex; flex-direction: column;
  box-shadow: 0 6px 16px -10px rgba(11, 30, 74, .25); transition: transform .18s var(--ease), box-shadow .18s, border-color .18s; animation: rise .4s var(--ease) both; }
.mis-card:nth-child(2) { animation-delay: 40ms; } .mis-card:nth-child(3) { animation-delay: 80ms; } .mis-card:nth-child(4) { animation-delay: 120ms; }
.mis-card b { font-size: 1.6rem; line-height: 1.1; color: var(--ink); }
.mis-card span { font-size: .78rem; color: var(--brand); font-weight: 600; margin-top: .2rem; }
.mis-card.ok b { color: #1E8449; } .mis-card.warn b { color: #B9770E; } .mis-card.bad b { color: #C0392B; }
.mis-card:not(:disabled):hover { transform: translateY(-3px); box-shadow: 0 12px 24px -12px rgba(11, 30, 74, .35); border-color: var(--brand); cursor: pointer; }
.mis-card:disabled { opacity: .75; cursor: default; }
.mis-block { margin-bottom: 1rem; padding: 1rem 1.1rem; }
.mis-block-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.mis-block-head h2 { font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--brand); margin: 0; }
.mis-top { display: grid; grid-template-columns: 260px 1fr; gap: 1.25rem; align-items: start; }
.doer-card { display: flex; gap: .9rem; align-items: flex-start; padding-top: .3rem; }
.doer-photo { width: 72px; height: 72px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #3B82F6, var(--brand)); box-shadow: 0 8px 18px -8px rgba(29, 78, 216, .6); }
.doer-card dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .5rem; margin: 0; font-size: .82rem; }
.doer-card dt { font-weight: 700; color: var(--ink); }
.doer-card dd { margin: 0; color: #C0392B; }
.mis-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .84rem; }
.mis-table thead th { background: linear-gradient(90deg,#1E3A8A,#1D4ED8); color: #fff; font-weight: 700; font-size: .76rem; padding: .65rem .6rem; vertical-align: bottom; line-height: 1.25; }
.mis-table thead th:first-child { border-top-left-radius: 8px; } .mis-table thead th:last-child { border-top-right-radius: 8px; }
.mis-table tbody td, .mis-table tfoot td { padding: .55rem .6rem; border-bottom: 1px solid #E3E9EE; background: #F4F6F9; vertical-align: middle; }
.mis-table tbody tr:nth-child(even) td { background: #EEF1F5; }
.mis-table tbody tr:hover td { background: #E8EEFF; }
.mis-table tbody tr.current td { background: #FFFBEA; font-weight: 600; }
.mis-table tfoot td { background: #E8EEFF; font-weight: 700; }
.mis-table td.empty-row { color: var(--ink-3); font-size: .8rem; }
.mis-v { font-weight: 700; } .mis-v.neg { color: #C0392B; } .mis-v.pos { color: #1E8449; }
.dash { color: #C0392B; font-weight: 700; }
.mis-num { border: 0; background: none; padding: 0 .15rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: 4px; }
.mis-num.neg { color: #C0392B; } .mis-num.pos { color: #1E8449; }
.mis-num:not(:disabled):hover { background: rgba(29, 78, 216, .1); }
.mis-num:disabled { cursor: default; text-decoration: none; }
@media (max-width: 991.98px) { .mis-top { grid-template-columns: 1fr; } .mis-cards { grid-template-columns: repeat(2, 1fr); } }
.mis-score { min-width: 0; }
.mis-table td:first-child { white-space: nowrap; }
.mis-table thead th { white-space: normal; min-width: 64px; }
.mis-filter-grid .input-group .form-select { min-width: 150px; }
.mis-filter-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.step-table [data-form] { white-space: nowrap; }
.mis-table td:nth-child(2) { white-space: nowrap; }

/* ---------------------------------------------------------------- pagination + download choice */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .75rem; animation: fade .3s var(--ease); }
.pager-info { font-size: .85rem; color: var(--ink-2); }
.pager .page-link { color: var(--brand); border-color: var(--line); min-width: 2.1rem; text-align: center; }
.pager .page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .page-link:hover { background: var(--brand-soft); }
.dl-choice { display: grid; gap: .6rem; }
.dl-opt { display: flex; gap: .7rem; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .85rem; cursor: pointer; transition: border-color .15s, background .15s; }
.dl-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.dl-opt input { margin-top: .2rem; }
.dl-opt span { display: flex; flex-direction: column; }
.dl-opt small { color: var(--ink-3); }
.mis-card { cursor: pointer; }
.mis-card-go { font-size: .72rem; color: var(--ink-3); margin-top: .35rem; display: inline-flex; gap: .25rem; align-items: center; transition: color .15s; }
.mis-card:hover .mis-card-go { color: var(--brand); }


/* ================================================================ tables, polished (applies everywhere) */
body { font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
.table-card, .table-wrap { border-color: #E2E8EE; box-shadow: 0 1px 2px rgba(11, 30, 74, .04), 0 8px 24px -16px rgba(11, 30, 74, .18); }
.table { font-size: .9rem; --bs-table-hover-bg: transparent; }
.table > thead th, table:not(.table):not(.mis-table):not(.grid-sheet):not(.nbd-table):not(.nbd-grid):not(.nbx-t) th {
  background: linear-gradient(#F8FAFC, #F1F5F8); color: #52657A; font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: .8rem 1rem; border-bottom: 1px solid #E2E8EE; position: sticky; top: 0; z-index: 1; }
.table > tbody td, table:not(.table):not(.mis-table):not(.grid-sheet):not(.nbd-table):not(.nbd-grid):not(.nbx-t) td { padding: .8rem 1rem; border-bottom: 1px solid #EEF2F6; color: #1E2F5C; }
.table > tbody tr, table:not(.table):not(.mis-table):not(.grid-sheet):not(.nbd-table):not(.nbd-grid):not(.nbx-t) tbody tr { transition: background-color .15s ease, box-shadow .15s ease; }
.table > tbody tr:hover > td, table:not(.table):not(.mis-table):not(.grid-sheet):not(.nbd-table):not(.nbd-grid):not(.nbx-t) tbody tr:hover > td { background: #F4F9FB; }
.table > tbody tr:hover > td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.table > tbody td:first-child strong, .table > tbody td:first-child { font-weight: 550; }
td.num, th.num, .mis-table td, table.grid td { font-variant-numeric: tabular-nums; }
.table .small.faint, .table .small.muted { font-size: .78rem; }
/* task list / report grid: dark header like the old portal, status cells as soft blocks */
table.grid th { background: #1E3A8A !important; color: #fff !important; font-size: .72rem; letter-spacing: .03em; text-transform: none; }
table.grid td { padding: .6rem .8rem; }
table.grid td a { font-weight: 600; text-decoration: none; }
table.grid td a:hover { text-decoration: underline; }
/* next step chips in the step list */
.next-list { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.next-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-right: .15rem; }
.next-chip { display: inline-flex; align-items: center; font-size: .78rem; padding: .15rem .55rem; border-radius: 999px; background: #EEF3FF; color: #1E2F5C; }
.next-chip::before { content: "\2192"; margin-right: .3rem; color: var(--brand); }
.next-chip.fin { background: #E7F5EC; color: #1E7A45; }
.next-chip.fin::before { content: "\2713"; color: #1E7A45; }
.step-table td { padding-top: .7rem; padding-bottom: .7rem; vertical-align: middle; }

/* row numbers (1, 2, 3 ... across pages) */
th.col-no, td.col-no { width: 1%; white-space: nowrap; text-align: right; color: var(--bs-secondary-color, #6b7280); font-variant-numeric: tabular-nums; padding-right: .75rem; }

/* ---------- task list: steps of one request, top to bottom ---------- */
.steps-drawer { --bs-offcanvas-width: min(520px, 100vw); }
.sv-head { padding-bottom: .75rem; margin-bottom: .75rem; border-bottom: 1px solid var(--bs-border-color); }
.sv-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.sv-steps::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--bs-border-color); }
.sv-step { display: flex; gap: .75rem; margin-bottom: .6rem; position: relative; }
.sv-dot { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 600;
  background: var(--bs-body-bg); border: 2px solid var(--bs-border-color); color: var(--bs-secondary-color); z-index: 1; }
.sv-card { flex: 1; border: 1px solid var(--bs-border-color); border-radius: 10px; padding: .6rem .75rem; background: var(--bs-body-bg); }
.sv-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem .75rem; margin-top: .35rem; font-size: .82rem; }
.sv-meta span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.sv-badge { font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; background: #eef1f5; color: #4b5563; }
.sv-step.ok .sv-dot { border-color: #16a34a; background: #16a34a; color: #fff; }   .sv-badge.ok { background: #dcfce7; color: #166534; }
.sv-step.late .sv-dot { border-color: #dc2626; background: #dc2626; color: #fff; } .sv-badge.late { background: #fee2e2; color: #991b1b; }
.sv-step.now .sv-card { border-color: #1D4ED8; box-shadow: 0 0 0 3px rgba(29,78,216,.12); }
.sv-step.now .sv-dot { border-color: #1D4ED8; color: #1D4ED8; }                    .sv-badge.now { background: #DBE6FF; color: #1E3A8A; }
.sv-badge.hold, .sv-badge.wait { background: #fef3c7; color: #92400e; }
.sv-step.off { opacity: .6; }
table.grid tbody tr.link { cursor: pointer; }
/* task list fits the screen: text wraps instead of scrolling sideways */
.grid-wrap:has(table.grid.compact) { max-height: none; }
table.grid.compact { table-layout: auto; width: 100%; }
table.grid.compact td { white-space: normal; overflow-wrap: break-word; }
table.grid.compact td:nth-child(5) { white-space: nowrap; }
table.grid.compact td:nth-child(2) { white-space: nowrap; font-weight: 600; color: var(--bs-emphasis-color); }
table.grid.compact th { min-width: 0; vertical-align: middle; }
.offcanvas-backdrop.show { opacity: .35; }
#out .sv-steps { max-width: 760px; }

/* task list: steps of one request, full screen - summary on the left, steps top to bottom */
.steps-full .modal-header { position: sticky; top: 0; z-index: 2; background: var(--bs-body-bg); }
.steps-full .modal-body { background: var(--bs-tertiary-bg, #f3f6f9); overflow-x: hidden; }
.sv-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1.5rem; align-items: start; max-width: 1400px; }
.sv-side { position: sticky; top: 0; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: 12px; padding: 1rem 1.1rem; }
.sv-info { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px dashed var(--bs-border-color); font-size: .88rem; }
.sv-info span { color: var(--bs-secondary-color); } .sv-info b { text-align: right; font-weight: 600; }
.sv-now { margin-top: .9rem; display: grid; gap: .5rem; }
.sv-now > div { background: #FCE7F3; border: 1px solid #F5B8D8; border-radius: 10px; padding: .55rem .7rem; font-size: .85rem; }
.sv-now span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #1E3A8A; }
.sv-count { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-top: .9rem; text-align: center; font-size: .75rem; color: var(--bs-secondary-color); }
.sv-count b { display: block; font-size: 1.3rem; color: var(--bs-emphasis-color); }
.sv-layout .sv-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sv-step.late.now .sv-dot { color: #fff; border-color: #dc2626; }
@media (max-width: 991.98px) { .sv-layout { grid-template-columns: 1fr; } .sv-side { position: static; } .sv-layout .sv-meta { grid-template-columns: 1fr 1fr; } }
.steps-full .sv-card, .steps-full .sv-side { background: #fff; } .steps-full .sv-step.off .sv-card { background: transparent; }

/* request view: entry details + phone fit */
.sv-layout { grid-template-columns: 380px minmax(0, 1fr); margin: 0 auto; }
.sv-side { max-height: calc(100vh - 110px); overflow-y: auto; }
.sv-h { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); margin: 1.1rem 0 .4rem; font-weight: 650; }
.sv-fields { margin: 0; font-size: .86rem; }
.sv-fields dt { font-weight: 500; color: var(--bs-secondary-color); font-size: .78rem; margin-top: .5rem; }
.sv-fields dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.sv-fields dd table { font-size: .78rem; } .sv-fields dd > div { max-width: 100%; overflow-x: auto; }
.sv-info b, .sv-card b, .sv-meta div { overflow-wrap: anywhere; min-width: 0; }
.sv-card { min-width: 0; }
@media (max-width: 991.98px) { .sv-layout { grid-template-columns: minmax(0, 1fr); } .sv-side { max-height: none; overflow: visible; position: static; } }
@media (max-width: 575.98px) {
  .steps-full .modal-body { padding: .6rem; }
  .sv-layout { gap: .8rem; }
  .sv-side { padding: .8rem; }
  .sv-layout .sv-meta { grid-template-columns: 1fr; }
  .sv-step { gap: .5rem; }
  .sv-dot { flex-basis: 26px; height: 26px; font-size: .7rem; }
  .sv-steps::before { left: 12px; }
  .sv-card .d-flex { flex-wrap: wrap; }
}

/* ---------- fit every screen: nothing wider than the phone ---------- */
.split > *, .panel, .page-head > *, main, .content { min-width: 0; }
h1, h2, h3, .panel-head > * { overflow-wrap: anywhere; }
img, svg, video { max-width: 100%; }
@media (max-width: 575.98px) {
  .page-head { flex-wrap: wrap; gap: .5rem; }
  .page-head .btn { white-space: normal; }
  .modal-dialog:not(.modal-fullscreen) { margin: .5rem; }
}
@media (max-width: 400px) { .page-head .btn-group > .btn { padding-left: .55rem; padding-right: .55rem; font-size: .85rem; } }
@media (max-width: 575.98px) { .steps-full .modal-header h2 { font-size: .95rem; overflow-wrap: anywhere; } .steps-full .modal-header .btn { white-space: nowrap; } }
/* phones: two filters a row (From / To side by side), wide ones full row */
@media (max-width: 575.98px) {
}

/* confirmation box: always on top, even over another popup */
.ews-ask { z-index: 1080; } .ews-ask-bd { z-index: 1075; }
.ask-icon { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.6rem;
  background: rgba(29,78,216,.1); color: #1D4ED8; }
.ask-icon.danger { background: #fee2e2; color: #b91c1c; }

/* ---------- sidebar collapse (computer screens): icons only ---------- */
@media (min-width: 992px) {
  .sidebar, .main-wrap { transition: width .2s ease, margin-left .2s ease; }
  body.nav-mini { --sidebar-w: 72px; }
  body.nav-mini .sidebar .brand-text, body.nav-mini .sidebar-search, body.nav-mini .sidebar-nav .nav-link-item span,
  body.nav-mini .sidebar-nav .badge, body.nav-mini .sidebar-foot .who { display: none !important; }
  body.nav-mini .sidebar-head { justify-content: center; padding-left: .5rem; padding-right: .5rem; }
  body.nav-mini .sidebar-nav { padding-left: .5rem; padding-right: .5rem; }
  body.nav-mini .sidebar-nav .nav-link-item { justify-content: center; padding-left: 0; padding-right: 0; }
  body.nav-mini .sidebar-nav .nav-link-item i { margin: 0; font-size: 1.15rem; }
  body.nav-mini .sidebar-foot { justify-content: center; padding-left: .5rem; padding-right: .5rem; }
}

/* ---------- type-to-search dropdowns (js/combo.js) ---------- */
.combo { position: relative; width: 100%; min-width: 0; }
.combo .combo-native { display: none !important; }
.combo .combo-input { padding-right: 2rem; text-overflow: ellipsis; cursor: pointer; background-color: var(--bs-body-bg); }
.combo .combo-input:focus { cursor: text; }
.combo .combo-input::placeholder { color: var(--bs-body-color); opacity: .75; }
.combo-caret { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: .8rem; color: var(--bs-secondary-color); cursor: pointer; transition: transform .15s; }
.combo.open .combo-caret { transform: translateY(-50%) rotate(180deg); }
.combo.disabled .combo-input { background-color: var(--bs-secondary-bg); cursor: not-allowed; }
.combo-list { position: fixed; z-index: 2000; margin: 0; padding: .3rem; list-style: none; overflow-y: auto; background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color); border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 30, 45, .18); font-size: .9rem; }
.combo-list li { padding: .45rem .65rem; border-radius: 7px; cursor: pointer; overflow-wrap: anywhere; }
.combo-list li.active { background: rgba(29, 78, 216, .1); }
.combo-list li.chosen { font-weight: 600; color: #1D4ED8; }
.combo-list li.empty { color: var(--bs-secondary-color); }
.combo-list li.more { cursor: default; font-size: .8rem; color: var(--bs-secondary-color); text-align: center; }
.combo-list mark { padding: 0; background: #fef08a; border-radius: 2px; }
.input-group > .combo { flex: 1 1 auto; width: 1%; }
.input-group > .combo:not(:first-child) .combo-input { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-group > .combo:not(:last-child) .combo-input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
/* Entry Form (Request) and Tasks filters: one row of dropdowns like the old portal */
.entry-form .panel-head h1 { color: #0e5a8a; text-transform: uppercase; letter-spacing: .02em; font-weight: 700; }
.ef-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1.25rem; margin: .75rem 0 1rem; }
.ef-row .field { margin: 0; }
.ef-submit { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-top: .75rem; margin-top: .75rem; border-top: 1px solid var(--bs-border-color); }
@media (max-width: 767.98px) { .ef-row { grid-template-columns: 1fr; } }
.ef-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: .25rem; }
@media (max-width: 991.98px) { .ef-row.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .ef-row.four { grid-template-columns: 1fr; } }

/* ---------- compact page tops, full width (fits any screen, sidebar open or collapsed) ---------- */
.page { max-width: none; padding: 1rem 1.5rem 2.5rem; }
.page-head { margin-bottom: .85rem; align-items: center; }
.page-head h1, .page-head .h1 { font-size: 1.25rem; line-height: 1.3; }
.page-head p { font-size: .84rem; margin-top: .15rem; max-width: 70ch; }
.page .breadcrumb { margin-bottom: .35rem !important; font-size: .78rem; }
.page-head .btn:not(.btn-sm) { padding: .4rem .9rem; font-size: .88rem; }
.panel { padding: 1rem 1.15rem; }
.panel-head { margin-bottom: .6rem; }
.panel-head h2 { font-size: 1rem; }
.topbar { height: 56px; }
.modal-header { padding: .75rem 1.1rem; }
.modal-title { font-size: 1.05rem; }
@media (max-width: 991.98px) { .page { padding: .85rem .9rem 2rem; } }
@media (min-width: 992px) {
  body.nav-mini .sidebar-nav { scrollbar-width: none; padding-top: 0; }
  body.nav-mini .sidebar-nav::-webkit-scrollbar { display: none; }
  body.nav-mini .sidebar-nav .nav-link-item { padding-top: .5rem; padding-bottom: .5rem; margin-bottom: .1rem; }
  body.nav-mini .sidebar-head { padding-top: .8rem; padding-bottom: .6rem; }
}

/* search box above a list (EWS.table(..., {search: true})) */
.tbl-search { max-width: 380px; margin-bottom: .75rem; }
.mis-search { max-width: 280px; min-width: 180px; } .mis-search input { height: 34px; font-size: .85rem; }
.role-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .4rem .9rem; max-height: 50vh; overflow-y: auto; }
.role-pick .choice { display: flex; gap: .5rem; align-items: flex-start; padding: .45rem .6rem; border: 1px solid var(--bs-border-color); border-radius: 8px; margin: 0; }

/* User Assigned Role: four roomy steps, chip toggles, processes grouped by location */
.ua-form { display: grid; gap: 1rem; margin-bottom: 1.5rem; max-width: 1280px; }
.ua-card { display: flex; gap: 1rem; background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 14px; padding: 1.25rem 1.4rem; box-shadow: 0 1px 2px rgba(15,30,45,.04); }
.ua-step { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #1D4ED8; background: rgba(29,78,216,.1); }
.ua-main { flex: 1; min-width: 0; }
.ua-main h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; font-size: 1rem; margin: .3rem 0 1rem; }
.ua-main h2 small { font-size: .8rem; font-weight: 400; color: var(--bs-secondary-color); }
.ua-two { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 1rem 1.5rem; }
.ua-chips { display: flex; flex-wrap: wrap; gap: .55rem .6rem; }
.ua-chip { margin: 0; cursor: pointer; }
.ua-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ua-chip span { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .95rem; border: 1px solid var(--bs-border-color); border-radius: 999px;
  font-size: .88rem; background: var(--bs-body-bg); transition: background .15s, border-color .15s, color .15s; }
.ua-chip span i { display: none; }
.ua-chip:hover span { border-color: #1D4ED8; }
.ua-chip input:checked + span { background: #1D4ED8; border-color: #1D4ED8; color: #fff; }
.ua-chip input:checked + span i { display: inline; }
.ua-chip input:focus-visible + span { outline: 2px solid #1D4ED8; outline-offset: 2px; }
.ua-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .9rem; }
.ua-tools .search-box { max-width: 360px; }
.ua-procs { max-height: 460px; overflow-y: auto; border: 1px solid var(--bs-border-color); border-radius: 12px; }
.ua-group + .ua-group { border-top: 1px solid var(--bs-border-color); }
.ua-group-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem;
  background: var(--bs-tertiary-bg, #f6f8fa); font-size: .9rem; }
.ua-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .15rem 1.5rem; padding: .6rem 1rem .9rem; }
.ua-proc { display: flex; align-items: flex-start; gap: .6rem; margin: 0; padding: .45rem .5rem; border-radius: 8px; font-size: .9rem; line-height: 1.35; cursor: pointer; }
.ua-proc:hover { background: rgba(29,78,216,.06); }
.ua-proc input { margin-top: .15rem; flex: 0 0 auto; }
.ua-save { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: .6rem; padding: .85rem 1.2rem;
  background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 14px; box-shadow: 0 -6px 18px rgba(15,30,45,.08); }
@media (max-width: 767.98px) { .ua-two { grid-template-columns: 1fr; } .ua-card { padding: 1rem; gap: .7rem; } .ua-step { display: none; } .ua-list { grid-template-columns: 1fr; } }
.ua-proc .form-check-input { width: 1.05rem; height: 1.05rem; border: 1.5px solid #8a99a8; }
.ua-proc .form-check-input:checked { background-color: #1D4ED8; border-color: #1D4ED8; }
.ua-proc:has(input:checked) { background: rgba(29,78,216,.08); font-weight: 600; }
/* Logs */
.log-changes { margin: 0; padding-left: 1rem; font-size: .85rem; }
.log-changes li { margin: .1rem 0; overflow-wrap: anywhere; }
.log-new { color: #0f766e; font-weight: 600; }
details summary { cursor: pointer; color: #1D4ED8; font-size: .85rem; }

/* login: full-screen background picture (replace app/static/img/login-bg.jpg to change it) */
.login-wrap { background: #05080d url("../img/login-bg.jpg") center / cover no-repeat fixed; }
.login-side { background: linear-gradient(90deg, rgba(4, 10, 18, .82) 0%, rgba(4, 10, 18, .55) 60%, rgba(4, 10, 18, 0) 100%); }
.login-side::after { display: none; }
.login-side p { color: #C8D3DC; }
.login-form { background: linear-gradient(90deg, rgba(4, 10, 18, 0), rgba(4, 10, 18, .35)); }
.login-card { background: rgba(255, 255, 255, .92); border: 1px solid rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
@media (max-width: 860px) { .login-wrap { background-attachment: scroll; } .login-side { background: rgba(4, 10, 18, .7); } }

/* login v2: everything in the left column, the picture's padlock stays visible on the right */
.login-wrap { grid-template-columns: minmax(420px, 44%) 1fr; background-position: right center; background-attachment: scroll; }
.login-side { background: linear-gradient(90deg, rgba(3, 12, 26, .88) 0%, rgba(3, 12, 26, .72) 70%, rgba(3, 12, 26, 0) 100%);
  gap: 1.5rem; padding: 2.4rem 3rem; }
.login-mid { display: grid; gap: 1.4rem; max-width: 420px; }
.login-mid h1 { font-size: 2rem; max-width: 16ch; margin: 0; }
.login-mid .login-card { width: 100%; }
.login-art { min-height: 100%; }
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; background-position: 70% center; }
  .login-side { padding: 1.5rem 1.1rem; background: linear-gradient(180deg, rgba(3, 12, 26, .85), rgba(3, 12, 26, .6)); }
  .login-mid h1 { font-size: 1.6rem; }
  .login-art { display: none; }
}
/* login wording: Welcome to National Group / Unite · Perform · Transform */
.login-hello h1 { color: #fff; font-size: 2.2rem; line-height: 1.15; max-width: 14ch; margin: 0 0 .7rem; letter-spacing: -.01em; }
.login-tag { display: flex; align-items: center; gap: .7rem; margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #7DD3FC !important; }
.login-tag i { width: 6px; height: 6px; border-radius: 50%; background: #60A5FA; box-shadow: 0 0 10px #60A5FA; }
@media (max-width: 860px) { .login-hello h1 { font-size: 1.6rem; } .login-tag { font-size: .85rem; gap: .5rem; } }
/* login: bigger box, moved in from the edge */
@media (min-width: 861px) {
  .login-wrap { grid-template-columns: minmax(560px, 50%) 1fr; }
  .login-side { padding: 3rem clamp(2.5rem, 8vw, 9rem); }
  .login-mid { max-width: 520px; width: 100%; gap: 1.8rem; }
  .login-hello h1 { font-size: clamp(2.2rem, 2.6vw, 3rem); }
  .login-tag { font-size: 1.1rem; }
  .login-mid .login-card { padding: 2.6rem 2.6rem 2.2rem; border-radius: 1.4rem; }
  .login-card h2 { font-size: 1.75rem !important; }
  .login-card .form-label { font-size: 1rem; }
  .login-card .form-control, .login-card .input-group-text, .login-card #showpw { font-size: 1.05rem; padding-top: .75rem; padding-bottom: .75rem; }
  .login-card button[type=submit] { font-size: 1.1rem; padding: .85rem 1rem !important; border-radius: .7rem; }
}
@media (min-width: 861px) and (max-height: 820px) {
  .login-side { padding-top: 1.6rem; padding-bottom: 1.4rem; }
  .login-mid { gap: 1.2rem; }
  .login-mid .login-card { padding: 2rem 2.4rem 1.7rem; }
  .login-card .mb-4 { margin-bottom: 1rem !important; }
}
/* login: block sits higher (not pushed to the bottom) */
@media (min-width: 861px) {
  .login-side { justify-content: flex-start; }
  .login-mid { margin-top: clamp(1rem, 5vh, 3rem); }
  .login-side > p:last-child { margin-top: auto; padding-top: 1rem; }
}
@media (min-width: 861px) {
  .login-side { padding-top: 2rem; padding-bottom: 1.2rem; }
  .login-mid { margin-top: clamp(.5rem, 3vh, 2rem); gap: 1.4rem; }
}
@media (min-width: 861px) and (max-height: 820px) { .login-mid { margin-top: .5rem; } .login-hello h1 { font-size: 2.1rem; } }

/* ===== login: centred box over the factory picture ===== */
.login-wrap { display: block; min-height: 100vh; background: #050b16 url("../img/login-bg.jpg") center / cover no-repeat; }
.login-side { min-height: 100vh; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem 1.25rem !important; text-align: center;
  background: radial-gradient(ellipse at center, rgba(4, 12, 28, .55) 0%, rgba(4, 12, 28, .78) 65%, rgba(4, 12, 28, .9) 100%) !important; }
.login-side > .brand { position: absolute; top: 1.6rem; left: 2rem; text-align: left; }
.login-mid { margin: 0 auto !important; width: 100%; max-width: 480px !important; justify-items: center; gap: 1.4rem !important; }
.login-hello h1 { max-width: none; margin-left: auto; margin-right: auto; text-shadow: 0 2px 18px rgba(0, 0, 0, .55); }
.login-tag { justify-content: center; }
.login-mid .login-card { text-align: left; width: 100%; }
.login-side > p:last-child { position: absolute; bottom: 1.1rem; left: 0; right: 0; margin: 0 !important; padding: 0 !important; text-align: center; }
.login-art { display: none !important; }
@media (max-width: 860px) {
  .login-side > .brand { position: static; align-self: flex-start; margin-bottom: 1.5rem; }
  .login-side { justify-content: flex-start; }
  .login-side > p:last-child { position: static; margin-top: 1.5rem !important; }
}
.login-side { background: radial-gradient(ellipse at center, rgba(4, 12, 28, .45) 0%, rgba(4, 12, 28, .55) 55%, rgba(4, 12, 28, .75) 100%) !important; }
@media (min-width: 861px) { .login-hello h1 { white-space: nowrap; } }
.login-side > p:last-child { width: 100%; padding-left: 1rem !important; padding-right: 1rem !important; }
.login-mid { display: flex !important; flex-direction: column; align-items: center; max-width: none !important; }
.login-mid .login-card { width: min(480px, 100%) !important; }
.login-side > p:last-child { text-align: center !important; }
.login-side > p:last-child { max-width: none !important; }

/* ---------- date picker (app.js EWS.datePicker) ---------- */
.dp-input { padding-right: 2.2rem !important; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%237D8D9C' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right .7rem center !important; background-size: 15px !important; }
.dp-input[readonly] { cursor: default; }
.dp-pop { position: fixed; z-index: 2000; width: 290px; padding: .65rem; background: var(--bs-body-bg); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); font-size: .875rem; }
.dp-head { display: flex; align-items: center; gap: .3rem; margin-bottom: .45rem; }
.dp-sel { flex: 1; min-width: 0; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: 7px; background: var(--bs-body-bg); color: inherit; font: inherit; font-weight: 600; }
.dp-nav { width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); }
.dp-nav:hover { background: var(--brand-soft); color: var(--brand); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-wd { text-align: center; font-size: .72rem; font-weight: 600; color: var(--ink-3); padding: .2rem 0; }
.dp-day { height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-variant-numeric: tabular-nums; }
.dp-day:hover:not(:disabled) { background: var(--brand-soft); }
.dp-wd.sun, .dp-day.sun { color: var(--late); }
.dp-day.out { color: var(--ink-3); opacity: .55; }
.dp-day.today { box-shadow: inset 0 0 0 1.5px var(--brand); font-weight: 600; }
.dp-day.focus { background: var(--line-2); }
.dp-day.chosen, .dp-day.chosen:hover { background: var(--brand); color: #fff; font-weight: 600; }
.dp-day:disabled { opacity: .3; cursor: not-allowed; }
.dp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .45rem; padding-top: .45rem; border-top: 1px solid var(--line-2); }
[data-bs-theme="dark"] .dp-day { color: var(--bs-body-color); }

/* ---------- file attachments (forms.js EWS.forms.fileBox) ---------- */
.file-box { display: flex; flex-direction: column; gap: .5rem; }
.file-drop { display: flex; align-items: center; gap: .75rem; margin: 0; padding: .7rem .9rem; border: 1.5px dashed var(--line);
  border-radius: var(--radius); background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; }
.file-drop:hover, .file-drop.over, .file-drop:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.file-drop > i { font-size: 1.3rem; color: var(--brand); }
.file-drop span { display: flex; flex-direction: column; line-height: 1.3; color: var(--ink-2); }
.file-drop strong { color: var(--brand); font-weight: 600; }
.file-drop small { color: var(--ink-3); font-size: .78rem; }
.file-box.busy .file-drop { pointer-events: none; opacity: .5; }
.file-progress { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; }
.file-progress .progress { height: 6px; }
.file-item { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; max-width: 100%; }
.file-link { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; font-weight: 500; text-decoration: none; }
.file-link span { overflow-wrap: anywhere; }
a.file-link:hover span { text-decoration: underline; }
.file-link i { font-size: 1.1rem; flex: none; }
.file-thumb { display: block; flex-basis: 100%; }
.file-thumb img { display: block; max-width: min(100%, 220px); max-height: 160px; object-fit: contain; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; image-rendering: auto; }
.dp-input.dp-clock { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%237D8D9C' viewBox='0 0 16 16'%3E%3Cpath d='M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z'/%3E%3Cpath d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m7-8A7 7 0 1 1 1 8a7 7 0 0 1 14 0'/%3E%3C/svg%3E") !important; }
.dp-time { display: flex; align-items: center; gap: .35rem; margin-top: .55rem; padding-top: .55rem; border-top: 1px solid var(--line-2); }
.dp-only-time .dp-time { margin-top: 0; padding-top: 0; border-top: 0; }
.dp-only-time { width: 290px; }
.dp-time-label { display: inline-flex; align-items: center; gap: .3rem; margin-right: auto; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.dp-time .dp-sel { flex: 0 0 auto; width: 58px; text-align: center; padding: .35rem .2rem; }
.dp-ap { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.dp-ap button { border: 0; background: transparent; padding: .35rem .5rem; font-weight: 600; font-size: .8rem; color: var(--ink-2); }
.dp-ap button.on { background: var(--brand); color: #fff; }
.dp-summary { margin-top: .45rem; text-align: center; font-weight: 600; color: var(--brand); font-size: .85rem; }

/* ---------- process "Check for problems" ---------- */
.check-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: .6rem; }
.check-group > summary { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .55rem; padding: .65rem .85rem; cursor: pointer; list-style: none; }
.check-group > summary::-webkit-details-marker { display: none; }
.check-group > summary small { flex-basis: 100%; padding-left: 1.6rem; color: var(--ink-3); }
.check-group ul { margin: 0; padding: 0 .9rem .7rem 2.4rem; }
.check-group li { padding: .15rem 0; overflow-wrap: anywhere; }
.check-n { min-width: 1.6rem; padding: 0 .45rem; border-radius: 99px; font-size: .78rem; font-weight: 600; text-align: center; background: var(--line-2); }
.check-group.bad { border-color: #f1c2bd; background: var(--late-soft); } .check-group.bad > summary i { color: var(--late); }
.check-group.unused > summary i { color: var(--soon); }
.check-group.info > summary i { color: var(--brand); }
.ok-note { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; } .ok-note i { color: var(--ok); }

/* steps view: steps this request does not need (its route went another way) */
.sv-main { min-width: 0; }
.sv-skipnote { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; margin-bottom: .9rem; padding: .6rem .85rem;
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); font-size: .9rem; }
.sv-skipnote > i { color: var(--ink-3); }
.sv-steps.hide-skipped .sv-step.skip { display: none; }
.sv-step.skip { opacity: .7; }
.sv-step.skip .sv-card { padding-top: .45rem; padding-bottom: .45rem; border-style: dashed; background: transparent !important; color: var(--ink-3); }
.sv-step.skip .sv-dot { width: 24px; height: 24px; margin-left: 4px; font-size: .72rem; }
.sv-badge.skip { background: var(--line-2); color: var(--ink-3); }

/* steps view: step name only; click a done or pending step to see its details and what was entered */
.sv-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; padding: 0; border: 0;
  background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.sv-head.static { cursor: default; }
.sv-head-r { display: inline-flex; align-items: center; gap: .6rem; flex: none; }
.sv-head .bi-chevron-down { color: var(--ink-3); transition: transform .15s var(--ease); }
.sv-head[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }
.sv-head:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 6px; }
.sv-step:has(.sv-head[aria-expanded]) .sv-card:hover { border-color: var(--brand); }
.sv-detail { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line-2); }
.sv-values { display: grid; grid-template-columns: minmax(140px, 240px) minmax(0, 1fr); gap: .35rem 1rem; margin: .75rem 0 0; font-size: .88rem; }
.sv-values dt { font-weight: 500; color: var(--ink-3); }
.sv-values dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.sv-novalues { margin: .6rem 0 0; color: var(--ink-3); font-size: .85rem; }
@media (max-width: 575.98px) { .sv-values { grid-template-columns: 1fr; } .sv-values dd { margin-bottom: .4rem; } }

/* Task Management filters */
.tm-filters { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .9rem 1rem; align-items: end; }
.tm-filters .field { margin: 0; min-width: 0; grid-column: span 3; }
.tm-filters .field.tm-wide { grid-column: span 3; }
@media (max-width: 991.98px) { .tm-filters .field { grid-column: span 6; } }
@media (max-width: 575.98px) { .tm-filters .field { grid-column: span 12; } }
#pick { margin-bottom: 1rem; }

/* task lists: compact table, delay shown as text (no red cells) */
table.grid.compact { font-size: .78rem; }
table.grid.compact th { font-size: .66rem; padding: .45rem .55rem; min-width: 0; }
table.grid.compact td { padding: .38rem .5rem; white-space: normal; min-width: 64px; line-height: 1.35; }
table.grid.compact td:nth-child(2) { font-weight: 600; min-width: 120px; }
table.grid.compact td.col-no { min-width: 0; width: 1%; }
table.grid td.cell-delay { color: #B42318; font-weight: 600; white-space: nowrap; }

/* steps view on a computer: the two sides scroll on their own, so every step stays reachable */
@media (min-width: 992px) {
  .steps-full .modal-body { overflow: hidden; padding-bottom: 0; }
  .steps-full .sv-layout { max-width: none; height: calc(100vh - 64px - 1rem); align-items: stretch; }
  .steps-full .sv-side { max-height: none; height: 100%; overflow-y: auto; align-self: stretch; }
  .steps-full .sv-main { height: 100%; overflow-y: auto; padding: 0 .5rem 1.5rem 0; scrollbar-gutter: stable; }
}

/* smaller tables (Tasks, Task Management) */
.table.compact-table { font-size: .8rem; }
.table.compact-table > thead th { font-size: .68rem; padding: .5rem .6rem; }
.table.compact-table > tbody td { padding: .45rem .6rem; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 340px; }

/* colourful flow chart legend */
.fc-legend .fc-sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 2px solid; vertical-align: -2px; margin-right: .3rem; }
.fc-legend .fc-sep { width: 1px; align-self: stretch; background: var(--line); }

table.grid .g-time { font-size: .92em; color: var(--ink-3); }
table.grid.compact { width: 100%; }
table.grid.compact td { white-space: normal; }
table.grid.compact td:nth-child(3) { min-width: 140px; }
@media (max-width: 1400px) { table.grid.compact { font-size: .75rem; } table.grid.compact td { padding: .36rem .42rem; } table.grid.compact th { padding: .42rem .42rem; } }

/* process level list: room for "Goes next to" */
.step-table { table-layout: fixed; width: 100%; }
.step-table th:nth-child(1) { width: 6%; } .step-table th:nth-child(2) { width: 24%; } .step-table th:nth-child(3) { width: 15%; }
.step-table th:nth-child(4) { width: 11%; } .step-table th:nth-child(5) { width: 9%; } .step-table th:nth-child(6) { width: 27%; } .step-table th:nth-child(7) { width: 8%; }
.step-table td { overflow-wrap: anywhere; }
@media (max-width: 991.98px) { .step-table { table-layout: auto; } }
.step-table tbody tr { cursor: pointer; }
.sv-layout .sv-card { padding: .65rem .85rem; }

/* ================= Theme: blue shades + white + red-violet highlights ================= */
.nav-link-item.active { background: linear-gradient(90deg, rgba(192, 38, 126, .28), rgba(192, 38, 126, .06)); }
.nav-link-item.active::before { background: var(--accent); box-shadow: 0 0 10px rgba(192, 38, 126, .7); }
.brand-mark { background: linear-gradient(135deg, #2563EB, var(--accent)) !important; }
.page-head h1 { position: relative; }
.page-head h1::after { content: ""; display: block; width: 36px; height: 3px; margin-top: .35rem; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600);
  --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: #B4C6F0; --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700); }
.btn-accent { --bs-btn-color: #fff; --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--accent-600); --bs-btn-hover-border-color: var(--accent-600); }
.badge.text-bg-primary, #fx-n { background: var(--accent) !important; }
.tabs button.active { color: var(--accent); }
.tabs button.active::after { background: var(--accent) !important; }
.sv-step.now .sv-card { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(192, 38, 126, .12); }
.sv-step.now .sv-dot { border-color: var(--accent); color: var(--accent); }
.sv-badge.now { background: var(--accent-soft); color: var(--accent-600); }
.sv-now { background: var(--accent-soft) !important; border-color: #F5C2DD !important; }
.sv-now span { color: var(--accent-600) !important; }
table.grid th { background: linear-gradient(180deg, #1E3A8A, #1D4ED8) !important; }
table.grid td.cell-delay { color: var(--late); }
.table > thead th { color: var(--ink-2); }
.check-n, .tl-count { color: var(--brand-700); }
.form-control:focus, .form-select:focus, .combo-input:focus { border-color: #93B4F5; box-shadow: 0 0 0 .2rem rgba(29, 78, 216, .18); }
.dp-day.chosen, .dp-day.chosen:hover { background: var(--accent); }
.dp-ap button.on { background: var(--accent); }
.login-card .btn-primary { background: linear-gradient(90deg, var(--brand), var(--accent)); border: 0; }
.bell-count { background: var(--accent) !important; }

/* ================= Softer light-blue version (lighter sidebar and headers) ================= */
.sidebar { background: linear-gradient(180deg, #F3F7FF 0%, #E6EEFF 100%) !important; color: #3A4F7A; border-right: 1px solid #D9E4FA; }
.brand, .brand:hover { color: #1E3A8A; }
.brand-text small { color: #6B7FA8; }
.sidebar-search i { color: #8597BC; }
.sidebar-search input { background: #fff; border: 1px solid #D3E0FA; color: var(--ink); }
.sidebar-search input::placeholder { color: #8597BC; }
.sidebar-search input:focus { background: #fff; border-color: #93B4F5; }
.sidebar-nav { scrollbar-color: rgba(59, 130, 246, .25) transparent; }
.nav-group-btn { color: #6B7FA8; }
.nav-group-btn:hover { color: #1E3A8A; background: rgba(59, 130, 246, .08); }
.nav-link-item { color: #3A4F7A; }
.nav-link-item:hover { background: rgba(59, 130, 246, .10); color: #1E3A8A; }
.nav-link-item.active { background: linear-gradient(90deg, rgba(192, 38, 126, .14), rgba(192, 38, 126, .03)); color: var(--accent-600); }
.nav-link-item.active::before { box-shadow: none; }
.nav-link-item.active .bi { opacity: 1; }
.sidebar-foot { border-top: 1px solid #D3E0FA; }
.sidebar-foot .who strong { color: #1E3A8A; }
.sidebar-foot .who small { color: #6B7FA8; }
.sidebar .btn-close { filter: none; }
table.grid th { background: #E3EDFF !important; color: #1E3A8A !important; border-color: #CFDDF8 !important; }
.mis-table thead th { background: #E3EDFF; color: #1E3A8A; }
.mis-table tbody tr:hover td { background: #EEF4FF; }

/* MIS: "Task Details" popup in the old EWS layout */
.task-details .modal-header { background: linear-gradient(90deg, #2563EB, #3B82F6); color: #fff; border: 0; padding: .85rem 1.1rem; }
.task-details .modal-title { font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: #fff; }
.task-details .modal-title small { display: block; text-transform: none; font-weight: 500; font-size: .78rem; letter-spacing: 0; opacity: .9; margin-top: .15rem; }
.task-details .modal-header .btn-close { width: 34px; height: 34px; padding: 0; margin: 0 0 0 auto; border-radius: 50%; opacity: 1; background: var(--accent) none;
  color: #fff; display: grid; place-items: center; font-size: 1rem; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.task-details .modal-header .btn-close:hover { background: var(--accent-600); }
.task-details .table > thead th { background: #E3EDFF; color: #1E3A8A; text-align: center; font-weight: 700; }
.task-details .table > tbody td { text-align: center; vertical-align: middle; }
.task-details .td-eid { font-weight: 600; }
.td-desc { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .45rem; margin: 0; text-align: left; max-width: 420px; margin-inline: auto; }
.td-desc dt { font-weight: 700; text-align: right; } .td-desc dd { margin: 0; }

/* MIS "Task Details" popup: wide, like the old portal */
.task-details .td-dialog { max-width: min(1600px, 96vw); }
.task-details .modal-header { background: #2F6FD6; }
.td-table { width: 100%; }
.td-table th:nth-child(1) { width: 18%; } .td-table th:nth-child(2) { width: 18%; }
.td-table th:nth-child(4), .td-table th:nth-child(5) { width: 15%; }
.td-table td { white-space: normal; }
.td-table .td-eid { white-space: nowrap; }
.td-desc { max-width: 520px; }
.td-table td:nth-child(4), .td-table td:nth-child(5) { white-space: nowrap; }

/* popup on top of a popup (Entry ID details over MIS Task Details) */
.modal.modal-stack { z-index: 1070; } .modal-backdrop.modal-stack-bd { z-index: 1065; }
.entry-pop .modal-dialog { max-width: min(960px, 96vw); }
.entry-pop .modal-header { background: #5B6B9E; color: #fff; border: 0; }
.entry-pop .modal-title { color: #fff; font-size: 1rem !important; font-weight: 700; }
.entry-pop .modal-title span { text-transform: uppercase; margin-right: .5rem; opacity: .9; }
.entry-pop .btn-close { filter: invert(1) grayscale(1) brightness(2); opacity: .9; }
.ep-sub { font-size: .82rem; color: var(--ink-3); margin-bottom: .6rem; }
.ep-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ep-table th, .ep-table td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.ep-table th { width: 38%; font-weight: 700; color: var(--ink); text-align: left; }
.ep-table td { text-align: center; overflow-wrap: anywhere; }
.ep-table .ep-head th { width: auto; background: #EEF4FF; color: #1E3A8A; font-size: .9rem; border-top: 2px solid #C9D8F7; }
.ep-step + .ep-step .ep-head th { padding-top: .75rem; }
.ep-late { color: var(--late); font-weight: 600; }
.ep-open { display: inline-block; margin-left: .4rem; padding: 0 .45rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-600); font-size: .72rem; }
@media (max-width: 575.98px) { .ep-table th { width: 45%; } .ep-table td { text-align: left; } }
.ep-table th { text-transform: none !important; letter-spacing: 0 !important; font-size: .88rem !important; background: #fff; }
.ep-table .ep-head th { background: #EEF4FF; font-size: .92rem !important; }
.master-card .proc-pc { display: block; color: var(--accent-600); font-weight: 600; margin-top: .15rem; }
.master-tools > .combo { flex: 0 1 230px; width: 230px; min-width: 180px; }
@media (max-width: 575.98px) { .master-tools > .combo { flex: 1 1 100%; width: 100%; } }

/* Email / Telegram Template */
.tabs .tab-link { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .9rem; color: var(--ink-2); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; }
.tabs .tab-link.active { color: var(--accent); border-bottom-color: var(--accent); }
.msg-preview { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; font-family: inherit; font-size: .88rem; }
#t-fields { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .75rem; }
#list [data-again], #list a.btn { white-space: nowrap; }

/* User Management: what a person still has */
.wl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.wl-card { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; background: #fff; display: flex; flex-direction: column; }
.wl-card b { font-size: 1.5rem; line-height: 1.1; color: var(--brand-700); }
.wl-card span { font-size: .8rem; color: var(--ink-2); }
.wl-card small { color: var(--late); font-weight: 600; font-size: .75rem; }
.wl-card.bad { border-color: #F5B8D8; background: var(--accent-soft); } .wl-card.bad b { color: var(--accent-600); }
.wl-card.warn { border-color: #FCD9A8; background: #FFF8EC; } .wl-card.warn b { color: #B45309; }
.wl-h { font-size: .9rem; font-weight: 700; margin: 1rem 0 .4rem; color: var(--ink); }
.wl-list { padding-left: 1.1rem; font-size: .88rem; } .wl-list li { margin: .2rem 0; }
.wl-more summary { cursor: pointer; color: var(--brand-600); font-size: .85rem; margin: .3rem 0; }
.wl-actions { position: sticky; bottom: -1rem; background: var(--paper, #fff); padding: .75rem 0 .25rem; margin-bottom: -.25rem; border-top: 1px solid var(--line); z-index: 2; }
.wl-table td { vertical-align: top; }
.wl-table .chip { margin: 0 .2rem .25rem 0; text-decoration: none; }
.wl-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.pc-plant { display: inline-flex; align-items: center; gap: .25rem; margin: 0 .55rem .25rem 0; padding: .1rem .5rem; border-radius: 999px; background: var(--brand-soft); font-size: .8rem; }
.pc-plant a { text-decoration: none; font-weight: 600; }
.wl-in-form { margin-top: 1.4rem; padding-top: 1rem; border-top: 2px solid var(--line); }
.wl-title { font-size: 1rem; font-weight: 700; color: var(--brand-700); margin: 0 0 .8rem; display: flex; gap: .45rem; align-items: center; }
.wl-table td[rowspan] { background: #fff; border-right: 1px solid var(--line); }

/* coming back with Back: the row / card you opened lights up for a moment */
@keyframes cameBack { 0%, 60% { box-shadow: inset 4px 0 0 var(--accent); background: var(--accent-soft); } 100% { box-shadow: none; } }
tbody tr.came-back > td { animation: cameBack 2.5s ease-out; }
.master-card.came-back { animation: cameBack 2.5s ease-out; }
/* everything you can click shows the hand cursor */
.master-card[data-open], [data-open], [data-work], [data-again], [data-edit], [data-prev], [data-del], .chip[href], .combo-input, .sv-head, details > summary { cursor: pointer; }
/* User Management: pages (tabs) a person can see */
.pg-access { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; margin: .4rem 0 1rem; background: #fff; }
.pg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem 1.2rem; }
.pg-group { break-inside: avoid; }
.pg-gname { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-700); margin: .2rem 0 .25rem; }
.pg-group .choice { display: flex; margin: .15rem 0; font-size: .88rem; }
.seg-choice { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }

/* AI pages */
.text-accent { color: var(--accent); }
.ai-sum { margin-bottom: 1rem; border-left: 4px solid var(--accent); }
.ai-text p { margin: 0 0 .45rem; } .ai-text ul, .ai-text ol { margin: 0 0 .6rem; padding-left: 1.2rem; }
.ai-text h4 { font-size: .92rem; font-weight: 700; margin: .7rem 0 .3rem; color: var(--brand-700); }
.ai-wait { color: var(--ink-3); display: inline-flex; gap: .5rem; align-items: center; }
.ai-obs-btn { background: linear-gradient(90deg, var(--brand), var(--accent)); color: #fff; border: 0; }
.ai-obs-btn:hover { color: #fff; filter: brightness(1.05); }

/* ---------- AI Assistant (chat): history panel that hides, centred thread, composer at the bottom ---------- */
.cb { display: grid; grid-template-columns: 290px minmax(0, 1fr); height: calc(100vh - 118px); min-height: 520px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; position: relative;
  box-shadow: 0 1px 2px rgba(15, 35, 80, .04); transition: grid-template-columns .22s ease; }
.cb.side-closed { grid-template-columns: 0 minmax(0, 1fr); }
.cb-side { display: flex; flex-direction: column; gap: .6rem; padding: .85rem .75rem; background: #F7F9FE; border-right: 1px solid var(--line);
  min-width: 0; overflow: hidden; }
.cb.side-closed .cb-side { visibility: hidden; padding: 0; border: 0; }
.cb-side-head { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.cb-side-title { font-weight: 700; font-size: .9rem; color: var(--ink); display: inline-flex; gap: .4rem; align-items: center; white-space: nowrap; }
.cb-side .search-box { max-width: none; min-width: 0; flex: none; }
.cb-side > .btn, .cb-side-head { flex: none; }
.cb-list { flex: 1; overflow-y: auto; margin: 0 -.25rem; padding: 0 .25rem; }
.cb-group { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin: .75rem .4rem .3rem; }
.cb-group:first-child { margin-top: .2rem; }
.cb-none { font-size: .85rem; color: var(--ink-3); margin: .5rem .4rem; }
.cb-item { display: flex; gap: .55rem; align-items: flex-start; padding: .5rem 1.9rem .5rem .55rem; border-radius: 10px; cursor: pointer;
  position: relative; border: 1px solid transparent; }
.cb-item > i { color: var(--ink-3); margin-top: .1rem; font-size: .85rem; }
.cb-item:hover, .cb-item:focus-visible { background: #fff; border-color: var(--line); outline: 0; }
.cb-item.active { background: #fff; border-color: var(--brand-glow); box-shadow: inset 3px 0 0 var(--brand); }
.cb-item.active > i { color: var(--brand); }
.cb-item-b { min-width: 0; }
.cb-item-t { font-size: .85rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-item-m { font-size: .7rem; color: var(--ink-3); margin-top: .1rem; white-space: nowrap; }
.cb-del { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--ink-3);
  opacity: 0; padding: .2rem .35rem; border-radius: 6px; }
.cb-item:hover .cb-del, .cb-item:focus-within .cb-del { opacity: 1; } .cb-del:hover { color: var(--late); background: #FDECEC; }
.cb-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cb-head { display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; border-bottom: 1px solid var(--line); background: #fff; }
.cb-head #expand, .cb-head #new2 { display: none; }
.cb.side-closed .cb-head #expand, .cb.side-closed .cb-head #new2 { display: inline-flex; }
.cb-title { min-width: 0; flex: 1; margin-left: .25rem; }
.cb-name { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-name i { color: var(--accent); }
.cb-sub { font-size: .76rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-plant { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 999px; padding: .15rem .3rem .15rem .75rem;
  background: #fff; color: var(--ink-2); margin: 0; flex-shrink: 0; }
.cb-plant select { border: 0; background-color: transparent; padding: .25rem 1.8rem .25rem .1rem; font-size: .86rem; box-shadow: none; min-width: 120px; }
.cb-log { flex: 1; overflow-y: auto; padding: 1.25rem 1rem; scroll-behavior: smooth; }
.cb-thread { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.1rem; }
.cb-msg.user { align-self: flex-end; max-width: 78%; text-align: right; }
.cb-msg.user .cb-bubble { background: var(--brand); color: #fff; padding: .6rem .95rem; border-radius: 16px 16px 4px 16px; text-align: left;
  display: inline-block; font-size: .93rem; line-height: 1.5; }
.cb-at { font-size: .68rem; color: var(--ink-3); margin-top: .2rem; }
.cb-msg.ai { display: flex; gap: .7rem; align-items: flex-start; max-width: 100%; }
.cb-avatar { width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent)); }
.cb-body { min-width: 0; flex: 1; }
.cb-who-l { font-size: .78rem; font-weight: 700; color: var(--ink); margin-bottom: .2rem; } .cb-who-l span { font-weight: 400; color: var(--ink-3); margin-left: .35rem; }
.cb-msg.ai .cb-bubble { font-size: .93rem; line-height: 1.6; color: var(--ink); }
.cb-msg.ai .cb-bubble > :last-child { margin-bottom: 0; }
.cb-msg.ai .cb-bubble table { font-size: .85rem; }
.cb-copy { border: 0; background: none; color: var(--ink-3); font-size: .75rem; padding: .2rem .4rem; margin: .25rem 0 0 -.4rem; border-radius: 6px; opacity: 0; }
.cb-msg.ai:hover .cb-copy, .cb-copy:focus-visible { opacity: 1; } .cb-copy:hover { background: var(--brand-soft); color: var(--brand-700); }
.cb-msg.wait .cb-bubble { color: var(--ink-3); display: inline-flex; gap: .6rem; align-items: center; }
.cb-dots { display: inline-flex; gap: 3px; } .cb-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); animation: cb-dot 1s infinite ease-in-out; }
.cb-dots i:nth-child(2) { animation-delay: .15s; } .cb-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes cb-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.cb-empty { max-width: 760px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem 0; }
.cb-hero { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; color: #fff; margin-bottom: .9rem;
  background: linear-gradient(135deg, var(--brand), var(--accent)); box-shadow: 0 8px 24px rgba(192, 38, 126, .18); }
.cb-empty h2 { font-size: 1.35rem; font-weight: 700; margin: 0 0 .25rem; color: var(--ink); }
.cb-empty p { color: var(--ink-3); margin: 0 0 1.4rem; }
.cb-ideas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; width: 100%; }
.cb-idea { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: .75rem .9rem; display: grid;
  grid-template-columns: auto 1fr; column-gap: .6rem; row-gap: .15rem; transition: border-color .15s, box-shadow .15s, transform .15s; }
.cb-idea i { grid-row: span 2; color: var(--brand); font-size: 1.05rem; margin-top: .05rem; }
.cb-idea b { font-size: .86rem; color: var(--ink); } .cb-idea span { font-size: .8rem; color: var(--ink-3); line-height: 1.35; }
.cb-idea:hover { border-color: var(--brand-glow); box-shadow: 0 4px 14px rgba(59, 130, 246, .12); transform: translateY(-1px); }
.cb-foot { padding: .5rem 1rem .75rem; background: #fff; }
.cb-composer { max-width: 860px; margin: 0 auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: .55rem .6rem .45rem .9rem;
  box-shadow: 0 2px 10px rgba(15, 35, 80, .06); transition: border-color .15s, box-shadow .15s; }
.cb-composer:focus-within { border-color: var(--brand-glow); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.cb-composer textarea { width: 100%; border: 0 !important; outline: 0; resize: none; background: transparent !important; padding: .25rem 0 !important; font-size: .95rem;
  line-height: 1.5; max-height: 200px; box-shadow: none !important; min-height: 0; }
.cb-tools { display: flex; align-items: center; gap: .6rem; margin-top: .3rem; }
.cb-who { width: 230px; } .cb-who .combo-input, .cb-who select { font-size: .82rem; padding-top: .3rem; padding-bottom: .3rem; border-radius: 999px; background-color: var(--paper); }
.cb-hint { font-size: .72rem; color: var(--ink-3); margin-left: auto; }
.cb-send { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.05rem; flex-shrink: 0; }
.cb-send:hover { background: var(--brand-600); } .cb-send:disabled { background: #B9CCEF; }
.cb-note { max-width: 860px; margin: .45rem auto 0; font-size: .72rem; color: var(--ink-3); text-align: center; }
.cb-scrim { display: none; }
@media (max-width: 991.98px) {
  .cb, .cb.side-closed { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 100px); }
  .cb-side { position: absolute; inset: 0 auto 0 0; width: min(300px, 85%); z-index: 5; box-shadow: 8px 0 24px rgba(15, 35, 80, .15); }
  .cb:not(.side-closed) .cb-scrim { display: block; position: absolute; inset: 0; background: rgba(15, 35, 80, .25); z-index: 4; }
  .cb-head #expand, .cb-head #new2 { display: inline-flex; }
  .cb-sub, .cb-hint { display: none; }
  .cb-ideas { grid-template-columns: 1fr; }
  .cb-msg.user { max-width: 92%; }
  .cb-who { width: auto; flex: 1; }
  .cb-plant select { min-width: 0; max-width: 120px; }
}


/* AI report: Entry IDs shown in the table */
.ent-list { display: flex; flex-wrap: wrap; gap: .25rem; max-width: 320px; align-items: center; }
.ent { font-size: .74rem; font-weight: 600; padding: .1rem .45rem; border-radius: 6px; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line); background: #fff; color: var(--brand-700); }
.ent.overdue { background: var(--accent-soft); border-color: #F5B8D8; color: var(--accent-600, #9D174D); }
.ent.late { background: #FFF8EC; border-color: #FCD9A8; color: #B45309; }
.ent:hover { filter: brightness(.96); text-decoration: underline; }
.ent-more { font-size: .74rem; color: var(--ink-3); }

/* ---------------------------------------------------------------- NBD Report (Report > NBDReport)
   The NBD review sheet in pastel: teal headers and striped rows, green = high priority, salmon = priority. */
.nbd-review { --nt: #1F5866; --nt-h: #CFE6EC; --nt-r: #E6F2F5; --nt-line: #C3DEE5;
  --ng: #D7EDCB; --ng-ink: #3E6B2D; --ns: #FADCCB; --ns-ink: #A4472A; --nr: #F9D7DC; --nr-ink: #A12F48; --ny: #FFF0C2; --ny-ink: #8A6400; --nb: #DCEAF9; }
.nbd-top { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: .9rem; }
.nbd-dd { display: flex; gap: .5rem; background: var(--nt-h); padding: .45rem; border-radius: 10px; flex-wrap: wrap; }
.nbd-dd select { width: auto; flex: 1 1 190px; min-width: 170px; border-radius: 999px; border: 1px solid var(--nt-line); background-color: #fff; color: var(--nt);
  font-weight: 700; text-align: center; padding: .38rem 2rem .38rem 1rem; }
.nbd-tools { display: flex; gap: .5rem; align-items: center; margin-left: auto; }
.nbd-tools .search-box { min-width: 220px; }
.nbd-body { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 1rem; align-items: start; }
.nbd-sheet { overflow: auto; max-height: calc(100vh - 165px); border: 1px solid var(--nt-line); border-radius: 10px; background: #fff; }
.nbd-review table.nbd-grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .76rem; line-height: 1.3; }
.nbd-review table.nbd-grid th, .nbd-review table.nbd-grid td { font-size: .76rem; }
.nbd-review table.nbd-grid thead th { position: sticky; top: 0; z-index: 2; background: var(--nt-h); color: var(--nt); font-weight: 750; text-align: center;
  padding: .4rem .4rem; border-bottom: 1px solid var(--nt-line); border-right: 1px solid #DCEBEF; white-space: nowrap; line-height: 1.2;
  text-transform: none; letter-spacing: 0; font-size: .76rem; }
.nbd-review table.nbd-grid thead tr:nth-child(2) th { top: 2.65rem; background: #DDEEF2; font-size: .72rem; }
.nbd-review table.nbd-grid thead th.nbd-st { white-space: normal; min-width: 104px; height: 2.65rem; }
.nbd-review table.nbd-grid thead th.nbd-fu-h { min-width: 74px; }
.nbd-review table.nbd-grid td { padding: .32rem .4rem; border-bottom: 1px solid #E5EFF2; color: var(--ink); white-space: nowrap; vertical-align: middle; }
.nbd-review table.nbd-grid tbody tr:nth-child(odd) td { background: var(--nt-r); }
.nbd-review table.nbd-grid tbody tr:hover td { background: #D6EBF0; }
.nbd-review td.nbd-date { text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }
.nbd-review td.nbd-name { font-weight: 650; white-space: normal !important; min-width: 170px; max-width: 240px; }
.nbd-review table.nbd-grid td:nth-child(3), .nbd-review table.nbd-grid td:nth-child(4) { text-align: center; white-space: normal; max-width: 96px; }
.nbd-review td.nbd-fu { text-align: center; border-left: 1px solid var(--nt-line); }
.nbd-review td.nbd-fu-h { border-left: 1px solid var(--nt-line); }
.nbd-review table.nbd-grid td.nbd-d { text-align: center; font-variant-numeric: tabular-nums; min-width: 56px; padding: .32rem .25rem; font-size: .73rem; }
.nbd-review td.nbd-none { text-align: center; color: var(--ink-3); padding: 1.5rem !important; }
.nbd-ratio-box { position: sticky; top: .75rem; }
.nbd-ratio-head { background: var(--nt-h); color: var(--nt); font-weight: 750; text-align: center; padding: .5rem; border-radius: 8px; margin-bottom: .8rem; }
.nbd-cr { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .8rem; }
.nbd-cr-name, .nbd-cr-val { display: grid; place-items: center; text-align: center; border-radius: 6px; min-height: 52px; padding: .35rem; line-height: 1.2; }
.nbd-cr-name { background: var(--ng); color: var(--ng-ink); font-weight: 650; font-size: .78rem; border: 1px solid #B8DCA6; }
.nbd-cr-val { background: var(--ns); color: var(--ns-ink); font-weight: 800; font-size: 1.05rem; border: 1px solid #F0B79D; font-variant-numeric: tabular-nums; }
.nbd-cr-val small { display: block; font-size: .66rem; font-weight: 600; opacity: .75; }
@media (max-width: 1800px) { .nbd-body { grid-template-columns: 1fr; } .nbd-ratio-box { position: static; order: -1; }
  #ratios { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 .8rem; } .nbd-sheet { max-height: none; } }
@media (max-width: 640px) { .nbd-dd { width: 100%; } .nbd-dd select { flex: 1 1 100%; } .nbd-tools { width: 100%; margin: 0; } .nbd-tools .search-box { flex: 1; min-width: 0; } }

/* NBD review: readable stage blocks */
.nbd-help { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; font-size: .76rem; color: var(--ink-2);
  background: #fff; border: 1px solid var(--nt-line); border-radius: 8px; padding: .45rem .7rem; margin-bottom: .7rem; }
.nbd-help-t { font-weight: 750; color: var(--nt); }
.nbd-help .nbd-a { min-width: 0; padding: .1rem .45rem; flex-direction: row; gap: .3rem; align-items: baseline; }
.nbd-none-key { color: var(--ink-3); }
.nbd-a { display: inline-flex; flex-direction: column; align-items: center; min-width: 86px; padding: .18rem .4rem; border-radius: 6px; line-height: 1.15; }
.nbd-a b { font-weight: 750; font-size: .76rem; font-variant-numeric: tabular-nums; }
.nbd-a small { font-size: .64rem; font-weight: 600; opacity: .85; }
.nbd-a.ok { background: var(--ng); color: var(--ng-ink); }
.nbd-a.late { background: var(--ns); color: var(--ns-ink); }
.nbd-a.over { background: var(--nr); color: var(--nr-ink); }
.nbd-a.due { background: var(--nb, #DCEAF9); color: #2D5C8E; }
.nbd-a.off { background: #ECEFF3; color: #7A8699; }
.nbd-tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; white-space: nowrap; }
.nbd-tag.high { background: var(--ng); color: var(--ng-ink); } .nbd-tag.priority { background: var(--ns); color: var(--ns-ink); }
.nbd-tag.none { background: #EEF1F4; color: #8A95A6; font-weight: 600; }
.nbd-ratio-head small { display: block; font-size: .68rem; font-weight: 600; opacity: .75; }
/* stage blocks: own border and alternate shade, no row stripes inside them */
.nbd-review table.nbd-grid tbody tr:nth-child(odd) td { background: #fff; }
.nbd-review table.nbd-grid tbody tr td { background: #fff; }
.nbd-review table.nbd-grid tbody tr:nth-child(even) td:not(.nbd-d) { background: #F5FAFB; }
.nbd-review table.nbd-grid td.nbd-d.g0, .nbd-review table.nbd-grid th.g0 { background: #F2F8FA; }
.nbd-review table.nbd-grid td.nbd-d.g1, .nbd-review table.nbd-grid th.g1 { background: #FFFFFF; }
.nbd-review table.nbd-grid thead th.g0 { background: #CFE6EC; } .nbd-review table.nbd-grid thead th.g1 { background: #E3F0F3; }
.nbd-review table.nbd-grid .first { border-left: 2px solid #A9CED8 !important; }
.nbd-review table.nbd-grid td.nbd-d { padding: .3rem .35rem; font-size: .75rem; color: var(--ink-2); min-width: 80px; }
.nbd-review table.nbd-grid td.nbd-d.none { color: #C0C8D2; }
.nbd-review table.nbd-grid tbody tr:hover td { background: #E4F1F4 !important; }
.nbd-review table.nbd-grid td.nbd-fu { border-left: 2px solid #A9CED8; }
.nbd-review table.nbd-grid td.nbd-date, .nbd-review table.nbd-grid thead tr:first-child th:first-child { position: sticky; left: 0; width: 88px; min-width: 88px; z-index: 1; }
.nbd-review table.nbd-grid td.nbd-name, .nbd-review table.nbd-grid thead tr:first-child th:nth-child(2) { position: sticky; left: 88px; z-index: 1; box-shadow: 2px 0 0 #A9CED8; }
.nbd-review table.nbd-grid thead tr:first-child th:first-child, .nbd-review table.nbd-grid thead tr:first-child th:nth-child(2) { z-index: 3; }

/* ---------------------------------------------------------------- KRA Scorecard (same template as the MIS Report) */
.kra-st { display: inline-block; font-size: .68rem; font-weight: 700; padding: .08rem .5rem; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.kra-st.none { background: #EEF1F4; color: #8A95A6; } .kra-st.draft { background: #E8EEF9; color: #3B5B9A; }
.kra-st.sub { background: #FEF3C7; color: #92400E; } .kra-st.ret { background: var(--late-soft); color: var(--late); }
.kra-st.ok { background: var(--ok-soft); color: var(--ok); }
.kra-row { cursor: pointer; }
.kra-year-wrap { max-height: 330px; overflow: auto; }
.kra-live { font-size: .85rem; color: var(--ink-2); } .kra-live b { font-size: 1.05rem; margin-left: .25rem; }
.kra-month .kra-name { min-width: 200px; max-width: 280px; text-align: left; }
.kra-month .kra-target { max-width: 220px; font-size: .78rem; color: var(--ink-2); text-align: left; }
.kra-month .kra-actual { min-width: 220px; text-align: left; }
.kra-num { width: 96px; margin: 0 auto; text-align: right; }
.kra-edit td { min-width: 100px; vertical-align: top; } .kra-edit td:nth-child(2) { min-width: 190px; } .kra-edit td:first-child { min-width: 0; }
.kra-md { display: inline-block; font-size: .66rem; font-weight: 700; background: #EDE7F8; color: #5B3F99; padding: .05rem .4rem; border-radius: 999px; margin-top: .2rem; }
.kra-rate { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 6px; font-weight: 800; background: #EEF1F4; }
.kra-rate.r5 { background: #CDEFD9; color: #17643A; } .kra-rate.r4 { background: var(--ok-soft); color: var(--ok); }
.kra-rate.r3 { background: #FEF3C7; color: #92400E; } .kra-rate.r2 { background: #FDE2CF; color: #9A3412; } .kra-rate.r1 { background: var(--late-soft); color: var(--late); }
.kra-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; align-items: center; margin-top: .75rem; }
.kra-actions #remarks { flex: 1 1 260px; max-width: 420px; }
.kra-note { font-size: .84rem; padding: .45rem .7rem; border-radius: 8px; margin-bottom: .6rem; }
.kra-note.ret { background: var(--late-soft); color: var(--late); } .kra-note.ok { background: var(--ok-soft); color: var(--ok); }
.kra-pending { background: #FFFBEB; border-color: #FCD9A8; display: flex; flex-wrap: wrap; gap: .4rem .7rem; align-items: center; font-size: .86rem; color: #78350F; margin-bottom: 1rem; }
.kra-pend { background: #fff; border-radius: 999px; padding: .15rem .7rem; color: #78350F; font-weight: 600; border: 1px solid #FCD9A8; }
.kra-pend:hover { background: #FEF3C7; }
#cards .mis-card { cursor: default; }

/* MIS Report: Performance Score for the financial year (FMS + Delegation + KRA) */
.mis-perf-wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 1rem; align-items: stretch; }
.mis-perf-year { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .3rem; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(180deg, #F4F8FF, #fff); padding: 1rem; }
.mis-perf-year > span { font-size: .8rem; font-weight: 700; color: var(--brand-700); text-transform: uppercase; letter-spacing: .03em; }
.mis-perf-year small { color: var(--ink-3); font-size: .74rem; }
.mis-perf { font-weight: 800; font-variant-numeric: tabular-nums; }
.mis-perf.big { font-size: 2.1rem; line-height: 1.1; }
.mis-perf.good { color: #1E8449; } .mis-perf.mid { color: #B9770E; } .mis-perf.low { color: #C0392B; }
.mis-fy { font-size: .78rem; font-weight: 600; color: var(--ink-3); text-transform: none; letter-spacing: 0; margin-left: .3rem; }
@media (max-width: 768px) { .mis-perf-wrap { grid-template-columns: 1fr; } }
/* KRA Scorecard tabs, in the MIS Report style */
.mis-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 -1px; padding: 0 .25rem; position: relative; z-index: 1; }
.mis-tab { border: 1px solid var(--line); border-bottom: 0; background: #F4F7FC; color: var(--ink-2); font-weight: 650; font-size: .86rem;
  padding: .55rem 1rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0; display: inline-flex; gap: .4rem; align-items: center; }
.mis-tab:hover { color: var(--brand); background: #EEF4FF; }
.mis-tab.active { background: #fff; color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.mis-tabpane { border-top-left-radius: 0; }
.mis-table.kra-month td, .mis-table.kra-edit td { white-space: normal; }
.mis-table.kra-month .kra-name .small { display: block; overflow-wrap: anywhere; }

/* KRA edit table: every box on one level, same height */
.mis-table.kra-edit td { vertical-align: top; padding-top: .55rem; padding-bottom: .55rem; }
.mis-table.kra-edit td:first-child { padding-top: .95rem; text-align: center; }
.mis-table.kra-edit .form-control, .mis-table.kra-edit .kra-num { height: 31px; min-height: 31px; font-size: .82rem; padding: .3rem .55rem; line-height: 1.3; }
.mis-table.kra-edit textarea.kra-grow { resize: none; overflow: hidden; height: 31px; white-space: pre; text-overflow: ellipsis; padding-top: .36rem; padding-bottom: .2rem; }
.mis-table.kra-edit textarea.kra-grow.open { white-space: pre-wrap; position: relative; z-index: 4; box-shadow: 0 8px 24px -10px rgba(11, 30, 74, .35); }
.mis-table.kra-edit .kra-num { width: 100%; min-width: 70px; text-align: right; }
.mis-table.kra-edit .form-check-input { width: 1.15rem; height: 1.15rem; margin: .45rem auto 0; display: block; }
.mis-table.kra-edit [data-del] { height: 31px; width: 31px; padding: 0; display: grid; place-items: center; }
.mis-table.kra-edit td:nth-child(9), .mis-table.kra-edit th:nth-child(9) { text-align: center; }
.mis-table.kra-edit td:nth-child(3) { min-width: 90px; width: 90px; }

/* KRA Scorecard > Rating scale (worked out from each KRA target) */
.kra-scale td, .kra-scale th { text-align: center; white-space: normal; vertical-align: middle; }
.kra-scale td.kra-name, .kra-scale td.kra-target { text-align: left; }
.kra-scale .pf-th { font-size: .68rem; font-weight: 600; margin-top: .15rem; }
.kra-scale td.sc-r5 { background: #E3F6EA !important; } .kra-scale td.sc-r4 { background: #EEF9F1 !important; }
.kra-scale td.sc-r3 { background: #FFF8E1 !important; } .kra-scale td.sc-r2 { background: #FFF0E3 !important; } .kra-scale td.sc-r1 { background: #FDECEC !important; }

/* Monthly scorecard: every box on one level, same height (like the Measurement Annexure) */
.mis-table.kra-month td { vertical-align: top; padding-top: .55rem; padding-bottom: .55rem; }
.mis-table.kra-month td:first-child { padding-top: .95rem; text-align: center; }
.mis-table.kra-month td:nth-child(3), .mis-table.kra-month td:nth-child(4), .mis-table.kra-month td:nth-child(9) { padding-top: .95rem; }
.mis-table.kra-month td:nth-child(3), .mis-table.kra-month th:nth-child(3) { text-align: center; }
.mis-table.kra-month .form-control, .mis-table.kra-month .form-select { height: 31px; min-height: 31px; font-size: .82rem; padding-top: .3rem; padding-bottom: .3rem; line-height: 1.3; }
.mis-table.kra-month .kra-num { width: 104px; margin: 0; text-align: right; }
.mis-table.kra-month textarea.kra-grow { resize: none; overflow: hidden; height: 31px; white-space: pre; padding-top: .36rem; padding-bottom: .2rem; min-width: 240px; }
.mis-table.kra-month textarea.kra-grow.open { white-space: pre-wrap; position: relative; z-index: 4; box-shadow: 0 8px 24px -10px rgba(11, 30, 74, .35); }
.mis-table.kra-month .kra-1line { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: .4rem; }
.mis-table.kra-month .kra-name { padding-top: .6rem; }
.mis-table.kra-month .kra-name .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.mis-table.kra-month td .kra-rate { margin-top: .1rem; }
/* Monthly scorecard: fit all 9 columns on a laptop screen */
.mis-table.kra-month { table-layout: auto; }
.mis-table.kra-month th, .mis-table.kra-month td { padding-left: .45rem; padding-right: .45rem; }
.mis-table.kra-month .kra-name { min-width: 170px; max-width: 210px; }
.mis-table.kra-month .kra-name .small { max-width: 200px; }
.mis-table.kra-month td.kra-target { max-width: 150px; min-width: 110px; }
.mis-table.kra-month .kra-1line { max-width: 150px; }
.mis-table.kra-month textarea.kra-grow { min-width: 180px; }
.mis-table.kra-month .kra-num { width: 86px; }
.mis-table.kra-month td:nth-child(6) { padding-top: .95rem; }
.mis-table.kra-month td:nth-child(6):has(input) { padding-top: .55rem; }
.mis-table.kra-month td.kra-target { min-width: 96px; max-width: 140px; } .mis-table.kra-month .kra-1line { max-width: 140px; }
.mis-table.kra-month .form-select.kra-num { padding-left: .45rem; padding-right: 1.45rem; background-position: right .35rem center; font-size: .8rem; text-align: left; }

/* Performance score: plain numbers with a rating chip (no colours on the figures) */
.mis-table.pf-plain td { color: var(--ink); vertical-align: middle; }
.mis-table.pf-plain td .kra-rate { width: 1.45rem; height: 1.45rem; font-size: .75rem; margin-left: .3rem; vertical-align: middle; }
.mis-perf-year .mis-perf.big { color: var(--ink); }
.mis-perf-year div { font-size: .8rem; color: var(--ink-2); display: flex; align-items: center; gap: .35rem; }

/* ---------------------------------------------------------------- NBD Report, exactly like the NBD review Excel */
.nbx { --x-teal: #134F5C; --x-row: #4E8B98; --x-green: #6AA84F; --x-green-2: #93C47D; --x-salmon: #F4B6A0; --x-red: #E3261E; --x-line: #1F1F1F; }
.nbx-top { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-bottom: 1rem; }
.nbx-dd { display: flex; gap: .7rem; background: var(--x-teal); padding: .45rem .7rem; flex-wrap: wrap; }
.nbx-dd select { width: auto; min-width: 180px; border-radius: 999px; border: 0; background-color: #fff; color: #111; font-weight: 800;
  font-size: .95rem; text-align: center; padding: .25rem 2rem .25rem 1rem; height: 32px; }
.nbx-key { display: flex; align-items: stretch; border: 1.5px solid var(--x-line); background: #fff; }
.nbx-key .nbx-sw { width: 120px; height: auto; border-radius: 0; border: 0; }
.nbx-key-t { font-weight: 800; padding: .3rem .9rem; color: #111; font-size: .9rem; }
.nbx-tools { display: flex; gap: .5rem; align-items: center; margin-left: auto; }
.nbx-tools .search-box { min-width: 200px; }
.nbx-sw { display: inline-block; width: 62px; height: 17px; vertical-align: middle; }
.nbx-sw.high { background: var(--x-green); } .nbx-sw.pri { background: var(--x-salmon); } .nbx-sw.none { background: #D9D9D9; }
.nbx-body { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 1rem; align-items: start; }
.nbx-sheet { overflow: auto; max-height: calc(100vh - 170px); border: 1.5px solid var(--x-line); background: #fff; }
.nbx table.nbx-t { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .74rem; line-height: 1.25; }
.nbx table.nbx-t th { position: sticky; top: 0; z-index: 2; background: var(--x-teal); color: #fff; font-weight: 700; text-align: center;
  padding: .35rem .45rem; white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: .76rem; border: 0; }
.nbx table.nbx-t thead tr:nth-child(2) th { top: 2.2rem; }
.nbx table.nbx-t thead tr:first-child th { height: 2.2rem; }
.nbx table.nbx-t th.c-st { white-space: normal; min-width: 120px; }
.nbx table.nbx-t td { padding: .32rem .45rem; border: 0; color: #111; text-align: center; white-space: nowrap; background: #fff; vertical-align: middle; }
.nbx table.nbx-t tr.tl td.l { background: var(--x-row); color: #fff; font-weight: 700; }
.nbx table.nbx-t td.l { font-weight: 600; }
.nbx table.nbx-t td.c-name { text-align: left; white-space: normal; min-width: 190px; max-width: 250px; }
.nbx table.nbx-t td.c-date { font-weight: 700; }
.nbx table.nbx-t .gap, .nbx table.nbx-t th.gap { width: 14px; min-width: 14px; padding: 0; background: #fff !important; border-left: 1.5px solid var(--x-line); }
.nbx table.nbx-t td.c-fu { border-right: 1px solid #DADADA; }
.nbx table.nbx-t td.nbx-d { min-width: 74px; font-variant-numeric: tabular-nums; }
.nbx table.nbx-t tbody tr:hover td { filter: brightness(.96); }
.nbx table.nbx-t td.nbx-none { padding: 1.5rem; color: #666; }
.nbx table.nbx-t td.l.c-date, .nbx table.nbx-t th.c-date { position: sticky; left: 0; z-index: 1; min-width: 86px; }
.nbx table.nbx-t th.c-date { z-index: 3; }
.nbx table.nbx-t td.l.c-name, .nbx table.nbx-t th.c-name { position: sticky; left: 86px; z-index: 1; }
.nbx table.nbx-t th.c-name { z-index: 3; }
.nbx-cr { border: 1.5px solid var(--x-line); background: #fff; padding: 0 0 .5rem; position: sticky; top: .75rem; }
.nbx-cr-head { background: var(--x-teal); color: #fff; font-weight: 700; text-align: center; padding: .45rem; font-size: .85rem; margin-bottom: .9rem; }
.nbx-cr-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: 0 .6rem; margin-bottom: 1rem; }
.nbx-cr-name, .nbx-cr-val { display: grid; place-items: center; text-align: center; min-height: 48px; line-height: 1.2; padding: .25rem; }
.nbx-cr-name { background: var(--x-green-2); color: #fff; font-size: .8rem; font-weight: 600; border: 1.5px solid #6E9F59; }
.nbx-cr-val { background: var(--x-salmon); color: var(--x-red); font-weight: 800; font-size: 1.05rem; border: 1.5px solid #D9826A; font-variant-numeric: tabular-nums; }
@media (max-width: 1500px) { .nbx-body { grid-template-columns: 1fr; } .nbx-cr { position: static; order: -1; }
  #ratios { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); } .nbx-sheet { max-height: none; } }
@media (max-width: 640px) { .nbx-dd { width: 100%; } .nbx-dd select { flex: 1 1 100%; } .nbx-tools { width: 100%; margin: 0; } .nbx-tools .search-box { flex: 1; min-width: 0; } }
/* NBD Report: a real grid (lines round every cell, like Excel) and everything side by side */
.nbx-top { flex-wrap: wrap; }
.nbx-tools { margin-left: auto; max-width: 100%; }
.nbx-tools .search-box { min-width: 0; width: 220px; }
.nbx-body { grid-template-columns: minmax(0, 1fr) 190px; gap: .75rem; }
@media (max-width: 1500px) { .nbx-body { grid-template-columns: minmax(0, 1fr) 190px; } .nbx-cr { position: sticky; order: 0; } #ratios { display: block; } .nbx-sheet { max-height: calc(100vh - 170px); } }
@media (max-width: 768px) { .nbx-body { grid-template-columns: 1fr; } .nbx-cr { position: static; order: -1; } }
.nbx table.nbx-t { border-collapse: collapse; font-size: .72rem; }
.nbx table.nbx-t th { border: 1px solid #0E3B45; padding: .3rem .35rem; font-size: .72rem; }
.nbx table.nbx-t td { border: 1px solid #BFBFBF; padding: .28rem .35rem; }
.nbx table.nbx-t tr.tl td.l { border-color: #3F7682; }
.nbx table.nbx-t td.c-name { min-width: 150px; max-width: 200px; }
.nbx table.nbx-t td.nbx-d { min-width: 0; }
.nbx table.nbx-t th.c-st { min-width: 0; white-space: normal; }
.nbx table.nbx-t .gap, .nbx table.nbx-t th.gap { width: 8px; min-width: 8px; border-top: 0; border-bottom: 0; border-left: 1.5px solid var(--x-line); border-right: 1.5px solid var(--x-line); }
.nbx table.nbx-t td.l.c-date, .nbx table.nbx-t th.c-date { min-width: 78px; }
.nbx table.nbx-t td.l.c-name, .nbx table.nbx-t th.c-name { left: 78px; }
.nbx-sw { width: 46px; height: 15px; }
.nbx-cr-row { padding: 0 .5rem; gap: .4rem; margin-bottom: .8rem; }
.nbx-cr-name { font-size: .74rem; min-height: 44px; } .nbx-cr-val { font-size: .95rem; min-height: 44px; }
.nbx table.nbx-t td.nbx-d { padding: .28rem .3rem; }
.nbx table.nbx-t td.l:nth-child(3), .nbx table.nbx-t td.l:nth-child(4) { white-space: normal; max-width: 86px; }
.nbx table.nbx-t td.c-name { min-width: 140px; max-width: 190px; }
.nbx-cr-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.nbx-cr-val { font-size: .86rem; padding: .25rem .1rem; }
.nbx-cr-name { font-size: .7rem; padding: .25rem .15rem; }
/* NBD stage cells: done = green, not done = red (Excel's good / bad highlight) */
.nbx table.nbx-t td.nbx-d.ok { background: #C6EFCE; color: #006100; font-weight: 600; }
.nbx table.nbx-t td.nbx-d.no { background: #FFC7CE; color: #9C0006; font-weight: 600; }
/* NBD Conversion Ratio: boxes always inside the panel */
.nbx-body { grid-template-columns: minmax(0, 1fr) 210px; }
@media (max-width: 1500px) { .nbx-body { grid-template-columns: minmax(0, 1fr) 210px; } }
@media (max-width: 768px) { .nbx-body { grid-template-columns: 1fr; } }
.nbx-cr { box-sizing: border-box; overflow: hidden; min-width: 0; }
.nbx-cr-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0 .55rem; gap: .45rem; }
.nbx-cr-name, .nbx-cr-val { box-sizing: border-box; min-width: 0; overflow: hidden; }
.nbx-cr-val { font-size: clamp(.72rem, .95vw, .9rem); white-space: nowrap; padding: .25rem .15rem; }
.nbx-cr-name { font-size: .7rem; overflow-wrap: anywhere; }
/* Doer card (MIS Report, KRA Scorecard): every label and value on ONE line */
.mis-top { grid-template-columns: minmax(310px, 360px) minmax(0, 1fr); }
.doer-card { min-width: 0; }
.doer-photo { width: 60px; height: 60px; font-size: 1.3rem; }
.doer-card dl { grid-template-columns: max-content minmax(0, 1fr); gap: .25rem .75rem; min-width: 0; flex: 1 1 auto; }
.doer-card dt, .doer-card dd { white-space: nowrap; line-height: 1.45; }
.doer-card dd { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 991.98px) { .mis-top { grid-template-columns: 1fr; } }
/* NBD Report: clearer - labelled filters, summary, one key, a strong line between stages */
.nbx-dd { align-items: flex-end; padding: .4rem .7rem .55rem; }
.nbx-f { display: flex; flex-direction: column; gap: .15rem; margin: 0; }
.nbx-f > span { color: #CFE7EC; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding-left: .6rem; }
.nbx-info { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin: -.25rem 0 .7rem; }
.nbx-sum { display: flex; flex-wrap: wrap; gap: .4rem; }
.nbx-s { font-size: .8rem; padding: .2rem .65rem; border: 1px solid #C9D5DA; background: #fff; color: #333; }
.nbx-s b { font-size: .92rem; color: #111; }
.nbx-s.high { border-left: 5px solid var(--x-green); } .nbx-s.pri { border-left: 5px solid var(--x-salmon); } .nbx-s.ok { border-left: 5px solid #63BE7B; }
.nbx .nbx-key { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; border: 1px solid #C9D5DA; background: #fff; padding: .3rem .7rem; font-size: .76rem; }
.nbx-key-h { font-weight: 800; color: var(--x-teal); text-transform: uppercase; font-size: .68rem; letter-spacing: .04em; }
.nbx-key-h:not(:first-child) { margin-left: .4rem; padding-left: .8rem; border-left: 1px solid #D5DDE0; }
.nbx-k { display: inline-flex; align-items: center; gap: .3rem; color: #222; }
.nbx-k .nbx-sw { width: 26px; height: 12px; }
.nbx-c { display: inline-block; width: 26px; height: 12px; border: 1px solid #BFBFBF; background: #fff; }
.nbx-c.ok { background: #C6EFCE; border-color: #8CC79A; } .nbx-c.no { background: #FFC7CE; border-color: #E79AA6; }
.nbx table.nbx-t td.st0, .nbx table.nbx-t th.st0 { border-left: 2.5px solid #134F5C; }
.nbx table.nbx-t thead th.st0 { border-left-color: #5E98A4; }
.nbx-cr-head small { display: block; font-size: .66rem; font-weight: 500; opacity: .85; }
.nbx-cr-val { flex-direction: column; } .nbx-cr-val small { display: block; font-size: .62rem; font-weight: 600; color: #8A3B2C; margin-top: .1rem; }
/* MIS Report: Sales Performance Score */
.sp-sub { font-size: .95rem; font-weight: 700; margin: 1rem 0 .5rem; color: var(--bs-emphasis-color); }
.sp-table td:nth-child(2) { white-space: nowrap; }
.sp-rate { display: inline-block; min-width: 1.6rem; text-align: center; font-weight: 800; border-radius: 4px; padding: 0 .35rem; color: #fff; background: #6c757d; }
.sp-rate.r5, .sp-rate.r4 { background: #2e7d32; } .sp-rate.r3 { background: #b7791f; } .sp-rate.r2, .sp-rate.r1 { background: #c0392b; }
.sp-tools { display: inline-flex; gap: .4rem; } .sp-tools .btn { white-space: nowrap; }
/* Dropdown rows with a code and a location (customer, vendor ...): name left, details right */
.combo-list li.co-2 { display: flex; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; flex-wrap: wrap; }
.combo-list li.co-2 .co-t { font-weight: 600; color: var(--bs-emphasis-color); min-width: 0; }
.combo-list li.co-2 .co-s { display: inline-flex; gap: .35rem; flex-wrap: wrap; font-size: .78rem; color: var(--bs-secondary-color); margin-left: auto; }
.combo-list li.co-2 .co-s span:first-child { font-variant-numeric: tabular-nums; background: rgba(29, 78, 216, .08); color: #1D4ED8; border-radius: 4px; padding: 0 .4rem; font-weight: 600; }
.combo-list li.co-2 .co-s span + span::before { content: "\00b7"; margin-right: .35rem; color: var(--bs-secondary-color); }
.combo-list li.co-2.chosen .co-t { color: #1D4ED8; }
.auto-note { color: #1D4ED8; }
/* Payment Outstanding report: totals line */
.po-sum { display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0 .75rem; }
.po-sum span { border: 1px solid var(--bs-border-color); border-radius: 8px; padding: .3rem .7rem; font-size: .85rem; background: var(--bs-body-bg); }
.po-sum span.neg b { color: #c0392b; }
/* MIS Report: BUDGET / PERFORMANCE / DELEGATION / APPRAISAL buttons - the chosen one opens below */
.mis-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 1rem 0; }
.mis-tabs .btn { background: #fff; border: 1px solid #1D4ED8; color: #1D4ED8; font-weight: 700; letter-spacing: .02em; border-radius: 999px; padding: .4rem 1.1rem; }
.mis-tabs .btn:hover { background: rgba(29, 78, 216, .08); }
.mis-tabs .btn.active { background: #1D4ED8; color: #fff; box-shadow: 0 4px 12px rgba(29, 78, 216, .25); }
#mis-pane:empty { display: none; }
/* View only (custom access = Read): a note on top, and the buttons that change things are hidden.
   The server refuses changes anyway; this only keeps the page honest. */
.view-only-note { display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; padding: .55rem .9rem; border-radius: 10px;
  background: #FFF7E6; border: 1px solid #F3D9A4; color: #7A4B00; font-size: .88rem; font-weight: 600; }
body.view-only #main .page-head .btn-primary, body.view-only #main .page-head .btn-outline-danger,
body.view-only #main .actions .btn-primary, body.view-only #main .actions .btn-danger, body.view-only #main .actions .btn-outline-danger,
body.view-only #main [data-del], body.view-only #main [data-write] { display: none !important; }
/* User Management: custom access picks */
.acc-wrap { border: 1px solid var(--bs-border-color); border-radius: 12px; padding: .9rem 1rem; margin: .5rem 0 1rem; }
.acc-tools { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .6rem; }
.acc-tools .search-box { min-width: 220px; flex: 1 1 220px; }
.acc-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.acc-table th { position: sticky; top: 0; background: var(--bs-tertiary-bg); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--bs-secondary-color); padding: .45rem .6rem; text-align: left; z-index: 1; }
.acc-table td { padding: .35rem .6rem; border-top: 1px solid var(--bs-border-color); vertical-align: middle; }
.acc-table tr.acc-grp td { background: var(--bs-tertiary-bg); font-weight: 700; font-size: .78rem; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .03em; }
.acc-table tr.acc-all td { background: rgba(29, 78, 216, .05); }
.acc-scroll { max-height: 360px; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: 8px; }
.acc-seg { display: inline-flex; border: 1px solid var(--bs-border-color); border-radius: 999px; overflow: hidden; white-space: nowrap; }
.acc-seg label { margin: 0; padding: .18rem .7rem; cursor: pointer; font-size: .8rem; font-weight: 600; color: var(--bs-secondary-color); user-select: none; }
.acc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.acc-seg label:has(input:checked)[data-m="none"] { background: #EEF0F3; color: #333; }
.acc-seg label:has(input:checked)[data-m="read"] { background: #E0ECFF; color: #1D4ED8; }
.acc-seg label:has(input:checked)[data-m="write"] { background: #DCFCE7; color: #166534; }
.acc-seg label:has(input:focus-visible) { outline: 2px solid #1D4ED8; outline-offset: -2px; }
.acc-sum { font-size: .8rem; color: var(--bs-secondary-color); }
.acc-tabs { display: flex; gap: .3rem; margin-bottom: .6rem; }
.acc-tabs .btn.active { background: #1D4ED8; color: #fff; border-color: #1D4ED8; }
.sp-total td { background: rgba(29, 78, 216, .05); }

/* Report > PMS Data (machine-sheet layout, a pastel colour per column group as in the sheets) */
.pms-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin-bottom: .85rem; }
.pms-f { display: flex; flex-direction: column; gap: .25rem; font-size: .78rem; font-weight: 600; color: var(--ink-2); margin: 0; min-width: 170px; }
.pms-f > select, .pms-f > input { height: 36px; border: 1px solid #D5DEE8; border-radius: 8px; padding: 0 .6rem; font-size: .86rem; background: #fff; }
.pms-wrap { max-height: 70vh; overflow: auto; border-radius: 12px; border: 1px solid #E3E9F2; }
.pms-table { font-size: .8rem; }
.pms-table td { white-space: nowrap; background: #fff; }
.pms-table tbody tr:nth-child(even) td { background: #FAFBFE; }
.pms-table thead th { position: sticky; z-index: 3; color: #1E2A4A; background: #EEF2F8; border-left: 1px solid #fff; font-weight: 700; }
.pms-table thead tr:first-child th { top: 0; height: 30px; padding: .3rem .6rem; text-align: center; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; }
.pms-table thead tr:first-child th.blank { background: #F6F8FC; }
.pms-table thead tr:nth-child(2) th { top: 30px; }
.pms-table .pms-stick { position: sticky; left: 0; z-index: 2; min-width: 120px; box-shadow: 2px 0 0 #E3E9F2; font-weight: 700; }
.pms-table thead .pms-stick { z-index: 4; }
/* group colours: header strong pastel, column body faint tint */
.pms-table th.g-ppc { background: #DDF3D3; } .pms-table td.g-ppc { background: #F3FBEF !important; }
.pms-table th.g-bd { background: #FAD7DD; } .pms-table td.g-bd { background: #FEF4F6 !important; }
.pms-table th.g-shot { background: #E2DCF7; } .pms-table td.g-shot { background: #F7F5FE !important; }
.pms-table th.g-cav { background: #D3F0EA; } .pms-table td.g-cav { background: #F1FBF8 !important; }
.pms-table th.g-prod { background: #D6E6FB; } .pms-table td.g-prod { background: #F2F7FE !important; }
.pms-table th.g-ok { background: #CDEFD9; } .pms-table td.g-ok { background: #F0FAF4 !important; }
.pms-table th.g-hold { background: #FBE8C6; } .pms-table td.g-hold { background: #FEF9EE !important; }
.pms-table th.g-rej { background: #F9D3C9; } .pms-table td.g-rej { background: #FEF3F0 !important; }
.pms-table th.g-lump { background: #EADCCB; } .pms-table td.g-lump { background: #FBF7F2 !important; }
.pms-table th.g-grind { background: #CDE9F2; } .pms-table td.g-grind { background: #F0F8FB !important; }
.pms-table th.g-oee { background: #E9D5F5; } .pms-table td.g-oee { background: #FAF4FD !important; font-weight: 600; }
.pms-wait { font-size: .68rem; font-weight: 700; color: #B45309; background: #FEF3C7; border-radius: 999px; padding: .1rem .45rem; }

/* Report > PC Dashboard */
.pcd { --pcd-ok: #16A34A; --pcd-late: #F59E0B; --pcd-open: #93C5FD; --pcd-over: #E11D48; }
.pcd-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.pcd-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pcd-head h1 { margin: .15rem 0 .25rem; font-size: 1.55rem; font-weight: 800; color: var(--ink); }
.pcd-sub { margin: 0; color: var(--ink-2); max-width: 640px; font-size: .9rem; }
.pcd-filters { display: flex; gap: .65rem; flex-wrap: wrap; align-items: flex-end; }
.pcd-f { display: flex; flex-direction: column; gap: .25rem; margin: 0; font-size: .74rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.pcd-f select, .pcd-f input { min-width: 170px; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 .7rem; background: #fff;
  font-size: .88rem; font-weight: 500; color: var(--ink); text-transform: none; letter-spacing: 0; box-shadow: 0 1px 2px rgba(15,27,61,.04); }
.pcd-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1.1rem; }
@media (max-width: 1280px) { .pcd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pcd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pcd-kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .2rem;
  box-shadow: 0 1px 3px rgba(15,27,61,.05); position: relative; overflow: hidden; }
.pcd-kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--brand); }
.pcd-kpi.bad::before { background: var(--pcd-over); }
.pcd-kpi-top { display: flex; justify-content: space-between; align-items: center; font-size: .76rem; font-weight: 600; color: var(--ink-2); }
.pcd-kpi-top i { color: var(--ink-3); font-size: 1rem; }
.pcd-kpi b { font-size: 1.85rem; line-height: 1.1; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.pcd-kpi.bad b { color: var(--pcd-over); }
.pcd-kpi small { color: var(--ink-3); font-size: .74rem; }
.pcd-kpi-ring { align-items: flex-start; }
.pcd-kpi-ring::before { background: var(--pcd-ok); }
.pcd-ring { width: 56px; height: 56px; }
.pcd-ring .trk { fill: none; stroke: #EEF2F7; stroke-width: 6; }
.pcd-ring .val { fill: none; stroke: var(--brand); stroke-width: 6; stroke-linecap: round; }
.pcd-ring.good .val { stroke: var(--pcd-ok); } .pcd-ring.mid .val { stroke: var(--pcd-late); } .pcd-ring.bad .val { stroke: var(--pcd-over); }
.pcd-ring text { font-size: 15px; font-weight: 800; text-anchor: middle; fill: var(--ink); }
.pcd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; margin-bottom: 1rem; align-items: start; }
@media (max-width: 1100px) { .pcd-grid { grid-template-columns: 1fr; } }
.pcd-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; box-shadow: 0 1px 3px rgba(15,27,61,.05); margin-bottom: 1rem; }
.pcd-grid .pcd-card { margin-bottom: 0; }
.pcd-card-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .8rem; }
.pcd-card-head h2 { margin: 0; font-size: 1rem; font-weight: 800; color: var(--ink); }
.pcd-hint { font-size: .78rem; color: var(--ink-3); }
.pcd-legend { margin-left: auto; display: flex; align-items: center; gap: .35rem .7rem; font-size: .74rem; color: var(--ink-2); flex-wrap: wrap; }
.pcd-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -.3rem; }
.sw.ok, .pcd-bar .ok, .pcd-split .ok { background: var(--pcd-ok); } .sw.late, .pcd-bar .late, .pcd-split .late { background: var(--pcd-late); }
.sw.open, .pcd-bar .open { background: var(--pcd-open); } .sw.over, .pcd-bar .over { background: var(--pcd-over); }
.pcd-search { margin-left: auto; max-width: 260px; }
.pcd-proc { border: 1px solid var(--line-2); border-radius: 12px; margin-bottom: .5rem; transition: box-shadow .15s, border-color .15s; }
.pcd-proc:hover { border-color: var(--line); box-shadow: 0 2px 8px rgba(15,27,61,.06); }
.pcd-proc.open { border-color: #BFD3FB; box-shadow: 0 4px 14px rgba(29,78,216,.08); }
.pcd-proc.idle { opacity: .72; }
.pcd-proc-row { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; align-items: center; gap: .9rem;
  grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 1fr) 62px 70px 58px 64px; padding: .7rem .9rem; }
.pcd-proc-row:focus-visible { outline: 2px solid var(--brand); border-radius: 12px; }
.pcd-proc-name { display: flex; gap: .55rem; align-items: center; min-width: 0; }
.pcd-proc-name > i { color: var(--ink-3); transition: transform .15s; }
.pcd-proc.open .pcd-proc-name > i { transform: rotate(90deg); color: var(--brand-700); }
.pcd-proc-name strong { display: block; font-size: .9rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcd-proc-name small { display: block; font-size: .74rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcd-proc-name > span { min-width: 0; }
.pcd-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #EEF2F7; gap: 2px; }
.pcd-bar i { display: block; height: 100%; }
.pcd-idle { font-size: .76rem; color: var(--ink-3); font-style: italic; }
.pcd-num { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.pcd-num b { font-size: 1rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.pcd-num small { font-size: .68rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.pcd-num.bad b { color: var(--pcd-over); }
.pcd-pill { justify-self: end; font-size: .78rem; font-weight: 800; padding: .25rem .55rem; border-radius: 999px; background: #EEF2F7; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pcd-pill.sm { font-size: .72rem; padding: .15rem .45rem; }
.pcd-pill.good { background: #DCFCE7; color: #166534; } .pcd-pill.mid { background: #FEF3C7; color: #92400E; } .pcd-pill.bad { background: #FFE4E6; color: #9F1239; }
.pcd-steps { border-top: 1px solid var(--line-2); padding: .6rem .9rem .9rem; background: #FAFCFF; border-radius: 0 0 12px 12px; overflow-x: auto; }
.pcd-st, .pcd-dt { width: 100%; border-collapse: collapse; font-size: .84rem; }
.pcd-st th, .pcd-dt th { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; padding: .45rem .6rem;
  border-bottom: 1px solid var(--line); background: transparent !important; text-align: left; }
.pcd-st td, .pcd-dt td { padding: .5rem .6rem; border-bottom: 1px solid var(--line-2); color: var(--ink); vertical-align: middle; background: transparent !important; }
.pcd-st th.n, .pcd-st td.n, .pcd-dt th.n, .pcd-dt td.n { text-align: right; font-variant-numeric: tabular-nums; }
.pcd-st tr.first td { border-top: 1px solid var(--line); }
.pcd-st td.bad, .pcd-dt td.bad { color: var(--pcd-over); font-weight: 800; } .pcd-st td.warn { color: #B45309; font-weight: 700; }
.pcd-st-step { font-weight: 700; min-width: 180px; }
.pcd-stepno { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-700);
  font-size: .72rem; font-weight: 800; margin-right: .45rem; }
.pcd-who { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .55rem; }
.pcd-who.static { cursor: default; }
.pcd-who:hover > span:last-child { color: var(--brand-700); text-decoration: underline; }
.pcd-who small { display: block; font-size: .7rem; color: var(--ink-3); }
.pcd-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, var(--brand-600), var(--accent)); }
.pcd-dt tbody tr { cursor: pointer; } .pcd-dt tbody tr:hover td { background: #F5F8FF !important; }
.pcd-split { display: flex; width: 120px; height: 7px; border-radius: 999px; overflow: hidden; background: #EEF2F7; gap: 2px; margin-bottom: .2rem; }
.pcd-split i { display: block; } .pcd-split .none { flex: 1; background: #EEF2F7; }
.pcd-feed { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow: auto; }
.pcd-feed li { display: flex; gap: .65rem; padding: .6rem 0; border-bottom: 1px solid var(--line-2); }
.pcd-feed li:last-child { border-bottom: 0; }
.pcd-feed a { font-weight: 700; font-size: .82rem; }
.pcd-feed p { margin: .1rem 0; font-size: .8rem; color: var(--ink); }
.pcd-feed small { font-size: .72rem; color: var(--ink-3); }
.pcd-feed b.late { color: #B45309; } .pcd-feed b.ok { color: #15803D; }
.pcd-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: .35rem; }
.pcd-dot.ok { background: var(--pcd-ok); box-shadow: 0 0 0 3px #DCFCE7; } .pcd-dot.late { background: var(--pcd-late); box-shadow: 0 0 0 3px #FEF3C7; }
.pcd-empty { text-align: center; padding: 2rem 1rem; color: var(--ink-3); }
.pcd-empty i { font-size: 1.8rem; color: #B8C4DC; }
.pcd-empty p { margin: .4rem 0 .15rem; font-weight: 700; color: var(--ink-2); }
.pcd-empty.sm { padding: 1.25rem .5rem; }
.pcd-none { color: var(--ink-3); font-size: .8rem; font-style: italic; }
@media (max-width: 760px) { .pcd-proc-row { grid-template-columns: 1fr auto auto; } .pcd-proc-bar, .pcd-proc-row .pcd-num:nth-of-type(5) { display: none; } }
.pcd-ai .pcd-card-head h2 i { color: var(--accent); }
.pcd-ai .ai-text { font-size: .88rem; line-height: 1.55; color: var(--ink); }
.pcd-sum-empty { color: var(--ink-3) !important; font-size: .84rem !important; }
.pcd-acts { white-space: nowrap; } .pcd-acts .btn + .btn { margin-left: .35rem; }
.pms-f .combo, .pcd-f .combo { min-width: 170px; }
.pcd-f .combo-input, .pms-f .combo-input { height: 38px; border-radius: 10px; font-size: .88rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
/* PMS Data: plan vs actual markers (red / amber / green) and the machine band rows; group colours are the pastels above */
.pms-table tbody tr:hover td { filter: brightness(.97); }
.pms-table td.is-good { color: #047857; font-weight: 700; } .pms-table td.is-warn { color: #B45309; font-weight: 700; }
.pms-table td.is-bad { color: #DC2626; font-weight: 700; }
.pms-table td.is-good::before, .pms-table td.is-bad::before, .pms-table td.is-warn::before { content: ""; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; margin-right: .35rem; vertical-align: middle; background: currentColor; }
.pms-table tr.pms-band td { background: #E9EEF8 !important; padding: .45rem .7rem; border-top: 2px solid #C7D2E8; position: sticky; left: 0; }
.pms-band-in { position: sticky; left: .6rem; display: inline-flex; align-items: center; gap: .9rem; font-size: .8rem; color: #475A80; }
.pms-band-in b { color: #0F1B3D; } .pms-band-in > i { color: #1D4ED8; } .pms-band-in > b { font-size: .9rem; }
.pms-bar .pms-f { flex: 0 1 210px; } .pms-bar .pms-f input { min-width: 0; width: 100%; }
.pcd-f .combo, .pms-f .combo { min-width: 190px; }
.pcd-f .combo-input, .pms-f .combo-input { height: 38px; border-radius: 10px; font-size: .88rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink); }

/* Report > NBD Report (pastel pipeline view) */
.nb { --nb-ink: #1F2A44; --nb-ink2: #5B6B8C; --nb-line: #E6EAF3; --nb-bg: #FBFCFE; }
.nb-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.nb-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8A6FD1; }
.nb-head h1 { margin: .15rem 0 .2rem; font-size: 1.6rem; font-weight: 800; color: var(--nb-ink); }
.nb-sub { margin: 0; color: var(--nb-ink2); font-size: .9rem; }
.nb-xlsx { background: #E3F4EA; color: #1D6B45; border: 1px solid #C9EEDB; border-radius: 10px; font-weight: 700; padding: .45rem .9rem; }
.nb-xlsx:hover { background: #D2EEDD; color: #155C3A; }
.nb-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; background: #fff; border: 1px solid var(--nb-line); border-radius: 16px; padding: .9rem 1rem; margin-bottom: 1rem; }
.nb-f { display: flex; flex-direction: column; gap: .3rem; margin: 0; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--nb-ink2); min-width: 190px; }
.nb-f .combo-input, .nb-f > select { height: 38px; border-radius: 10px; font-size: .88rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--nb-ink); }
.nb-grow { flex: 1; min-width: 220px; }
.nb-search { position: relative; display: block; }
.nb-search i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: #9AA7C2; }
.nb-search input { width: 100%; height: 38px; border: 1px solid #D7DEEA; border-radius: 10px; padding: 0 .7rem 0 2.1rem; font-size: .88rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.nb-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; }
@media (max-width: 1200px) { .nb-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .nb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nb-kpi { display: flex; gap: .8rem; align-items: center; border-radius: 16px; padding: 1rem; border: 1px solid transparent; }
.nb-kpi small { display: block; font-size: .74rem; font-weight: 700; color: var(--nb-ink2); text-transform: uppercase; letter-spacing: .04em; }
.nb-kpi b { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1.1; color: var(--nb-ink); }
.nb-kpi em { font-style: normal; font-size: .76rem; color: var(--nb-ink2); }
.nb-kpi-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: rgba(255,255,255,.7); }
.nb-kpi.blue { background: #EAF3FE; border-color: #D3E6FC; } .nb-kpi.blue .nb-kpi-ic { color: #2563EB; }
.nb-kpi.rose { background: #FDEDF2; border-color: #F9D6E1; } .nb-kpi.rose .nb-kpi-ic { color: #C2416B; } .nb-kpi.rose b { color: #A3284F; }
.nb-kpi.amber { background: #FEF5E6; border-color: #FBE5C2; } .nb-kpi.amber .nb-kpi-ic { color: #C27A10; }
.nb-kpi.mint { background: #E9F8F0; border-color: #CDEEDC; } .nb-kpi.mint .nb-kpi-ic { color: #1F8A55; } .nb-kpi.mint b { color: #17704A; }
.nb-kpi.lilac { background: #F2EFFC; border-color: #E0D9F7; } .nb-kpi.lilac .nb-kpi-ic { color: #6E54C4; }
.nb-card { background: #fff; border: 1px solid var(--nb-line); border-radius: 18px; padding: 1.05rem 1.15rem; margin-bottom: 1rem; box-shadow: 0 1px 2px rgba(31,42,68,.04); }
.nb-card-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .85rem; }
.nb-card-head h2 { margin: 0; font-size: 1.02rem; font-weight: 800; color: var(--nb-ink); }
.nb-hint { font-size: .78rem; color: var(--nb-ink2); }
.nb-funnel { display: flex; align-items: stretch; gap: .35rem; overflow-x: auto; padding-bottom: .25rem; }
.nb-stage { flex: 1 1 0; min-width: 165px; border-radius: 14px; padding: .8rem .9rem; background: var(--tint, #EEF2F8); color: var(--ink, var(--nb-ink)); display: flex; flex-direction: column; gap: .15rem; }
.nb-stage.start { flex: 0 0 130px; min-width: 130px; background: #F4F6FA; color: var(--nb-ink); }
.nb-stage small { font-size: .74rem; font-weight: 700; }
.nb-stage b { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.nb-stage em { font-style: normal; font-size: .74rem; opacity: .85; }
.nb-stage-top { display: flex; gap: .45rem; align-items: center; }
.nb-no { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: rgba(255,255,255,.75); font-size: .72rem; font-weight: 800; }
.nb-meter { height: 6px; border-radius: 999px; background: rgba(255,255,255,.65); overflow: hidden; margin: .35rem 0 .3rem; }
.nb-meter i { display: block; height: 100%; background: var(--ink); opacity: .55; border-radius: 999px; }
.nb-stage-foot { display: flex; flex-direction: column; gap: .05rem; font-size: .72rem; }
.nb-stage-foot .od { font-weight: 800; color: #A3284F; }
.nb-arrow { display: grid; place-items: center; color: #B9C3D8; font-size: 1rem; }
.nb-t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .85rem; }
.nb-t th { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--nb-ink2); background: #F7F9FC !important; padding: .55rem .65rem; border-bottom: 1px solid var(--nb-line); text-align: left; white-space: nowrap; }
.nb-t th:first-child { border-top-left-radius: 10px; } .nb-t th:last-child { border-top-right-radius: 10px; }
.nb-t td { padding: .6rem .65rem; border-bottom: 1px solid #F0F3F8; color: var(--nb-ink); vertical-align: middle; background: #fff !important; }
.nb-t .n { text-align: right; font-variant-numeric: tabular-nums; } .nb-t .c { text-align: center; }
.nb-t td.rose { color: #A3284F; font-weight: 800; }
.nb-th-st { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--tint); color: var(--ink); font-weight: 800; }
.nb-cellbar { position: relative; display: inline-flex; align-items: flex-end; width: 34px; height: 30px; border-radius: 7px; background: #F4F6FA; overflow: hidden; }
.nb-cellbar i { display: block; width: 100%; background: var(--tint); }
.nb-cellbar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: var(--ink); }
.nb-person { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }
.nb-person.sm { font-weight: 500; font-size: .82rem; }
.nb-av { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; color: #4C3A99; background: #E5DFFA; }
.nb-person.sm .nb-av { width: 24px; height: 24px; font-size: .62rem; background: #DDEBFC; color: #1E4E8C; }
.nb-pill { display: inline-block; border-radius: 999px; padding: .18rem .6rem; font-size: .74rem; font-weight: 700; background: #EEF1F6; color: #55627E; white-space: nowrap; }
.nb-pill.rose { background: #FCE4EC; color: #A3284F; } .nb-pill.amber { background: #FDF0D8; color: #925A0B; } .nb-pill.mint { background: #DDF4E7; color: #17704A; }
.nb-pill.blue { background: #E1EEFD; color: #1E4E8C; } .nb-pill.grey { background: #EEF1F6; color: #6B7896; }
.nb-small { font-size: .74rem; color: var(--nb-ink2); margin-top: .1rem; }
.nb-mat { color: #6E54C4; font-weight: 600; }
.nb-date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--nb-ink2) !important; }
.nb-cust { font-weight: 700; }
.nb-leads tbody tr { cursor: pointer; }
.nb-leads tbody tr:hover td { background: #F8F9FF !important; }
.nb-leads tr.is-od td:first-child { box-shadow: inset 3px 0 0 #E89AB4; }
.nb-steps { display: flex; gap: .3rem; }
.nb-step { display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 52px; }
.nb-step i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-style: normal; font-size: .72rem; font-weight: 800; border: 2px solid transparent; }
.nb-step small { font-size: .62rem; color: var(--nb-ink2); white-space: nowrap; }
.nb-step.done i { background: #CDEFD9; color: #17704A; }
.nb-step.late i { background: #FCE9C8; color: #925A0B; }
.nb-step.pending i { background: #DCEBFC; color: #1E4E8C; }
.nb-step.overdue i { background: #FAD3DF; color: #A3284F; border-color: #EFA3BB; }
.nb-step.none i { background: #F2F4F8; color: #B3BCCE; }
.nb-legend { margin-left: auto; display: flex; gap: .75rem; flex-wrap: wrap; font-size: .74rem; color: var(--nb-ink2); }
.nb-legend .d { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: .3rem; vertical-align: -1px; }
.nb-legend .d.done { background: #9ADDB5; } .nb-legend .d.late { background: #F6CF85; } .nb-legend .d.pending { background: #A9CDF7; }
.nb-legend .d.overdue { background: #EFA3BB; } .nb-legend .d.none { background: #E1E6EF; }
.nb-empty { text-align: center; padding: 2rem 1rem; color: var(--nb-ink2); } .nb-empty i { font-size: 1.7rem; color: #C3CCDD; } .nb-empty p { margin: .4rem 0 .1rem; font-weight: 700; }
.nb-none { color: var(--nb-ink2); font-size: .85rem; }

/* PMS Data: Summary view (no sideways scrolling) */
.pms-sumrow { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.pms-sumrow .po-sum { margin: 0; }
.pms-view { margin-left: auto; display: inline-flex; background: #EEF2F8; border-radius: 10px; padding: 3px; }
.pms-view button { border: 0; background: transparent; padding: .35rem .8rem; border-radius: 8px; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.pms-view button.active { background: #fff; color: var(--brand-700); box-shadow: 0 1px 3px rgba(15,27,61,.12); }
.pms-sumwrap { border: 1px solid #E3E9F2; border-radius: 12px; overflow: hidden; }
.pms-sumtable { width: 100%; border-collapse: collapse; font-size: .84rem; }
.pms-sumtable th { background: #F4F7FC !important; color: var(--ink-2); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: .55rem .6rem; border-bottom: 1px solid #E3E9F2; text-align: left; white-space: nowrap; }
.pms-sumtable td { padding: .55rem .6rem; border-bottom: 1px solid #EEF2F7; background: #fff !important; color: var(--ink); white-space: nowrap; }
.pms-sumtable .n { text-align: right; font-variant-numeric: tabular-nums; }
.pms-sumtable .pms-chev { width: 28px; color: var(--ink-3); }
.pms-sumtable tr.pms-row { cursor: pointer; }
.pms-sumtable tr.pms-row:hover td { background: #F7F9FF !important; }
.pms-sumtable tr.pms-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.pms-sumtable tr.pms-row.open td { background: #F2F6FF !important; border-bottom-color: transparent; }
.pms-sumtable tr.pms-row .pms-chev i { display: inline-block; transition: transform .15s; }
.pms-sumtable tr.pms-row.open .pms-chev i { transform: rotate(90deg); color: var(--brand-700); }
.pms-sumtable td.pms-prod { font-weight: 600; color: #2F6B2A; }
.pms-sumtable td.is-good { color: #047857; font-weight: 700; } .pms-sumtable td.is-warn { color: #B45309; font-weight: 700; }
.pms-sumtable td.is-bad { color: #DC2626; font-weight: 700; }
.pms-sumtable tr.pms-band td { background: #E9EEF8 !important; padding: .45rem .7rem; border-top: 2px solid #C7D2E8; }
.pms-detail td { background: #F7F9FD !important; padding: .75rem .9rem 1rem !important; white-space: normal !important; }
.pms-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .65rem; }
.pms-sec { border-radius: 12px; padding: .65rem .75rem; background: #fff; border: 1px solid #E3E9F2; border-top: 4px solid #CBD5E1; }
.pms-sec h4 { margin: 0 0 .45rem; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.pms-sec dl { margin: 0; display: grid; gap: .2rem; }
.pms-sec dl > div { display: flex; justify-content: space-between; gap: .6rem; font-size: .8rem; border-bottom: 1px dashed #EEF2F7; padding-bottom: .15rem; }
.pms-sec dt { font-weight: 500; color: var(--ink-3); }
.pms-sec dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.pms-sec dd.is-good { color: #047857; } .pms-sec dd.is-warn { color: #B45309; } .pms-sec dd.is-bad { color: #DC2626; }
.pms-sec.g-ppc { border-top-color: #9FD68C; background: #F6FCF3; } .pms-sec.g-bd { border-top-color: #F2A3B3; background: #FFF7F9; }
.pms-sec.g-shot { border-top-color: #B9AEEC; background: #FAF9FF; } .pms-sec.g-cav { border-top-color: #8FD6C7; background: #F4FCFA; }
.pms-sec.g-prod { border-top-color: #9EC2F2; background: #F5F9FF; } .pms-sec.g-ok { border-top-color: #8FD9AC; background: #F3FBF6; }
.pms-sec.g-rej { border-top-color: #F2AC99; background: #FFF7F4; } .pms-sec.g-grind { border-top-color: #94D1E2; background: #F3FAFD; }
.pms-sec.g-oee { border-top-color: #CBA8EC; background: #FBF7FF; } .pms-sec.g-gen { border-top-color: #C3CEDF; }
.u-acts { display: inline-flex; gap: .3rem; justify-content: flex-end; }

/* User Management > User Access */
.ua-bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: .8rem 1rem; margin-bottom: 1rem; box-shadow: 0 2px 8px rgba(15,27,61,.05); }
.ua-f { display: flex; flex-direction: column; gap: .3rem; margin: 0; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); min-width: 220px; }
.ua-f .combo-input, .ua-f > select { height: 38px; border-radius: 10px; font-size: .9rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink); }
.ua-person { min-width: 300px; }
.ua-grow { flex: 1; }
.ua-search { position: relative; display: block; }
.ua-search i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.ua-search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 .7rem 0 2.1rem; font-size: .9rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.ua-save { height: 38px; border-radius: 10px; font-weight: 700; min-width: 140px; }
.ua-h { font-size: .95rem; font-weight: 800; color: var(--ink); margin: 1.2rem 0 .6rem; display: flex; gap: .6rem; align-items: baseline; }
.ua-h span { font-size: .78rem; font-weight: 600; color: var(--ink-3); }
.uaa-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: .85rem; overflow: hidden; }
.uaa-card .uaa-card-h { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; border-bottom: 1px solid var(--line-2); background: #FAFBFE; }
.uaa-card h2 { margin: 0; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-700); display: flex; gap: .45rem; align-items: center; }
.uaa-card h2 small { font-size: .72rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.ua-all { display: inline-flex; gap: .4rem; align-items: center; font-size: .82rem; font-weight: 600; color: var(--ink-2); cursor: pointer; margin: 0; }
.ua-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; padding: .35rem 1rem .6rem; }
.ua-grid.one { grid-template-columns: 1fr; }
@media (max-width: 800px) { .ua-grid { grid-template-columns: 1fr; } }
.ua-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .45rem .3rem; border-bottom: 1px dashed var(--line-2); }
.ua-item.on .ua-check span { font-weight: 600; color: var(--ink); }
.ua-check { display: inline-flex; gap: .6rem; align-items: center; margin: 0; cursor: pointer; font-size: .88rem; color: var(--ink-2); }
.ua-check input, .ua-all input, .ua-ro input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.ua-check small { display: block; font-size: .74rem; font-weight: 400; color: var(--ink-3); }
.ua-ro { display: inline-flex; gap: .35rem; align-items: center; margin: 0; font-size: .74rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; cursor: pointer;
  background: #F4F6FA; border-radius: 999px; padding: .15rem .55rem; }
.ua-ro input { width: 14px; height: 14px; }
.ua-every { border-color: #C9D8F7; background: #F7FAFF; }
.ua-empty { text-align: center; padding: 3rem 1rem; color: var(--ink-3); background: #fff; border: 1px dashed var(--line); border-radius: 14px; }
.ua-empty i { font-size: 2rem; color: #B8C4DC; } .ua-empty p { margin: .5rem 0 .2rem; font-weight: 700; color: var(--ink-2); }
.ua-empty.sm { padding: 1.2rem; }

/* User Management > User Processes */
.up-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 960px) { .up-layout { grid-template-columns: 1fr; } }
.up-people { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .75rem; position: sticky; top: .5rem; }
.up-search { position: relative; }
.up-search i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.up-search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 .7rem 0 2.1rem; font-size: .88rem; }
.up-sort { display: flex; gap: .25rem; align-items: center; margin: .55rem 0; font-size: .72rem; color: var(--ink-3); flex-wrap: wrap; }
.up-sort span { margin-right: .2rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.up-sort button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .12rem .55rem; font-size: .74rem; font-weight: 600; color: var(--ink-2); }
.up-sort button.active { background: var(--brand-soft); border-color: #BFD3FB; color: var(--brand-700); }
.up-list { max-height: calc(100vh - 260px); overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.up-person { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: .6rem; padding: .5rem .55rem; border-radius: 10px; cursor: pointer; }
.up-person:hover { background: #F5F8FF; } .up-person.active { background: var(--brand-soft); }
.up-person:focus-visible { outline: 2px solid var(--brand); }
.up-who { flex: 1; min-width: 0; } .up-who b { display: block; font-size: .86rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-who small { display: block; font-size: .72rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-nums { display: flex; flex-direction: column; align-items: flex-end; gap: .05rem; font-size: .7rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.up-nums .bad { color: #fff; background: #E11D48; border-radius: 999px; padding: 0 .4rem; }
.up-av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand-600), var(--accent)); }
.up-av.lg { width: 48px; height: 48px; font-size: 1rem; }
.up-detail { min-width: 0; }
.up-head { display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; margin-bottom: .8rem; }
.up-head h2 { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--ink); } .up-head p { margin: .1rem 0 0; font-size: .82rem; color: var(--ink-3); }
.up-links { margin-left: auto; display: flex; gap: .4rem; }
.up-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .55rem; margin-bottom: .9rem; }
@media (max-width: 1300px) { .up-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.up-tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .7rem; }
.up-tile b { display: block; font-size: 1.35rem; font-weight: 800; color: var(--ink); line-height: 1.15; }
.up-tile span { font-size: .72rem; color: var(--ink-3); }
.up-tile.bad { background: #FFF1F3; border-color: #FBCFD8; } .up-tile.bad b { color: #BE123C; }
.up-tile.warn { background: #FFF8EB; border-color: #FBE3B5; } .up-tile.warn b { color: #B45309; }
.up-tile.good { background: #F0FAF4; border-color: #CDEEDC; } .up-tile.good b { color: #15803D; }
.up-tile.blue { background: #F3F7FF; border-color: #D3E1FB; } .up-tile.blue b { color: var(--brand-700); }
.up-proc { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: .7rem; overflow: hidden; }
.up-proc > header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 1rem; background: #FAFBFE; border-bottom: 1px solid var(--line-2); }
.up-proc h3 { margin: 0; font-size: .95rem; font-weight: 800; color: var(--ink); } .up-proc header small { font-size: .76rem; color: var(--ink-3); }
.up-pnums { display: flex; gap: .45rem; align-items: center; font-size: .78rem; font-weight: 600; color: var(--ink-2); flex-wrap: wrap; }
.up-pnums span { background: #EEF2F8; border-radius: 999px; padding: .1rem .55rem; }
.up-pnums .bad { background: #FFE4E9; color: #BE123C; } .up-pnums .warn { background: #FEF3C7; color: #92400E; }
.up-steps { width: 100%; border-collapse: collapse; font-size: .84rem; }
.up-steps th { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding: .45rem 1rem; text-align: left; background: #fff !important; border-bottom: 1px solid var(--line-2); }
.up-steps td { padding: .45rem 1rem; border-bottom: 1px solid #F1F4F9; background: #fff !important; }
.up-steps .n { text-align: right; font-variant-numeric: tabular-nums; } .up-steps td.bad { color: #BE123C; font-weight: 800; } .up-steps td.warn { color: #B45309; font-weight: 700; }
.up-no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-700); font-size: .72rem; font-weight: 800; margin-right: .5rem; }
.up-tag { display: inline-block; font-size: .72rem; font-weight: 600; border-radius: 999px; padding: .1rem .5rem; background: #F1F4F9; color: var(--ink-3); }
.up-tag.doer { background: #E6F5EC; color: #166534; } .up-tag.pc { background: #EDE9FE; color: #5B21B6; }
.up-none { margin: 0; padding: .7rem 1rem; font-size: .82rem; color: var(--ink-3); }
.up-empty { text-align: center; padding: 3rem 1rem; color: var(--ink-3); background: #fff; border: 1px dashed var(--line); border-radius: 14px; }
.up-empty i { font-size: 2rem; color: #B8C4DC; } .up-empty p { margin: .5rem 0 0; font-weight: 700; color: var(--ink-2); } .up-empty.sm { padding: 1.3rem; }

/* Report > CRR Report (pastel, like the NBD Report) */
.crr-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.crr-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8A6FD1; }
.crr-head h1 { margin: .15rem 0 .2rem; font-size: 1.6rem; font-weight: 800; color: #1F2A44; }
.crr-sub { margin: 0; color: #5B6B8C; font-size: .9rem; }
.crr-acts { display: flex; gap: .5rem; }
.crr-btn { background: #EEF3FD; color: #1E4E8C; border: 1px solid #D6E3FA; border-radius: 10px; font-weight: 700; padding: .45rem .9rem; }
.crr-btn.green { background: #E3F4EA; color: #1D6B45; border-color: #C9EEDB; }
.crr-source { display: flex; gap: .55rem; align-items: flex-start; font-size: .84rem; border-radius: 12px; padding: .6rem .9rem; margin-bottom: .9rem; }
.crr-source.ok { background: #E9F8F0; color: #17704A; } .crr-source.warn { background: #FEF5E6; color: #7C4A06; }
.crr-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; background: #fff; border: 1px solid #E6EAF3; border-radius: 16px; padding: .9rem 1rem; margin-bottom: 1rem; }
.crr-f { display: flex; flex-direction: column; gap: .3rem; margin: 0; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #5B6B8C; min-width: 170px; }
.crr-f .combo-input, .crr-f > select, .crr-f > input { height: 38px; border-radius: 10px; font-size: .88rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: #1F2A44; border: 1px solid #D7DEEA; padding: 0 .65rem; background: #fff; }
.crr-grow { flex: 1; min-width: 220px; }
.crr-search { position: relative; display: block; } .crr-search i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: #9AA7C2; }
.crr-search input { width: 100%; height: 38px; border: 1px solid #D7DEEA; border-radius: 10px; padding: 0 .7rem 0 2.1rem; font-size: .88rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.crr-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; }
@media (max-width: 1100px) { .crr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.crr-kpi { display: flex; gap: .8rem; align-items: center; border-radius: 16px; padding: 1rem; border: 1px solid transparent; }
.crr-kpi small { display: block; font-size: .74rem; font-weight: 700; color: #5B6B8C; text-transform: uppercase; letter-spacing: .04em; }
.crr-kpi b { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.15; color: #1F2A44; }
.crr-kpi em { font-style: normal; font-size: .76rem; color: #5B6B8C; }
.crr-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: rgba(255,255,255,.7); }
.crr-kpi.blue { background: #EAF3FE; border-color: #D3E6FC; } .crr-kpi.blue .crr-ic { color: #2563EB; }
.crr-kpi.mint { background: #E9F8F0; border-color: #CDEEDC; } .crr-kpi.mint .crr-ic { color: #1F8A55; } .crr-kpi.mint b { color: #17704A; }
.crr-kpi.lilac { background: #F2EFFC; border-color: #E0D9F7; } .crr-kpi.lilac .crr-ic { color: #6E54C4; }
.crr-kpi.rose { background: #FDEDF2; border-color: #F9D6E1; } .crr-kpi.rose .crr-ic { color: #C2416B; } .crr-kpi.rose b { color: #A3284F; }
.crr-card { background: #fff; border: 1px solid #E6EAF3; border-radius: 18px; padding: 1.05rem 1.15rem; margin-bottom: 1rem; }
.crr-card-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .8rem; flex-wrap: wrap; }
.crr-card-head h2 { margin: 0; font-size: 1.02rem; font-weight: 800; color: #1F2A44; } .crr-hint { font-size: .78rem; color: #5B6B8C; }
.crr-age { display: flex; gap: 4px; height: 64px; border-radius: 12px; overflow: hidden; }
.crr-age-b { display: flex; flex-direction: column; justify-content: center; padding: 0 .8rem; min-width: 110px; color: #5A2232; }
.crr-age-b b { font-size: 1rem; font-weight: 800; } .crr-age-b span { font-size: .72rem; font-weight: 600; }
.crr-t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .85rem; }
.crr-t th { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #5B6B8C; background: #F7F9FC !important; padding: .55rem .65rem; border-bottom: 1px solid #E6EAF3; text-align: left; white-space: nowrap; }
.crr-t td { padding: .6rem .65rem; border-bottom: 1px solid #F0F3F8; color: #1F2A44; vertical-align: middle; background: #fff !important; }
.crr-t .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .crr-t td.od { color: #A3284F; font-weight: 800; }
.crr-t tbody tr:hover td { background: #F8F9FF !important; }
.crr-small { font-size: .74rem; color: #5B6B8C; }
.crr-mini { display: flex; gap: 2px; width: 120px; height: 8px; border-radius: 999px; overflow: hidden; background: #F2F4F8; }
.crr-mini i { display: block; }
.crr-pill { display: inline-block; border-radius: 999px; padding: .15rem .55rem; font-size: .74rem; font-weight: 700; }
.crr-pill.mint { background: #DDF4E7; color: #17704A; } .crr-pill.amber { background: #FDF0D8; color: #925A0B; } .crr-pill.rose { background: #FCE4EC; color: #A3284F; }
.crr-none { color: #5B6B8C; font-size: .85rem; margin: 0; }
.crr-empty { text-align: center; padding: 2rem 1rem; color: #5B6B8C; } .crr-empty i { font-size: 1.7rem; color: #C3CCDD; } .crr-empty p { margin: .4rem 0 0; font-weight: 700; }

/* Report > Customer Complaint Report (uses the NBD Report's pastel pieces) */
.cc-stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; }
.cc-stage { background: color-mix(in srgb, var(--tint) 45%, #fff); border: 1px solid var(--tint); border-radius: 14px; padding: .7rem .8rem; }
.cc-stage-top { display: flex; gap: .45rem; align-items: center; margin-bottom: .45rem; } .cc-stage-top b { font-size: .82rem; color: #1F2A44; line-height: 1.25; }
.cc-bar { display: flex; gap: 2px; height: 9px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.7); }
.cc-bar i { display: block; } .cc-bar .done { background: #9ADDB5; } .cc-bar .late { background: #F6CF85; } .cc-bar .pending { background: #A9CDF7; }
.cc-bar .overdue { background: #EFA3BB; } .cc-bar .none { background: #E7EBF2; }
.cc-stage-foot { display: flex; flex-wrap: wrap; gap: .1rem .6rem; margin-top: .4rem; font-size: .72rem; color: #5B6B8C; } .cc-stage-foot .od { color: #A3284F; font-weight: 800; }
.cc-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1100px) { .cc-split { grid-template-columns: 1fr; } }
.cc-break { display: flex; flex-direction: column; gap: .45rem; }
.cc-brow { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto; gap: .6rem; align-items: center; font-size: .82rem; }
.cc-bname { color: #1F2A44; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-btrack { position: relative; height: 12px; border-radius: 999px; background: #F3F5F9; overflow: hidden; }
.cc-btrack i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; } .cc-btrack .act { background: repeating-linear-gradient(45deg, rgba(163,40,79,.35) 0 4px, transparent 4px 8px); }
.cc-bnum { font-variant-numeric: tabular-nums; white-space: nowrap; } .cc-bnum small { color: #A3284F; font-weight: 600; }
.cc-t .cc-text { max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #3D4A66; }
.cc-steps .nb-step { min-width: 0; } .cc-steps .nb-step i { width: 22px; height: 22px; font-size: .66rem; }
.cc .nb-small.od { color: #A3284F; font-weight: 700; }
/* User Access: search box on each section */
.uaa-tools { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; justify-content: flex-end; }
.uaa-sq { position: relative; display: inline-flex; align-items: center; }
.uaa-sq i { position: absolute; left: .6rem; color: var(--ink-3, #8A94A8); font-size: .8rem; pointer-events: none; }
.uaa-sq input { width: 200px; padding: .32rem .6rem .32rem 1.8rem; border: 1px solid var(--line, #DDE3EE); border-radius: 999px; font-size: .8rem; background: #fff; }
.uaa-sq input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 110, 247, .12); }
.uaa-none { margin: 0; padding: .7rem 1rem; color: var(--ink-3, #8A94A8); font-size: .85rem; }
.ua-item[hidden] { display: none; }
@media (max-width: 640px) { .uaa-card .uaa-card-h { flex-wrap: wrap; gap: .5rem; } .uaa-sq input { width: 100%; } .uaa-sq { flex: 1; } }
.cc-t td, .cc-t th { padding-left: .5rem; padding-right: .5rem; } .cc-t .nb-cust { white-space: nowrap; }

/* Dispatch Tracker (Sales to Payment until the truck leaves; NBD pastel pieces) */
.dt-flow { display: flex; flex-wrap: wrap; gap: .5rem; }
.dt-chip { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--tint); background: color-mix(in srgb, var(--tint) 45%, #fff);
  border-radius: 999px; padding: .35rem .5rem .35rem .45rem; font-size: .8rem; color: #1F2A44; cursor: pointer; }
.dt-chip b { background: #fff; border-radius: 999px; padding: .05rem .5rem; font-variant-numeric: tabular-nums; }
.dt-chip.on { box-shadow: 0 0 0 2px #1F2A44 inset; }
.dt-t .dt-mat { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-t tr.is-ready td:first-child { box-shadow: inset 3px 0 0 #9ADDB5; }
.dt-t .dt-late { color: #A3284F; font-weight: 700; }
.dt-t .dt-ic { color: #2E8B57; margin-right: .3rem; }
.dt .nb-small.od { color: #A3284F; font-weight: 700; }
.dt-t .nb-cust { white-space: nowrap; }
.dt-t td, .dt-t th { padding-left: .5rem; padding-right: .5rem; } .dt-t .dt-mat { max-width: 160px; }
.dt-t td:nth-last-child(2) { min-width: 170px; }
.nb-kpi > div { min-width: 0; }

/* Customer Complaint Report: the old portal's step table, in pastel */
.cc-scroll { overflow: auto; max-height: 72vh; border: 1px solid #E3E8F2; border-radius: 12px; }
.cc-grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: .82rem; }
.cc-grid th { position: sticky; top: 0; z-index: 2; background: #F7F8FC; color: #1F2A44; font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .02em; padding: .6rem .6rem; border-bottom: 1px solid #E3E8F2; text-align: left; white-space: nowrap; }
.cc-grid th.cc-sh { white-space: normal; width: 128px; min-width: 128px; text-align: center; line-height: 1.25; vertical-align: middle; }
.cc-grid td { padding: .5rem .6rem; border-bottom: 1px solid rgba(31,42,68,.06); vertical-align: middle; }
.cc-grid .cc-sticky { position: sticky; left: 0; z-index: 1; background: inherit; font-weight: 700; white-space: nowrap; box-shadow: 1px 0 0 #E3E8F2; }
.cc-grid th.cc-sticky { z-index: 3; background: #F7F8FC; }
.cc-grid tr.active { background: #EAF4FD; } .cc-grid tr.closed { background: #FBEFF6; }
.cc-grid tbody tr { cursor: pointer; } .cc-grid tbody tr:hover { filter: brightness(.97); }
.cc-grid .cc-cust { max-width: 230px; min-width: 170px; line-height: 1.3; }
.cc-cat { display: inline-block; border: 1px solid #D5DBE8; background: #fff; border-radius: 6px; padding: .1rem .5rem; font-weight: 800; font-size: .72rem; }
.cc-st { display: inline-block; border-radius: 999px; padding: .15rem .6rem; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.cc-st.active { background: #D6E9FC; color: #1F5FA8; } .cc-st.closed { background: #F8D7E8; color: #9B2C64; }
.cc-cell { text-align: center; }
.cc-blk { display: block; margin: 0 auto; width: 104px; padding: .32rem 0; border-radius: 7px; font-weight: 800; font-size: .78rem; }
.cc-blk.done { background: #9ADDB5; color: #155C37; } .cc-blk.late { background: #F6D58F; color: #7A5300; }
.cc-blk.pending { background: #F7B9C4; color: #8E1F35; } .cc-blk.overdue { background: #EC8FA3; color: #fff; }
.cc-blk.none { background: #E9ECF2; color: #8A94A8; }
.nb-legend.cc-legend .d.active { background: #8DBEF2; } .nb-legend.cc-legend .d.closed { background: #EFA6CB; }
.nb-legend.cc-legend .d.done { background: #9ADDB5; } .nb-legend.cc-legend .d.late { background: #F6D58F; } .nb-legend.cc-legend .d.pending { background: #F7B9C4; }
.nb-legend.cc-legend .d.overdue { background: #EC8FA3; } .nb-legend.cc-legend .d.none { background: #E9ECF2; }
.cc-scroll .cc-grid > tbody > tr > td { padding: .45rem .6rem; }
.cc-scroll .cc-grid > thead > tr > th { padding: .55rem .6rem; }
.cc-blk { text-align: center; }
.cc-grid th.cc-sh { max-width: 128px; }
/* Dispatch Tracker: fits the width, no sideways scroll (cards on small screens) */
.dt-t { width: 100%; table-layout: fixed; }
.dt-t td, .dt-t th { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.dt-t .c-id { width: 21%; } .dt-t .c-cust { width: 22%; } .dt-t .c-amt { width: 11%; } .dt-t .c-del { width: 10%; }
.dt-t .c-per { width: 13%; } .dt-t .c-now { width: 17%; } .dt-t .c-age { width: 6%; }
.dt-t .nb-cust { white-space: normal; } .dt-t td:nth-last-child(2) { min-width: 0; }
.dt-t .nb-pill { white-space: normal; text-align: left; max-width: 100%; }
.dt-t .c-id { width: 22%; } .dt-t .c-cust { width: 21%; } .dt-t .c-amt { width: 11%; } .dt-t .c-del { width: 11%; }
.dt-t .c-per { width: 13%; } .dt-t .c-now { width: 16%; } .dt-t .c-age { width: 6%; }
.dt-t td[data-l="Delivery"] { white-space: nowrap; }
.dt-t td, .dt-t th { padding-left: .45rem; padding-right: .45rem; }
@media (max-width: 1100px) {
  .dt-t thead { display: none; }
  .dt-t, .dt-t tbody, .dt-t tr, .dt-t td { display: block; width: 100%; }
  .dt-t tr { border: 1px solid #E3E8F2; border-radius: 12px; margin-bottom: .6rem; padding: .35rem .2rem; }
  .dt-t td { border: 0; padding: .3rem .7rem; text-align: left; }
  .dt-t td::before { content: attr(data-l); display: block; margin-bottom: .1rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; color: #6B7A99; }
  .dt-t td.n { text-align: left; }
  .dt-t tr.is-ready td:first-child { box-shadow: none; } .dt-t tr.is-ready { border-left: 4px solid #9ADDB5; }
}
@media (max-width: 1100px) {
  .dt-t tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 .4rem; padding: .5rem .3rem; }
  .dt-t tbody tr td { border-bottom: 0 !important; width: auto; }
}
@media (max-width: 1100px) { .dt-t tr { grid-template-columns: 1.4fr 1.2fr 1fr 1fr; } }
@media (max-width: 640px) { .dt-t tr { grid-template-columns: 1fr 1fr; } }

/* Back button, top right on every page (goes to the page you came from, with its filters) */
.topbar-back { display: inline-flex; align-items: center; gap: .4rem; height: 38px; padding: 0 .95rem; border-radius: 999px;
  border: 1px solid #C9D6F5; background: #EEF3FE; color: #2B4BB0; font-weight: 700; font-size: .88rem; }
.topbar-back:hover, .topbar-back:focus-visible { background: #DFE8FD; border-color: #A9BEF0; color: #1F3A92; }
.topbar-back i { font-size: 1rem; }
@media (max-width: 575.98px) { .topbar-back { padding: 0 .7rem; } .topbar-back span { display: none; } }

/* Dispatch Tracker: old portal columns */
.dt-t .c-id { width: 18%; } .dt-t .c-cust { width: 15%; } .dt-t .c-mat { width: 20%; } .dt-t .c-loc { width: 12%; }
.dt-t .c-dd { width: 10%; } .dt-t .c-pl { width: 8%; } .dt-t .c-crr { width: 8%; } .dt-t .c-now { width: 13%; }
.dt-t .c-amt, .dt-t .c-del, .dt-t .c-per, .dt-t .c-age { width: auto; }
.dt-t td[data-l="Dispatch date"] { white-space: normal; } .dt-date { white-space: nowrap; display: block; }
.dt-mat { line-height: 1.35; font-size: .8rem; color: #2B3756; }
.dt-note { margin-top: .3rem; font-size: .74rem; color: #6A4C00; background: #FFF5DB; border-radius: 6px; padding: .15rem .4rem; display: inline-block; }
.dt-k { display: inline-block; min-width: 2.2rem; font-size: .66rem; font-weight: 800; text-transform: uppercase; color: #7A86A1; }
.dt-delay { display: inline-block; margin-top: .2rem; background: #FBDDE5; color: #A3284F; font-weight: 800; font-size: .72rem; border-radius: 999px; padding: .08rem .5rem; white-space: nowrap; }
.dt-soon { display: inline-block; margin-top: .2rem; background: #FFF0CC; color: #7A5300; font-weight: 800; font-size: .72rem; border-radius: 999px; padding: .08rem .5rem; white-space: nowrap; }
.dt-unit { font-size: .9rem; font-weight: 700; color: inherit; display: inline; }
.dt-t .dt-mat { max-width: none; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
.dt-t th { white-space: normal !important; line-height: 1.25; vertical-align: bottom; }
.dt-t td[data-l="Location"], .dt-t td[data-l="Accountable CRR"], .dt-t td[data-l="Billing / Delivery"] { overflow-wrap: normal; word-break: normal; }
.dt-t .c-id { width: 17%; } .dt-t .c-mat { width: 21%; } .dt-t .c-pl { width: 9%; } .dt-t .c-crr { width: 9%; } .dt-t .c-now { width: 11%; }
.dt-t th, .dt-t .nb-pill, .dt-t td[data-l="Now at"] { overflow-wrap: normal; word-break: normal; }
.dt-t .c-id { width: 15%; } .dt-t .c-cust { width: 14%; } .dt-t .c-now { width: 15%; } .dt-t .c-crr { width: 9%; } .dt-t .c-loc { width: 11%; }
/* Dispatch Tracker: the old portal's 14 columns (scrolls sideways, header and Entry ID stay in view) */
.dt-scroll { overflow: auto; max-height: 74vh; border: 1px solid #E3E8F2; border-radius: 12px; }
.dt-grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: .82rem; }
.dt-grid th { position: sticky; top: 0; z-index: 2; background: #F7F8FC; color: #1F2A44; font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .02em; padding: .6rem .7rem; border-bottom: 1px solid #E3E8F2; text-align: left; white-space: nowrap; }
.dt-grid td { padding: .55rem .7rem; border-bottom: 1px solid rgba(31,42,68,.07); vertical-align: top; background: #fff; }
.dt-grid tr.is-late td { background: #FFF6F8; } .dt-grid tr.is-ready td { background: #F1FBF5; }
.dt-grid tbody tr { cursor: pointer; } .dt-grid tbody tr:hover td { background: #EEF3FE; }
.dt-grid .dt-sticky { position: sticky; left: 0; z-index: 1; font-weight: 700; white-space: nowrap; box-shadow: 1px 0 0 #E3E8F2; }
.dt-grid th.dt-sticky { z-index: 3; }
.dt-grid .n { text-align: right; } .dt-grid .nw { white-space: nowrap; }
.dt-grid .w-cust { min-width: 190px; max-width: 240px; } .dt-grid .w-mat { min-width: 260px; max-width: 340px; line-height: 1.35; }
.dt-grid .w-ins { min-width: 140px; max-width: 220px; }
.dt-grid .dt-delay { display: inline-block; min-width: 2.2rem; text-align: center; background: #FBDDE5; color: #A3284F; font-weight: 800; border-radius: 999px; padding: .08rem .5rem; }
.dt-grid .dt-at { color: #2E8B57; font-weight: 700; }
/* the general table rule above is very specific: keep these two step tables' sticky header + first column on top */
table.dt-grid th, table.cc-grid th { background: #F7F8FC !important; z-index: 2 !important; padding: .6rem .7rem !important; letter-spacing: .02em !important; }
table.dt-grid th.dt-sticky, table.cc-grid th.cc-sticky { z-index: 4 !important; }
table.dt-grid td, table.cc-grid td { padding: .55rem .7rem !important; }
table.dt-grid td.dt-sticky { z-index: 3 !important; }

/* PMS Data > All fields: one compact card per shift entry, every field, no sideways scroll */
.pc-band { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin: 1rem 0 .5rem; padding: .5rem .8rem; border-radius: 10px;
  background: #E9EEF8; color: #475A80; font-size: .82rem; } .pc-band:first-child { margin-top: 0; }
.pc-band > b { color: #0F1B3D; font-size: .92rem; } .pc-band > i { color: #1D4ED8; } .pc-band b { color: #0F1B3D; }
.pc-card { border: 1px solid #E3E9F2; border-radius: 14px; background: #fff; margin-bottom: .7rem; overflow: hidden; }
.pc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .6rem .8rem; background: #FAFBFE; border-bottom: 1px solid #EEF2F7; }
.pc-id { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; font-size: .8rem; color: var(--ink-3); }
.pc-id a { font-weight: 700; font-size: .85rem; } .pc-prod { background: #EEF7EA; color: #2F6B1F; border-radius: 999px; padding: .1rem .6rem; font-weight: 700; }
.pc-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.pc-chip, .pc-oee { font-size: .74rem; border-radius: 999px; padding: .15rem .6rem; background: #F1F4F9; color: var(--ink-2); white-space: nowrap; }
.pc-chip b, .pc-oee b { font-variant-numeric: tabular-nums; color: var(--ink); }
.pc-chip.is-good { background: #E6F7EE; } .pc-chip.is-good b { color: #047857; } .pc-chip.is-warn { background: #FFF4DC; } .pc-chip.is-warn b { color: #B45309; }
.pc-chip.is-bad { background: #FDE8EC; } .pc-chip.is-bad b { color: #DC2626; }
.pc-oee { background: #EEF2FF; } .pc-oee.pos { background: #E6F7EE; } .pc-oee.pos b { color: #047857; } .pc-oee.neg { background: #FDE8EC; } .pc-oee.neg b { color: #DC2626; }
.pc-oee.mid { background: #FFF4DC; } .pc-oee.mid b { color: #B45309; }
.pc-secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .45rem; padding: .55rem; }
.pc-sec { border-radius: 10px; padding: .45rem .6rem; background: #fff; border: 1px solid #E3E9F2; border-top: 3px solid #CBD5E1; min-width: 0; }
.pc-sec h4 { margin: 0 0 .25rem; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.pc-sec dl { margin: 0; display: grid; gap: .05rem; }
.pc-sec dl > div { display: flex; justify-content: space-between; gap: .5rem; font-size: .74rem; line-height: 1.35; padding: .08rem 0; border-bottom: 1px dashed #F0F3F8; }
.pc-sec dl > div:last-child { border-bottom: 0; }
.pc-sec dt { font-weight: 500; color: var(--ink-3); min-width: 0; } .pc-sec dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pc-sec dd.is-good { color: #047857; } .pc-sec dd.is-warn { color: #B45309; } .pc-sec dd.is-bad { color: #DC2626; }
.pc-sec.g-ppc { border-top-color: #9FD68C; background: #F6FCF3; } .pc-sec.g-bd { border-top-color: #F2A3B3; background: #FFF7F9; }
.pc-sec.g-shot { border-top-color: #B9AEEC; background: #FAF9FF; } .pc-sec.g-cav { border-top-color: #8FD6C7; background: #F4FCFA; }
.pc-sec.g-prod { border-top-color: #9EC2F2; background: #F5F9FF; } .pc-sec.g-ok { border-top-color: #8FD9AC; background: #F3FBF6; }
.pc-sec.g-rej { border-top-color: #F2AC99; background: #FFF7F4; } .pc-sec.g-grind { border-top-color: #94D1E2; background: #F3FAFD; }
.pc-sec.g-oee { border-top-color: #A5B4FC; background: #F7F8FF; }
.pc-secs { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: .4rem; padding: .5rem; }
.pc-sec { padding: .4rem .5rem; } .pc-sec dl > div { font-size: .71rem; padding: .04rem 0; } .pc-sec h4 { font-size: .62rem; }
@media (min-width: 1500px) { .pc-secs { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* flow the sections in columns so short ones stack and no space is wasted */
.pc-secs { display: block; columns: 185px; column-gap: .4rem; padding: .5rem; }
.pc-sec { break-inside: avoid; margin-bottom: .4rem; display: block; }
.pc-sec dd { white-space: nowrap; overflow-wrap: normal; }
@media (min-width: 1500px) { .pc-secs { columns: 6; } }
.pc-sec dl > div { flex-wrap: wrap; column-gap: .5rem; row-gap: 0; }
.pc-sec dt { flex: 1 1 auto; } .pc-sec dd { white-space: normal; overflow-wrap: normal; word-break: normal; flex: 0 1 auto; margin-left: auto; max-width: 100%; }
.pc-sec dt { flex: 1 1 52%; min-width: 0; }
.pms-bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: .6rem .8rem; align-items: end; }
.pms-bar .pms-f { min-width: 0; } .pms-bar .pms-f select, .pms-bar .pms-f input { width: 100%; } .pms-bar .spacer { display: none; }
@media (max-width: 900px) { .pms-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pms-bar { column-gap: 1rem; } .pms-bar .pms-f > * { max-width: 100%; box-sizing: border-box; }
.pms-sheet { font-weight: 600; color: var(--ink-2); } .pms-src { background: #EEF2F8; color: #475A80; border-radius: 999px; padding: .05rem .55rem; font-size: .7rem; font-weight: 700; }
.pc-more { display: flex; align-items: center; gap: .8rem; justify-content: center; padding: .6rem 0 .2rem; color: var(--ink-3); font-size: .82rem; }
.pms-sync { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; margin: .2rem 0 .7rem; padding: .45rem .8rem; border-radius: 10px;
  background: #F3F7FE; border: 1px solid #DCE6F8; font-size: .8rem; color: #475A80; }
.pms-sync > i { color: #1A73E8; } .pms-sync b { color: #1F2A44; } .pms-sync .bad { color: #A3284F; font-weight: 600; }
.pms-sync .btn { margin-left: auto; }

/* Task page: the step, its due status and the steps so far on top; what was asked + the form left; details right */
.tk { display: flex; flex-direction: column; gap: 1rem; }
.tk-hero { display: grid; grid-template-columns: 1fr auto; gap: .6rem 1.5rem; padding: 1.1rem 1.3rem 1rem; border-radius: 18px;
  background: linear-gradient(135deg, #F4F7FF 0%, #F8F4FF 100%); border: 1px solid #E2E8F6; }
.tk-eyebrow { font-size: .8rem; color: #5B6B8C; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.tk-eyebrow i { color: #6D5BD0; } .tk-eyebrow a { font-weight: 700; } .tk-eyebrow span { color: #B5BFD3; }
.tk-hero h1 { margin: .25rem 0 .5rem; font-size: 1.55rem; font-weight: 800; color: #17213B; }
.tk-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.tk-chip { display: inline-flex; align-items: center; gap: .35rem; background: #fff; border: 1px solid #E2E8F6; border-radius: 999px;
  padding: .2rem .7rem; font-size: .78rem; color: #3D4A66; }
.tk-chip.prio.hi { background: #FDECEF; border-color: #F6C9D3; color: #A3284F; font-weight: 700; }
.tk-chip.prio.lo { background: #EEF7EE; border-color: #CFE9D2; color: #2E7D46; }
.tk-due { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.tk-due small { color: #6B7A99; font-size: .76rem; }
.tk-due-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px; font-weight: 800; font-size: .9rem;
  background: #EEF3FE; color: #2B4BB0; }
.tk-due-pill.late { background: #FDE6EC; color: #B4234F; } .tk-due-pill.soon { background: #FFF3D9; color: #8A5A00; }
.tk-due-pill.ok { background: #E3F6EC; color: #1F7A4C; } .tk-due-pill.plain { background: #EEF0F5; color: #5B6B8C; }
.tk-steps { grid-column: 1 / -1; display: flex; gap: 0; list-style: none; margin: .4rem 0 0; padding: 0; overflow-x: auto; }
.tk-steps li { position: relative; flex: 1 1 0; min-width: 140px; padding-right: .8rem; display: flex; flex-direction: column; gap: .2rem; }
.tk-steps li::after { content: ""; position: absolute; left: 30px; right: 6px; top: 11px; height: 2px; background: #D5DDEE; border-radius: 2px; }
.tk-steps li:last-child::after { display: none; }
.tk-steps .dot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid #C9D3E8;
  display: grid; place-items: center; font-size: .85rem; color: #fff; margin-bottom: .15rem; }
.tk-steps li.done .dot { background: #2E9E66; border-color: #2E9E66; } .tk-steps li.done::after { background: #9FD8B9; }
.tk-steps li.now .dot { background: #6D5BD0; border-color: #6D5BD0; box-shadow: 0 0 0 4px rgba(109,91,208,.18); }
.tk-steps li.open .dot { border-color: #A9B8DD; }
.tk-steps b { font-size: .8rem; color: #1F2A44; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-steps li.now b { color: #4B3BB0; }
.tk-steps small { font-size: .7rem; color: #7A86A1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-due-pill.hold { background: #F1EBFB; color: #6A3FB0; }
.tk-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .tk-grid { grid-template-columns: 1fr; } .tk-hero { grid-template-columns: 1fr; } .tk-due { align-items: flex-start; } }
.tk-left { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.tk-card { background: #fff; border: 1px solid #E3E8F2; border-radius: 16px; padding: 1.1rem 1.25rem; box-shadow: 0 1px 2px rgba(23,33,59,.04); min-width: 0; }
.tk-ask { background: #FFFCF4; border-color: #F3E3BE; }
.tk-ask-h { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #8A5A00; display: flex; gap: .4rem; align-items: center; margin-bottom: .45rem; }
.tk-ask-text { font-size: .95rem; line-height: 1.6; color: #2B3756; white-space: pre-wrap; }
.tk-work-h { display: flex; gap: .75rem; align-items: center; margin-bottom: .9rem; }
.tk-work-h h2 { margin: 0; font-size: 1.08rem; font-weight: 800; } .tk-work-h p { margin: .1rem 0 0; }
.tk-ic { width: 38px; height: 38px; border-radius: 12px; background: #EFECFD; color: #5B47C8; display: grid; place-items: center; font-size: 1.1rem; flex: none; }
.tk-actions { display: flex; align-items: center; gap: .6rem; border-top: 1px solid #EEF1F6; padding-top: .9rem; margin-top: .4rem; }
.tk-actions .btn-primary { padding: .5rem 1.4rem; font-weight: 700; }
.tk-state { display: flex; gap: .9rem; align-items: flex-start; } .tk-state > i { font-size: 1.8rem; color: #6B7A99; }
.tk-state h2 { margin: 0 0 .2rem; font-size: 1.1rem; } .tk-state.ok > i { color: #2E9E66; } .tk-state.hold > i { color: #8A5A00; }
.tk-side-h { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #5B6B8C; margin: 0 0 .6rem; display: flex; gap: .4rem; align-items: center; }
.tk-side-h:not(:first-child) { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid #EEF1F6; }
.tk-kv { display: grid; grid-template-columns: minmax(100px, 40%) 1fr; gap: .45rem .8rem; margin: 0; font-size: .86rem; }
.tk-kv dt { color: #6B7A99; font-weight: 500; } .tk-kv dd { margin: 0; color: #1F2A44; font-weight: 600; overflow-wrap: anywhere; }

/* Report > OEE Performance (NBD pastel pieces) */
.oe-presets { display: inline-flex; gap: .25rem; background: #F1F4FA; border-radius: 999px; padding: .2rem; align-self: end; flex-wrap: wrap; }
.oe-presets button { border: 0; background: transparent; border-radius: 999px; padding: .35rem .75rem; font-size: .78rem; font-weight: 600; color: #475A80; }
.oe-presets button.on { background: #fff; color: #2B4BB0; box-shadow: 0 1px 3px rgba(23,33,59,.12); }
.oe-top { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 900px) { .oe-top { grid-template-columns: 1fr; } }
.oe-gauge-card { background: #fff; border: 1px solid #E3E8F2; border-radius: 18px; padding: .9rem 1rem 1rem; text-align: center; }
.oe-gauge-card.world { background: linear-gradient(180deg, #F1FBF5, #fff); } .oe-gauge-card.low { background: linear-gradient(180deg, #FFF5F7, #fff); }
.oe-gauge-card.typical { background: linear-gradient(180deg, #FFFAEE, #fff); }
.oe-gauge-card p { margin: .4rem 0 0; font-size: .76rem; color: #6B7A99; }
.oe-gauge { width: 100%; max-width: 260px; }
.oe-gauge .g-track { fill: none; stroke: #EDF0F6; stroke-width: 16; stroke-linecap: round; }
.oe-gauge .g-val { fill: none; stroke-width: 16; stroke-linecap: round; } .oe-gauge .g-val.world { stroke: #57C08A; }
.oe-gauge .g-val.typical { stroke: #F2B655; } .oe-gauge .g-val.low { stroke: #EC7C98; }
.oe-gauge .g-tick { stroke: #B9C3D6; stroke-width: 2; }
.oe-gauge .g-num { font-size: 32px; font-weight: 800; fill: #17213B; } .oe-gauge .g-pc { font-size: 16px; fill: #6B7A99; }
.oe-gauge .g-lab { font-size: 11px; font-weight: 700; fill: #6B7A99; letter-spacing: .1em; }
.oe-band { display: inline-block; border-radius: 999px; padding: .15rem .7rem; font-size: .75rem; font-weight: 800; }
.oe-band.world { background: #DDF4E7; color: #1F7A4C; } .oe-band.typical { background: #FFF0CC; color: #8A5A00; }
.oe-band.low { background: #FBDDE5; color: #A3284F; } .oe-band.none { background: #EEF0F5; color: #6B7A99; }
.oe-apqs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
@media (max-width: 700px) { .oe-apqs { grid-template-columns: 1fr; } }
.oe-apq { display: flex; gap: .7rem; background: #fff; border: 1px solid #E3E8F2; border-radius: 16px; padding: 1rem; align-items: flex-start; }
.oe-apq-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; font-size: 1.1rem; }
.oe-apq.availability .oe-apq-ic { background: #E4EEFD; color: #2B5FB8; } .oe-apq.performance .oe-apq-ic { background: #EFEAFD; color: #5B47C8; }
.oe-apq.quality .oe-apq-ic { background: #E3F6EC; color: #1F7A4C; }
.oe-apq > div { flex: 1; min-width: 0; } .oe-apq small { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #6B7A99; }
.oe-apq b { display: block; font-size: 1.6rem; font-weight: 800; color: #17213B; margin: .1rem 0 .35rem; }
.oe-apq em { display: block; font-style: normal; font-size: .76rem; color: #6B7A99; margin-top: .35rem; }
.oe-bar { display: block; height: 7px; border-radius: 999px; background: #EEF1F6; overflow: hidden; min-width: 60px; }
.oe-bar i { display: block; height: 100%; border-radius: 999px; background: #A9B8DD; }
.oe-bar.world i { background: #7FD1A6; } .oe-bar.typical i { background: #F5C878; } .oe-bar.low i { background: #F09AAF; }
.oe-plants { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.oe-plant { text-align: left; border: 1px solid #E3E8F2; background: #fff; border-radius: 14px; padding: .75rem .9rem; display: flex; flex-direction: column; gap: .3rem; cursor: pointer; }
.oe-plant:hover { border-color: #A9BEF0; box-shadow: 0 2px 8px rgba(43,75,176,.08); }
.oe-plant span { font-weight: 700; color: #1F2A44; } .oe-plant b { font-size: 1.35rem; font-weight: 800; } .oe-plant small { font-size: .72rem; color: #6B7A99; }
.oe-plant.world b { color: #1F7A4C; } .oe-plant.typical b { color: #8A5A00; } .oe-plant.low b { color: #A3284F; }
.oe-trend { width: 100%; height: auto; display: block; }
.oe-trend .t-grid { stroke: #EEF1F6; } .oe-trend .t-ax { font-size: 10px; fill: #8A94A8; }
.oe-trend .t-guide { stroke-dasharray: 5 4; stroke-width: 1.2; } .oe-trend .t-guide.world { stroke: #7FD1A6; } .oe-trend .t-guide.low { stroke: #F09AAF; }
.oe-trend .t-l { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.oe-trend .t-l.oe { stroke: #2B4BB0; stroke-width: 2.8; } .oe-trend .t-l.av { stroke: #8FB4EE; } .oe-trend .t-l.pf { stroke: #B9AEEC; } .oe-trend .t-l.qu { stroke: #95D9B6; }
.oe-trend .t-dot { stroke: #fff; stroke-width: 1.5; } .oe-trend .t-dot.world { fill: #3FAE77; } .oe-trend .t-dot.typical { fill: #E3A33B; } .oe-trend .t-dot.low { fill: #DC5A7C; }
.oe-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .74rem; color: #5B6B8C; margin-top: .3rem; }
.oe-legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: .35rem; }
.oe-legend i.oe { background: #2B4BB0; height: 4px; } .oe-legend i.av { background: #8FB4EE; } .oe-legend i.pf { background: #B9AEEC; } .oe-legend i.qu { background: #95D9B6; }
.oe-legend i.g { height: 0; border-top: 2px dashed; } .oe-legend i.g.world { border-color: #7FD1A6; } .oe-legend i.g.low { border-color: #F09AAF; }
.oe-t .oe-cell { min-width: 120px; } .oe-v { font-weight: 800; display: block; margin-bottom: .2rem; }
.oe-v.world { color: #1F7A4C; } .oe-v.typical { color: #8A5A00; } .oe-v.low { color: #A3284F; }
.oe-spark { width: 90px; height: 24px; } .oe-spark polyline { fill: none; stroke: #6D84D6; stroke-width: 1.6; }
.oe-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1100px) { .oe-split { grid-template-columns: 1fr; } }
.oe-loss { display: grid; grid-template-columns: minmax(110px, 160px) 1fr auto; gap: .6rem; align-items: center; font-size: .82rem; padding: .25rem 0; }
.oe-loss-bar { height: 10px; border-radius: 999px; background: #F3F5F9; overflow: hidden; } .oe-loss-bar i { display: block; height: 100%; background: #F2A3B3; border-radius: 999px; }
.oe-shift { display: grid; grid-template-columns: 90px auto 1fr; gap: .2rem .7rem; align-items: center; padding: .45rem 0; border-bottom: 1px dashed #EEF1F6; font-size: .84rem; }
.oe-shift small { grid-column: 1 / -1; color: #6B7A99; font-size: .72rem; } .oe-shift .oe-v { margin: 0; }
.oe-prod { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem; align-items: center; font-size: .82rem; padding: .3rem 0; border-bottom: 1px dashed #EEF1F6; }
.oe-prod span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .oe-prod .oe-v { margin: 0; } .oe-prod small { color: #8A94A8; }
.oe-note { font-size: .74rem; color: #7A86A1; margin: .8rem 0 0; }
.oe-chk { color: #B45309; cursor: help; }
.oe-t td b, .oe-chk { white-space: nowrap; } .oe-t td { padding-top: .5rem; padding-bottom: .5rem; }
.oe-trend { width: auto; max-width: 100%; height: auto; }
.oe-tabs { margin-left: auto; display: inline-flex; gap: .2rem; background: #F1F4FA; border-radius: 999px; padding: .2rem; }
.oe-tabs button { border: 0; background: transparent; border-radius: 999px; padding: .3rem .75rem; font-size: .78rem; font-weight: 600; color: #475A80; }
.oe-tabs button.on { background: #fff; color: #2B4BB0; box-shadow: 0 1px 3px rgba(23,33,59,.12); }
.oe-mrow { cursor: pointer; } .oe-mrow:hover td { background: #F3F6FE; }
.oe-detail { max-height: 520px; overflow: auto; } .oe-detail thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.oe-row-chk td { background: #FFFBF1; }
.oe-ttab td, .oe-detail td { white-space: nowrap; }
.pf-src { display: inline-block; background: #E8F2FD; color: #2B5FB8; border-radius: 999px; padding: 0 .45rem; font-size: .66rem; font-weight: 800; vertical-align: middle; }
/* MIS Doer Score: change the list on the page */
.ds-doer { border: 0; background: transparent; padding: 0; color: inherit; text-align: left; font: inherit; }
.ds-doer i { font-size: .75rem; color: #8A94A8; opacity: 0; } .ds-doer:hover { color: #2B4BB0; } .ds-doer:hover i { opacity: 1; }
.ds-acts { white-space: nowrap; } .ds-acts .btn { padding: .1rem .3rem; }
.ds-ctx { display: flex; flex-direction: column; gap: .15rem; background: #F5F7FC; border-radius: 10px; padding: .6rem .8rem; margin-bottom: .8rem; font-size: .86rem; }
.ds-ctx span { color: #5B6B8C; font-size: .8rem; }
.ds-also { display: flex; gap: .6rem; align-items: flex-start; background: #EEF7EE; border: 1px solid #CFE9D2; border-radius: 10px; padding: .6rem .8rem; margin: .4rem 0 .6rem; cursor: pointer; }
.ds-also input { margin-top: .25rem; } .ds-also small { color: #4B5A72; } .ds-also.off { background: #F5F6F8; border-color: #E3E6EC; cursor: default; }
.ds-wiz { list-style: none; counter-reset: w; padding: 0; margin: 0 0 .6rem; display: grid; gap: .55rem; }
.ds-wiz li { counter-increment: w; display: grid; grid-template-columns: 1.7rem 7rem 1fr; align-items: center; gap: .5rem; }
.ds-wiz li::before { content: counter(w); width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #E6EEFF; color: #3460D8; font-weight: 700; font-size: .78rem; display: grid; place-items: center; }
.ds-wiz label { font-weight: 600; font-size: .86rem; margin: 0; }
.ds-now { min-height: 1.5rem; }
.ds-left { margin-top: 1rem; border-top: 1px solid #E5E9F2; padding-top: .7rem; font-size: .86rem; }
.ds-left summary { cursor: pointer; color: #3460D8; }
@media (max-width: 560px) { .ds-wiz li { grid-template-columns: 1.7rem 1fr; } .ds-wiz li > :last-child { grid-column: 2; } }
.sv-now > div.sv-held { background: #FFF6E0 !important; border-color: #F5D98B !important; }
.sv-now > div.sv-held span { color: #9A6700 !important; }
.sv-now > div.sv-stop { background: #FDECEC !important; border-color: #F3B9B9 !important; }
.sv-now > div.sv-stop span { color: #B42318 !important; }
.sv-heldline { background: #FFF6E0; border: 1px solid #F5D98B; border-radius: 8px; padding: .45rem .7rem; font-size: .86rem; margin-bottom: .6rem; color: #5C4300; }
.sv-heldline.stop { background: #FDECEC; border-color: #F3B9B9; color: #7A1F1F; }
/* Vendor Outstanding */
.vo-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .9rem; }
.vo-tabs button { border: 1px solid #D5DCEB; background: #fff; border-radius: 999px; padding: .4rem 1rem; font-weight: 600; font-size: .88rem; color: #33415C; }
.vo-tabs button.on { background: #1F3A8A; border-color: #1F3A8A; color: #fff; }
.vo-tabs button.soon { opacity: .5; }
.vo-get { background: #DB291F; color: #fff; font-weight: 600; } .vo-get:hover { background: #B81F17; color: #fff; }
.vo-warn { background: #FFF6E0; border: 1px solid #F5D98B; color: #5C4300; border-radius: 10px; padding: .55rem .8rem; margin-bottom: .8rem; font-size: .88rem; }
.vo-ms { position: relative; }
.vo-ms-btn { display: flex; align-items: center; gap: .4rem; border: 1px solid #D5DCEB; background: #fff; border-radius: 10px; padding: .45rem .7rem; font-size: .86rem; min-width: 160px; }
.vo-ms-btn span { color: #5B6B8C; } .vo-ms-btn b { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vo-ms-btn i { margin-left: auto; font-size: .75rem; }
.vo-ms.on .vo-ms-btn { border-color: #1F3A8A; background: #EEF3FF; }
.vo-ms-pop { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: 300px; background: #fff; border: 1px solid #D5DCEB; border-radius: 12px; box-shadow: 0 10px 30px rgba(20,30,60,.15); padding: .5rem; }
.vo-ms-q { width: 100%; border: 1px solid #D5DCEB; border-radius: 8px; padding: .35rem .55rem; font-size: .85rem; margin-bottom: .35rem; }
.vo-ms-list { max-height: 280px; overflow: auto; } .vo-ms-list label { display: flex; gap: .45rem; align-items: flex-start; padding: .25rem .35rem; border-radius: 6px; font-size: .85rem; cursor: pointer; } .vo-ms-list label:hover { background: #F3F6FC; }
.vo-ms-foot { border-top: 1px solid #EEF1F6; margin-top: .3rem; text-align: right; }
.vo-scroll { max-height: 70vh; } .vo-scroll.short { max-height: 50vh; }
table.vo-grid th { white-space: nowrap; } table.vo-grid td.n, table.vo-grid th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.vo-grid .c-sel { width: 62px; white-space: nowrap; } table.vo-grid .c-n { width: 52px; color: #6B7896; }
table.vo-grid .c-cm { min-width: 170px; max-width: 260px; } table.vo-grid .c-md { width: 110px; text-align: center; }
table.vo-grid .vo-tot { font-weight: 700; color: #1F2A44; }
table.vo-grid .vo-neg { color: #A3284F; }
table.vo-grid tr.is-flag td { background: #FFE4E6 !important; }
table.vo-grid tr.is-ok td { background: #FFF4C7 !important; }
table.vo-grid tr.is-paid td { background: #DCEBFA !important; }
.vo-od { font-size: .74rem; color: #A3284F; font-weight: 600; }
.vo-nocat { color: #B45309; font-weight: 700; }
.vo-flag { border: 0; background: none; color: #9AA5BE; padding: 0 0 0 .4rem; } .vo-flag.on { color: #D6336C; }
.vo-cm { border: 1px dashed transparent; background: none; text-align: left; width: 100%; padding: .1rem .25rem; border-radius: 6px; font-size: .84rem; white-space: pre-wrap; }
.vo-cm:hover { border-color: #C9D3E6; background: #fff; } .vo-cm.empty { color: #8A96AE; }
.vo-selsum { color: #1F3A8A; }
.vo-age { align-items: flex-start; } .vo-age > div { width: 100%; }
.vo-age-row { display: flex; justify-content: space-between; gap: .6rem; font-size: .8rem; } .vo-age-row b { font-size: .85rem !important; display: inline !important; font-weight: 700; }
.vo-run { color: #1F3A8A; font-weight: 600; }
table.vo-grid td, table.vo-grid th { padding: .45rem .55rem; }
table.vo-grid input.form-control-sm { min-width: 130px; }
.vo-add { font-size: .78rem; color: #6B7896; }
.nb-kpi b span { font-size: inherit; }
/* Advance Payment Tracker */
.at-grid input.form-control-sm, .at-grid select.form-select-sm { min-width: 120px; }
.at-grid input.at-rate { min-width: 80px; width: 90px; }
.at-grid .w-mat { min-width: 220px; }
.at-grid tr.is-dirty td { background: #EEF3FF !important; }
.at-grid .at-done { color: #1E7D45; font-weight: 600; }
table.vo-grid tr.at-closed td { color: #8A96AE; }
table.vo-grid tr.at-nolot td:first-child { box-shadow: inset 3px 0 0 #F2A65A; }
.vo .nb-kpi b { font-size: 1.45rem; white-space: nowrap; } .vo .nb-kpi em { font-size: .74rem; }
/* Vendor Outstanding: the table fits the page (no sideways scroll), coloured header like the old page */
.vo-fit { max-height: 72vh; overflow-y: auto; overflow-x: hidden; border: 1px solid #DCE3F0; border-radius: 12px; }
.vo-fit.short { max-height: 55vh; }
.vo-fit table.vo-grid { table-layout: fixed; width: 100%; min-width: 0; font-size: .82rem; margin: 0; }
.vo-fit table.vo-grid td, .vo-fit table.vo-grid th { white-space: normal !important; overflow-wrap: anywhere; vertical-align: top; padding: .4rem .45rem; }
.vo-fit table.vo-grid thead th { position: sticky; top: 0; z-index: 2; background: #1F5FA8 !important; color: #fff !important; font-size: .7rem; letter-spacing: .03em; text-transform: uppercase; border-color: #1A5191 !important; }
.vo-fit table.vo-grid td.nw { white-space: nowrap !important; }
.vo-fit table.vo-grid .w-cust b { font-weight: 650; }
.vo-fit table.vo-grid input.form-control-sm, .vo-fit table.vo-grid select.form-select-sm { min-width: 0 !important; width: 100%; font-size: .78rem; padding: .2rem .35rem; }
.vo-fit table.vo-grid .c-sel input { margin: 0; }
.vo-fit table.vo-grid tbody tr:nth-child(even) td { background: #F8FAFE; }
.vo-fit table.vo-grid tbody tr:hover td { background: #EEF4FF; }
.vo-fit table.vo-grid tr.is-flag td { background: #FFD9DC !important; }
.vo-fit table.vo-grid tr.is-ok td { background: #FBE7A0 !important; }
.vo-fit table.vo-grid tr.is-paid td { background: #CFE3F7 !important; }
.vo-legend { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .78rem; color: #4B5A72; margin: 0 0 .5rem; }
.vo-legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; vertical-align: -1px; margin-right: .3rem; }
.vo-form select { font-weight: 700; color: #1F3A8A; }
/* CRR Report (SalesVision) */
.cr-meas { display: inline-flex; border: 1px solid #D5DCEB; border-radius: 999px; overflow: hidden; background: #fff; }
.cr-meas button { border: 0; background: none; padding: .42rem .9rem; font-weight: 700; font-size: .85rem; color: #4B5A72; }
.cr-meas button.on { background: #1F3A8A; color: #fff; }
.cr .nb-kpi b small { font-size: .8rem; font-weight: 600; color: #5B6B8C; }
.cr-legend { justify-content: flex-end; }
.cr svg .cr-grid { stroke: #F1D4D4; stroke-width: 1; }
.cr svg .cr-sep { stroke: #E7B9B9; stroke-width: 1; }
.cr svg .cr-ax { font-size: 10px; fill: #8A96AE; }
.cr svg .cr-val { font-size: 10px; font-weight: 700; fill: #1F2A44; }
.cr svg .cr-lab { font-size: 11px; fill: #33415C; }
.cr svg .cr-grp { font-size: 12px; font-weight: 700; fill: #1F2A44; }
.cr-t td.cr-var.ok { background: #DDF3E4 !important; color: #17663A; font-weight: 700; }
.cr-t td.cr-var.bad { background: #FDDCDC !important; color: #A3242F; font-weight: 700; }
.cr-pct.up { color: #17663A; font-weight: 700; } .cr-pct.down { color: #A3242F; font-weight: 700; }
.cr-t tr.cr-p { cursor: pointer; } .cr-t tr.cr-p .cr-car { font-size: .7rem; color: #8A96AE; transition: transform .15s; } .cr-t tr.cr-p.open .cr-car { transform: rotate(180deg); }
.cr-t tr.cr-wk td { background: #F6F8FD !important; font-size: .78rem; } .cr-indent { padding-left: 1.1rem; color: #4B5A72; }
.cr-t tr.cr-total td { background: #EEF3FF !important; font-weight: 800; border-top: 2px solid #1F5FA8; }
.cr-barcell { white-space: nowrap; } .cr-barcell small { font-size: .74rem; color: #4B5A72; margin-left: .35rem; }
.cr-ach { display: inline-block; vertical-align: middle; width: calc(100% - 3rem); height: 8px; background: #E9EEF7; border-radius: 999px; overflow: hidden; }
.cr-ach span { display: block; height: 100%; background: linear-gradient(90deg, #2F7DF6, #5FB0FF); border-radius: 999px; }
.cr-ach.share span { background: linear-gradient(90deg, #7C5CFA, #B39CFF); }
/* CRR budget entry */
.cb-top { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.cb-wrap { max-height: 60vh; }
.cb-t { font-size: .8rem; } .cb-t .cb-p { width: 170px; } .cb-t td { padding: .25rem .3rem !important; }
.cb-t input.n { text-align: right; padding: .2rem .3rem; font-size: .78rem; }
.cb-t .cb-tot { background: #EEF3FF !important; }
.vo-fit table.cb-t { table-layout: auto !important; }
.cb-t .cb-p { width: 150px; } .cb-t td:not(.cb-p) { min-width: 62px; }
.cb-t input.n { padding: .2rem .2rem !important; font-size: .76rem !important; min-width: 58px !important; }
/* CRR budget (quarter view) */
.bg-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .5rem; }
.bg-src { font-size: .8rem; color: #5B6B8C; background: #F1F4FA; border-radius: 999px; padding: .3rem .75rem; }
.bg-src.own { color: #17663A; background: #E3F5EA; }
.bg-tools { margin-left: auto; display: flex; gap: .4rem; align-items: center; font-size: .82rem; color: #4B5A72; }
.bg-pct input { width: 64px; border: 1px solid #D5DCEB; border-radius: 8px; padding: .25rem .4rem; text-align: right; }
.bg-help { font-size: .8rem; color: #5B6B8C; margin: 0 0 .7rem; }
.bg-wrap { border: 1px solid #DCE3F0; border-radius: 14px; overflow: auto; max-height: 58vh; }
.bg-t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.bg-t thead th { position: sticky; top: 0; z-index: 1; background: #F5F8FF; color: #1F3A8A; font-weight: 700; padding: .6rem .6rem; border-bottom: 1px solid #DCE3F0; }
.bg-t th small, .bg-t td small { display: block; font-weight: 500; font-size: .68rem; color: #7A879F; }
.bg-t td { padding: .45rem .6rem; border-bottom: 1px solid #EEF1F6; vertical-align: middle; }
.bg-t .n { text-align: right; }
.bg-t .bg-name { min-width: 190px; text-align: left; }
.bg-t .bg-yr { background: #F7F9FD; font-weight: 800; color: #1F2A44; min-width: 110px; }
.bg-t tbody tr:hover td { background: #FAFBFF; }
.bg-in { width: 100%; min-width: 90px; border: 1px solid #D5DCEB; border-radius: 9px; padding: .38rem .55rem; font-size: .88rem; background: #fff; transition: border-color .15s, box-shadow .15s; }
.bg-in.n { text-align: right; font-variant-numeric: tabular-nums; }
.bg-in:focus { outline: 0; border-color: #2F7DF6; box-shadow: 0 0 0 3px rgba(47,125,246,.15); }
.bg-person { font-weight: 600; }
.bg-varies { border: 1px dashed #F0B35B; background: #FFF7EA; color: #9A5B00; border-radius: 9px; padding: .32rem .7rem; font-size: .8rem; font-weight: 600; }
.bg-act { white-space: nowrap; width: 72px; text-align: right; }
.bg-ic { border: 0; background: none; color: #6B7896; padding: .2rem .35rem; border-radius: 6px; } .bg-ic:hover { background: #EEF3FF; color: #1F3A8A; }
.bg-ic.del:hover { background: #FDECEC; color: #B42318; }
tr.open .bg-ic[data-open] i { transform: rotate(180deg); display: inline-block; }
.bg-months td { background: #FAFBFF; }
.bg-mgrid { display: grid; grid-template-columns: repeat(6, minmax(80px, 1fr)); gap: .5rem .7rem; padding: .3rem 0 .4rem; }
.bg-mgrid label { display: flex; flex-direction: column; gap: .15rem; font-size: .72rem; color: #5B6B8C; font-weight: 600; }
.bg-mgrid .bg-in { min-width: 0; }
.bg-t tfoot td { position: sticky; bottom: 0; background: #EEF3FF; font-weight: 800; color: #1F2A44; border-top: 2px solid #1F5FA8; }
.bg-bar { display: flex; justify-content: flex-end; align-items: center; gap: .6rem; border-top: 1px solid #EEF1F6; margin-top: .8rem; padding-top: .8rem; }
.bg-bar #bg-state { margin-right: auto; }
@media (max-width: 760px) { .bg-mgrid { grid-template-columns: repeat(3, 1fr); } .bg-tools { margin-left: 0; } }
.bg-tools label.bg-pct { display: inline-flex !important; align-items: center; gap: .35rem; margin: 0; font-weight: 500; font-size: .82rem; color: #4B5A72; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.bg-tools .bg-pct input { width: 64px !important; height: auto; }
.vo-setup-top { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: .6rem; }
.vo-note { background: #F1F4FA; color: #4B5A72; border-radius: 10px; padding: .45rem .8rem; margin-bottom: .6rem; font-size: .84rem; }
/* MIS PERFORMANCE: structured table */
.pf-top { display: grid; grid-template-columns: auto auto 1fr; gap: 1rem 1.4rem; align-items: center; margin-bottom: .9rem; }
.pf-score { display: flex; align-items: center; gap: .8rem; }
.pf-score small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5B6B8C; }
.pf-score span { font-size: .78rem; color: #7A879F; }
.pf-ring { --c: #2F7DF6; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), #E8EDF6 0); position: relative; }
.pf-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.pf-ring b { position: relative; font-size: .95rem; font-weight: 800; color: #1F2A44; }
.pf-score.good .pf-ring { --c: #1E9E5A; } .pf-score.fair .pf-ring { --c: #E0A21B; } .pf-score.low .pf-ring { --c: #D64545; }
.pf-chips { display: flex; flex-direction: column; gap: .3rem; }
.pf-chip { font-size: .8rem; border-radius: 999px; padding: .15rem .65rem; background: #F1F4FA; color: #4B5A72; }
.pf-chip b { font-weight: 800; } .pf-chip.good { background: #E3F5EA; color: #17663A; } .pf-chip.low { background: #FDECEC; color: #A32828; }
.pf-secs { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.pf-sec { display: flex; align-items: center; gap: .45rem; border: 1px solid #E3E8F2; border-radius: 12px; padding: .45rem .75rem; background: #fff; font-size: .84rem; color: #33415C; }
.pf-sec i { color: #2F7DF6; } .pf-sec b { font-weight: 800; }
.pf-t { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.pf-t thead th { background: #F5F8FF; color: #1F3A8A; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .6rem .6rem; border-bottom: 1px solid #DCE3F0; }
.pf-t thead th small { text-transform: none; font-weight: 500; color: #7A879F; letter-spacing: 0; }
.pf-t td { padding: .55rem .6rem; border-bottom: 1px solid #EEF1F6; vertical-align: middle; overflow-wrap: anywhere; }
.pf-t .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-t td.n small { color: #7A879F; font-size: .72rem; }
.pf-t tr.pf-group td { background: #F7F9FD; font-weight: 700; color: #1F2A44; font-size: .82rem; border-top: 1px solid #E3E8F2; }
.pf-t tr.pf-group i { color: #2F7DF6; margin-right: .3rem; } .pf-t tr.pf-group .faint { font-weight: 500; }
.pf-gavg { float: right; font-weight: 800; }
.pf-t tr.pf-off td { color: #9AA5BE; } .pf-t tr.pf-off b { color: #7A879F; font-weight: 600; }
.pf-t tfoot td { background: #EEF3FF; border-top: 2px solid #1F5FA8; font-weight: 700; }
.pf-bar { display: inline-block; vertical-align: middle; width: calc(100% - 64px); height: 8px; border-radius: 99px; background: #E8EDF6; overflow: hidden; }
.pf-bar span { display: block; height: 100%; border-radius: 99px; background: #2F7DF6; }
.pf-bar.good span { background: #1E9E5A; } .pf-bar.fair span { background: #E0A21B; } .pf-bar.low span { background: #D64545; }
.pf-pct { display: inline-block; width: 58px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; }
#pf-body .good { color: #17663A; } #pf-body .fair { color: #9A6700; } #pf-body .low { color: #B42318; } #pf-body .none { color: #7A879F; }
.pf-tag { display: inline-block; font-size: .76rem; font-weight: 600; border-radius: 999px; padding: .15rem .6rem; background: #F1F4FA; color: #5B6B8C; white-space: normal; }
.pf-tag.good { background: #E3F5EA; color: #17663A; } .pf-tag.low { background: #FDECEC; color: #A32828; }
.pf-tag small { font-size: inherit; }
.pf-nodata { font-size: .78rem; color: #9AA5BE; }
.pf-empty { text-align: center; padding: 2rem 1rem; color: #7A879F; } .pf-empty i { font-size: 2rem; }
@media (max-width: 900px) { .pf-top { grid-template-columns: 1fr; } .pf-secs { justify-content: flex-start; } .pf-t { table-layout: auto; } }
/* MD Delegation sheet */
.dg-t textarea, .dg-t select, .dg-t input { font-size: .8rem !important; }
.dg-st { display: inline-block; border-radius: 999px; padding: .12rem .55rem; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.dg-st.amber { background: #FFF4D6; color: #8A5A00; } .dg-st.blue { background: #E3EEFF; color: #1F4FB8; }
.dg-st.green { background: #E3F5EA; color: #17663A; } .dg-st.grey { background: #EEF1F6; color: #5B6B8C; }
.dg-acts { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.dg-acts .btn-sm { font-size: .74rem; padding: .15rem .5rem; }
table.dg-t tr.dg-new td { background: #FFFBEA !important; }
table.dg-t tr.dg-late td:nth-child(6), table.dg-t tr.dg-late td:nth-child(7) { color: #B42318; font-weight: 700; }
table.dg-t tr.dg-doer_done td { background: #EEF4FF !important; }
table.dg-t tr.dg-done td, table.dg-t tr.dg-cancelled td { color: #7A879F; }
table.dg-t th { word-break: normal; overflow-wrap: normal; hyphens: none; }
table.dg-t td.nw { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .8rem; }
.dg-newtag { color: #8A5A00; font-size: .72rem; white-space: nowrap; }
.dg-acts { flex-wrap: nowrap; }
.dg-more { padding: .1rem .4rem !important; }
.vo-fit table.vo-grid.dg-t th { overflow-wrap: normal; letter-spacing: 0; font-size: .66rem; }
.vo-fit table.vo-grid.dg-t td.nw { overflow-wrap: normal; font-size: .76rem; padding-left: .3rem; padding-right: .3rem; }
/* MD Delegation: full-screen ADD form */
.dg-modal .modal-content { background: #F4F7FC; }
.dg-modal .modal-header { background: #1F5FA8; color: #fff; border: 0; padding: 1rem 1.5rem; }
.dg-modal .modal-header .btn-close { filter: invert(1) grayscale(1) brightness(2); }
.dg-modal .modal-body { padding: 0; display: flex; flex-direction: column; }
.dg-form { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.5rem 1rem; }
.dg-lead { color: #5B6B8C; margin-bottom: 1rem; }
.dg-line { display: grid; grid-template-columns: 2.25rem minmax(180px, 1.1fr) minmax(220px, 1.6fr) minmax(220px, 1.6fr) 10.5rem 7.5rem 2.5rem; gap: .9rem; align-items: start;
  background: #fff; border: 1px solid #DCE3F0; border-left: 4px solid #1F5FA8; border-radius: 12px; padding: 1rem 1rem .4rem; margin-bottom: .8rem; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.dg-line.dg-bad { border-left-color: #D92D20; background: #FFF8F7; }
.dg-line .field { margin: 0 0 .6rem; min-width: 0; }
.dg-line label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #5B6B8C; margin-bottom: .3rem; }
.dg-line label i { color: #D92D20; font-style: normal; }
.dg-line input, .dg-line select, .dg-line textarea { width: 100%; }
.dg-line textarea { min-height: 42px; resize: vertical; }
.dg-no { width: 2rem; height: 2rem; border-radius: 50%; background: #E3EEFF; color: #1F4FB8; font-weight: 800; display: grid; place-items: center; margin-top: 1.45rem; }
.dg-rm { margin-top: 1.45rem; padding: .3rem; }
.dg-addline { border-style: dashed; width: 100%; padding: .7rem; border-radius: 12px; background: #fff; }
.dg-foot { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #DCE3F0; padding: .85rem 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.dg-foot #cnt { color: #5B6B8C; font-weight: 600; }
@media (max-width: 991px) {
  .dg-line { grid-template-columns: 2.25rem 1fr 2.5rem; }
  .dg-line .field { grid-column: 2; } .dg-rm { grid-column: 3; grid-row: 1; }
}
.dg-modal .modal-header .modal-title { color: #fff; }
/* MD Delegation form v2: row 1 = doer / task / details, row 2 = priority / assigned (auto) / planned date / planned time */
.dg-line { grid-template-columns: 2.25rem minmax(180px, 1fr) minmax(240px, 1.6fr) minmax(220px, 1.4fr) 2.5rem; row-gap: .2rem; }
.dg-when { grid-column: 2 / 5; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(200px, 1fr) 11rem 9.5rem; gap: .9rem; padding-top: .55rem; border-top: 1px dashed #DCE3F0; }
.dg-seg { display: flex; border: 1px solid #CBD5E6; border-radius: 10px; overflow: hidden; background: #fff; }
.dg-seg button { flex: 1; border: 0; background: transparent; padding: .45rem .5rem; font-weight: 600; font-size: .85rem; color: #5B6B8C; }
.dg-seg button + button { border-left: 1px solid #CBD5E6; }
.dg-seg button.high.on { background: #FEE4E2; color: #B42318; } .dg-seg button.medium.on { background: #FFF4D6; color: #8A5A00; }
.dg-seg button.low.on { background: #E3F5EA; color: #17663A; }
.dg-seg button:focus-visible { outline: 2px solid #1F5FA8; outline-offset: -2px; }
.dg-auto { background: #EEF2F8; border: 1px solid #DCE3F0; border-radius: 10px; padding: .5rem .75rem; color: #344563; font-weight: 600; font-variant-numeric: tabular-nums; }
.dg-auto i { color: #1F5FA8; }
.dg-pr { display: inline-block; border-radius: 6px; padding: .1rem .45rem; font-size: .72rem; font-weight: 700; }
.dg-pr.high { background: #FEE4E2; color: #B42318; } .dg-pr.medium { background: #FFF4D6; color: #8A5A00; } .dg-pr.low { background: #E3F5EA; color: #17663A; }
.dg-tm { font-size: .7rem; color: #7A879F; }
@media (max-width: 991px) {
  .dg-line { grid-template-columns: 2.25rem 1fr 2.5rem; }
  .dg-when { grid-column: 2; grid-template-columns: 1fr 1fr; }
}
.dg-acts .btn { white-space: nowrap; }
.dg-cm { font-size: .78rem; line-height: 1.3; } .dg-cm + .dg-cm { margin-top: .25rem; } .dg-cm b { color: #1F5FA8; font-weight: 700; }
table.dg-t .dg-pr { margin-right: .2rem; }
.vo-fit table.vo-grid.dg-t thead th { text-transform: none; font-size: .74rem; line-height: 1.25; }
/* AI Observation: review + questions + chat */
.obs-dialog { max-width: min(1240px, 96vw); }
.obs-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 1rem; align-items: start; }
.obs-main { min-width: 0; }
.obs-side { background: var(--surface-2, #F5F7FB); border: 1px solid var(--line, #DCE3F0); border-radius: 12px; padding: .8rem .9rem; display: flex; flex-direction: column; min-width: 0; }
.obs-side-h { font-weight: 700; font-size: .85rem; color: var(--brand-700, #1F4FB8); margin-bottom: .4rem; display: flex; gap: .4rem; align-items: center; }
.obs-qs { margin: 0 0 .3rem; padding-left: 1.15rem; font-size: .85rem; }
.obs-qs li { margin-bottom: .45rem; } .obs-qs li span { display: block; }
.obs-qs .btn-link { font-size: .76rem; text-decoration: none; }
.obs-thread { max-height: 340px; min-height: 90px; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: .25rem 0 .5rem; }
.obs-msg { max-width: 92%; font-size: .85rem; line-height: 1.45; }
.obs-msg > div { border-radius: 12px; padding: .5rem .7rem; }
.obs-msg.me { align-self: flex-end; } .obs-msg.me > div { background: var(--brand, #1F5FA8); color: #fff; border-bottom-right-radius: 4px; }
.obs-msg.ai { align-self: flex-start; } .obs-msg.ai > div { background: #fff; border: 1px solid var(--line, #DCE3F0); border-bottom-left-radius: 4px; }
.obs-msg.ai .ai-text p:last-child, .obs-msg.ai .ai-text ul:last-child { margin-bottom: 0; }
.obs-done { display: inline-flex; gap: .3rem; align-items: center; margin-top: .25rem; font-size: .74rem; font-weight: 700; color: #17663A; }
.obs-next { display: flex; flex-wrap: wrap; gap: .35rem; }
.obs-chip { border: 1px solid var(--line, #CBD5E6); background: #fff; color: var(--ink, #344563); border-radius: 999px; padding: .2rem .65rem; font-size: .76rem; text-align: left; }
.obs-chip:hover { border-color: var(--brand, #1F5FA8); color: var(--brand, #1F5FA8); }
.obs-ask { display: flex; gap: .4rem; align-items: flex-end; }
.obs-ask textarea { resize: vertical; min-height: 40px; }
.obs-hint { font-size: .72rem; color: var(--ink-3, #7A879F); margin: .35rem 0 0; }
.obs-flag { display: inline-flex; gap: .35rem; align-items: center; background: #E3F5EA; color: #17663A; font-weight: 700; font-size: .78rem; border-radius: 999px; padding: .15rem .6rem; margin-bottom: .4rem; }
.obs-notes { margin-top: .7rem; background: #FFF8E6; border: 1px solid #F3DFA8; border-radius: 10px; padding: .55rem .75rem; font-size: .82rem; }
.obs-notes b { color: #8A5A00; } .obs-notes ul { margin: .3rem 0 0; padding-left: 1.1rem; }
@media (max-width: 991px) { .obs-grid { grid-template-columns: 1fr; } }
/* Integrations page */
.ig-code { background: #0F1B2D; color: #E6EDF7; border-radius: 10px; padding: .9rem 1rem; font-size: .78rem; white-space: pre-wrap; margin: 0; }
.ig-code-chip { font-size: .72rem; font-weight: 600; background: #EEF1F6; color: #5B6B8C; border-radius: 6px; padding: .05rem .4rem; margin: 0 .3rem; }
.ig-key { display: flex; gap: .5rem; align-items: center; background: #F5F7FB; border: 1px solid #DCE3F0; border-radius: 10px; padding: .5rem .7rem; }
.ig-key code { word-break: break-all; flex: 1; }
