﻿/* ============================================================================
   Kalé Deep Sea — support portal design system
   Added 2026-09-02 (UI modernisation, phase 1).

   Source of truth for colour and type is the Kalé Harmonics 1.01 "Deep Sea"
   identity. Reference the tokens below; never introduce a raw hex in a page.

   Load order matters: this file comes AFTER Styles/Custom.css so it wins where
   the two disagree. Legacy pages still carry inline style attributes, and an
   inline style beats any stylesheet — those are removed screen by screen as
   each page is converted.
   ========================================================================= */

:root {
  /* ---- palette ---- */
  --deep-sea: #081F4B;
  --noon: #EB4A26;
  --blue-sea: #3B97FF;
  --evening-sky: #76CBFF;
  --iceberg: #B6E3FF;
  --snow: #FFFFFF;
  --morning: #FCF0D9;
  --twilight: #ECECE4;
  --road: #585858;
  --night: #202020;

  /* ---- roles ---- */
  --app-bg: #F5F5F0;
  --surface: var(--snow);
  --surface-quiet: #F7F7F3;
  --border: #E4E4DA;
  --border-input: #C9CFD9;
  --text: var(--night);
  --text-strong: var(--deep-sea);
  --text-meta: var(--road);
  --link: #1f6fd0;

  /* ---- status (always paired with a word) ---- */
  --ok: #2e7d32;      --ok-bg: #e8f5e9;
  --warn: #e65100;    --warn-bg: #fff3e0;
  --danger: #c62828;  --danger-bg: #fbe9e7;
  --info: #1f6fd0;    --info-bg: #e3f1ff;

  /* ---- type ---- */
  --f-body: 'Roboto', -apple-system, 'Segoe UI', Arial, sans-serif;
  --f-tech: 'Chakra Petch', 'Roboto', -apple-system, 'Segoe UI', Arial, sans-serif;
  --f-mono: 'Roboto Mono', Consolas, Monaco, 'Courier New', monospace;

  /* ---- spacing (8px grid) ---- */
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px; --s6: 64px;

  --shadow-1: 0 1px 2px rgba(8, 31, 75, .05);
  --shadow-2: 0 6px 20px rgba(8, 31, 75, .10);

  --side-w: 216px;
}

/* ============================ base ============================ */
html, body { margin: 0; padding: 0; }

body {
  background: var(--app-bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }

a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blue-sea);
  outline-offset: 2px;
}

/* ============================ app shell ============================ */
.k-app { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.k-main { display: flex; flex-direction: column; min-width: 0; }

/* ---- sidebar ---- */
.k-side { background: var(--deep-sea); color: var(--snow); padding: 16px 0 32px; }
.k-side-brand { padding: 0 16px 16px; border-bottom: 1px solid rgba(255,255,255,.14); margin-bottom: 8px; }
/* align-self guards against the column-flex stretch that squashes a logo when a
   brand panel is a flex container (it caught out the sign-in page). */
.k-side-brand img { display: block; height: 30px; width: auto; align-self: flex-start; border: 0; cursor: pointer; }

.k-navgroup {
  font-family: var(--f-tech); font-size: 10px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--evening-sky); padding: 16px 16px 6px;
}

/* Server controls render as <input type=submit>; style them as nav rows. */
.k-nav {
  display: block; width: 100%; text-align: left;
  background: transparent; color: #D6E4F5;
  border: 0; border-left: 3px solid transparent;
  padding: 9px 16px; font-family: var(--f-body); font-size: 13px;
  cursor: pointer; text-decoration: none;
}
.k-nav:hover { background: rgba(182,227,255,.08); color: var(--snow); }
.k-nav.k-nav-on,
.k-nav[disabled] {
  background: rgba(182,227,255,.10);
  border-left-color: var(--iceberg);
  color: var(--snow); font-weight: 500;
}
.k-nav[disabled] { cursor: default; opacity: 1; }

/* ---- topbar ---- */
.k-top {
  display: flex; align-items: center; gap: var(--s3);
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 12px 22px; flex-wrap: wrap;
}
.k-top h1, .k-top .k-title {
  margin: 0; font-size: 19px; font-weight: 700;
  color: var(--text-strong); letter-spacing: -.01em;
}
.k-spacer { flex: 1 1 auto; }
.k-who { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-meta); }
.k-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--deep-sea); color: var(--snow);
  display: grid; place-items: center;
  font-family: var(--f-tech); font-size: 11px; font-weight: 600;
}

/* ---- content ---- */
.k-content { padding: 22px; display: flex; flex-direction: column; gap: 20px; }

/* ---- footer ---- */
.k-foot {
  margin-top: auto; background: var(--deep-sea); color: var(--evening-sky);
  padding: 14px 22px; font-family: var(--f-mono); font-size: 11px;
  display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap;
}

/* ============================ notice ============================ */
.k-notice {
  border-left: 4px solid var(--warn); background: var(--warn-bg);
  color: var(--warn); padding: 10px 14px; font-size: 13px;
}
.k-notice:empty { display: none; }

/* ============================ buttons ============================ */
.k-btn {
  display: inline-block; font-family: var(--f-body); font-size: 12.5px; font-weight: 500;
  padding: 8px 15px; border: 1px solid transparent; border-radius: 8px;
  cursor: pointer; text-decoration: none; line-height: 1.4;
  transition: filter 140ms cubic-bezier(0.2, 0, 0, 1);
}
.k-btn:hover { filter: brightness(.94); }
.k-btn-primary { background: var(--noon); color: var(--snow); }
.k-btn-secondary { background: var(--surface); color: var(--text-strong); border-color: var(--border-input); }
.k-btn-ghost { background: transparent; color: var(--text-strong); }
.k-btn[disabled] { opacity: .55; cursor: default; filter: none; }

/* ============================ cards ============================ */
.k-card { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); }
.k-card-h {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.k-card-h h2, .k-card-h h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--text-strong); }
.k-card-b { padding: 18px; }

/* ============================ KPI ============================ */
.k-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.k-kpi { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--deep-sea); padding: 14px 16px; }
.k-kpi-lab {
  font-family: var(--f-tech); font-size: 10px; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; color: var(--text-meta);
}
.k-kpi-val { font-size: 32px; font-weight: 700; color: var(--text-strong); line-height: 1.1; margin-top: 5px; font-variant-numeric: tabular-nums; }
.k-kpi-sub { font-size: 11.5px; color: var(--text-meta); margin-top: 3px; }
.k-kpi-warn { border-top-color: var(--warn); } .k-kpi-warn .k-kpi-val { color: var(--warn); }
.k-kpi-ok   { border-top-color: var(--ok); }   .k-kpi-ok .k-kpi-val   { color: var(--ok); }

/* ============================ dashboard ============================ */
/* KPI tiles are links: each number traces back to the rows that produced it. */
a.k-kpi-link { display: block; text-decoration: none; color: inherit; }
a.k-kpi-link:hover { border-color: var(--border-input); box-shadow: var(--shadow-2); }
.k-kpi-link .k-kpi-lab, .k-kpi-link .k-kpi-val, .k-kpi-link .k-kpi-sub { display: block; }

.k-slagrid { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; }
.k-slabig { font-size: 44px; font-weight: 700; line-height: 1; color: var(--ok); font-variant-numeric: tabular-nums; }
.k-statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 18px; }
.k-stat { display: flex; flex-direction: column; gap: 3px; }
.k-stat-lab { font-family: var(--f-tech); font-size: 10px; font-weight: 600; letter-spacing: .13em;
              text-transform: uppercase; color: var(--text-meta); }
.k-stat-val { font-size: 21px; font-weight: 700; color: var(--text-strong); line-height: 1.15;
              font-variant-numeric: tabular-nums; }
.k-ok-text { color: var(--ok); }
.k-bad-text { color: var(--danger); }
.k-unit { font-size: 12px; font-weight: 400; color: var(--text-meta); margin-left: 3px; }

/* Numeric matrix: figures right-aligned on tabular numerals so columns line up. */
.k-matrix td.k-r, .k-matrix th.k-r { text-align: right; }
.k-matrix td.k-r { font-family: var(--f-mono); font-variant-numeric: tabular-nums; color: var(--text-strong); }
.k-matrix td.k-tot { font-weight: 700; border-right: 1px solid var(--border); padding-right: 14px; }
.k-matrix td:first-child { font-weight: 500; color: var(--text-strong); }

@media (max-width: 820px) {
  .k-slagrid { grid-template-columns: 1fr; gap: 16px; }
}

/* ============================ status chips ============================ */
.k-chip {
  display: inline-block; font-family: var(--f-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px;
  border: 1px solid; white-space: nowrap;
}
.k-chip-new  { color: var(--info);   border-color: var(--info);   background: var(--info-bg); }
.k-chip-act  { color: var(--warn);   border-color: var(--warn);   background: var(--warn-bg); }
.k-chip-ok   { color: var(--ok);     border-color: var(--ok);     background: var(--ok-bg); }
.k-chip-bad  { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }
.k-chip-mute { color: var(--text-meta); border-color: var(--border); background: var(--surface-quiet); }

/* severity: colour bar plus the word, never colour alone */
.k-sev { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.k-sev::before { content: ""; width: 3px; height: 13px; background: currentColor; }
.k-sev-crit { color: var(--danger); } .k-sev-high { color: var(--warn); }
.k-sev-med  { color: var(--info); }   .k-sev-low  { color: var(--text-meta); }

/* ============================ page head ============================ */
.k-page-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.k-page-head h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--text-strong); letter-spacing: -.01em; }

/* ============================ severity summary ============================
   Counts lead and the proportion bar follows. A purely proportional bar hides
   the small-but-urgent: four Critical out of four hundred is a one-percent
   sliver, which is exactly the number that must not be missed. */
.k-sevwrap { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); }
.k-sevstrip { display: flex; align-items: stretch; flex-wrap: wrap; }
.k-sevcell { display: flex; align-items: center; gap: 11px; padding: 13px 20px; border-right: 1px solid var(--surface-quiet); }
.k-sevcell:last-of-type { border-right: none; }
.k-sevmark { width: 4px; align-self: stretch; min-height: 36px; background: currentColor; }
.k-sevnum { font-size: 25px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text-strong); display: block; }
.k-sevlab { font-family: var(--f-tech); font-size: 10px; font-weight: 600; letter-spacing: .13em;
            text-transform: uppercase; color: var(--text-meta); display: block; margin-top: 3px; }
.k-sevtotal { margin-left: auto; padding: 13px 20px; border-left: 1px solid var(--surface-quiet); display: flex; align-items: center; }
.k-sevdist { display: flex; height: 6px; background: var(--surface-quiet); }
.k-sevdist i { display: block; min-width: 10px; background: currentColor; }

/* The severity classes carry the colour; mark, number and bar all inherit it. */
.k-sevcell .k-sev-crit, .k-sevdist .k-sev-crit { color: var(--danger); }
.k-sevcell .k-sev-high, .k-sevdist .k-sev-high { color: var(--warn); }
.k-sevcell .k-sev-med,  .k-sevdist .k-sev-med  { color: var(--info); }
.k-sevcell .k-sev-low,  .k-sevdist .k-sev-low  { color: #9A9A90; }
.k-sevnum.k-sev-crit { color: var(--danger); }
.k-sevnum.k-sev-high { color: var(--warn); }
.k-sevnum.k-sev-med  { color: var(--info); }
.k-sevnum.k-sev-low  { color: var(--text-meta); }

/* ============================ filter panel ============================ */
.k-filterset { border: 1px solid var(--border); background: var(--surface); padding: 0 0 14px; margin: 0; }
.k-filter-toggle { padding: 12px 18px; cursor: pointer; border-bottom: 1px solid var(--border); }
.k-filter-toggle a { color: var(--text-strong) !important; text-decoration: none; font-weight: 500;
                     background: transparent !important; }

/* ============================ tables ============================
   Also styles what GridView emits, which is a plain <table>. Scoped to
   .k-table so legacy layout tables are left alone until their page is done. */
.k-scroll { overflow-x: auto; }
.k-table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--surface); }
.k-table th,
.k-table > tbody > tr:first-child > th {
  font-family: var(--f-tech); font-size: 9.5px; font-weight: 600;
  letter-spacing: .11em; text-transform: uppercase; text-align: left;
  color: var(--text-strong); padding: 8px 12px 8px 0;
  border-bottom: 2px solid var(--deep-sea); white-space: nowrap; background: var(--surface);
}
.k-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--surface-quiet); vertical-align: top; }
.k-table tr:last-child td { border-bottom: none; }
.k-table a { color: var(--link); text-decoration: none; }
.k-table a:hover { text-decoration: underline; }
.k-num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============================ forms ============================ */
.k-field { display: flex; flex-direction: column; gap: 5px; }
.k-field label,
.k-label {
  font-family: var(--f-tech); font-size: 10px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-meta);
}
.k-req { color: var(--noon); }

.k-input,
.k-form input[type="text"], .k-form input[type="password"],
.k-form input[type="email"], .k-form textarea, .k-form select {
  border: 1px solid var(--border-input); background: var(--surface);
  padding: 8px 11px; font-family: var(--f-body); font-size: 13px;
  color: var(--text); min-height: 36px; border-radius: 0;
}
.k-form textarea { min-height: 96px; line-height: 1.55; }
.k-input:focus, .k-form input:focus, .k-form textarea:focus, .k-form select:focus {
  border-color: var(--blue-sea); outline: none; box-shadow: 0 0 0 2px rgba(59,151,255,.18);
}
.k-hint { font-size: 11px; color: var(--text-meta); }
.k-hint-err { color: var(--danger); }
.k-input-bad { border-color: var(--danger); }

/* ============================ utility ============================ */
.k-meta { color: var(--text-meta); font-size: 11.5px; }
.k-strong { color: var(--text-strong); font-weight: 700; }
.k-mono { font-family: var(--f-mono); }
.k-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================ responsive ============================
   Desktop is the design target. These rules keep the shell usable on a
   narrow screen; they are not a mobile-first layout. */
@media (max-width: 900px) {
  .k-app { grid-template-columns: 1fr; }
  .k-side { padding-bottom: 12px; }
  .k-side-brand { border-bottom: none; margin-bottom: 0; }
  .k-navgroup { padding-top: 10px; }
  .k-nav { display: inline-block; width: auto; border-left: 0; border-bottom: 3px solid transparent; }
  .k-nav.k-nav-on, .k-nav[disabled] { border-left: 0; border-bottom-color: var(--iceberg); }
  .k-content { padding: 14px; }
  .k-top { padding: 12px 14px; }
}

@media print {
  .k-side, .k-top .k-btn, .k-foot { display: none !important; }
  .k-app { grid-template-columns: 1fr; }
  body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================================
   LEGACY COMPATIBILITY LAYER
   Added 2026-09-02.

   The portal carries about a dozen legacy class names across its screens —
   style2 (353 uses), tbox, tdsty, classbtn, w3-round-large and so on. Rewriting
   the markup of fifteen pages to remove them all at once would be a large,
   risky change for a purely visual gain.

   Instead these rules restyle the OLD names in the NEW language, so every
   screen picks up the design system immediately. As each page is converted
   properly its entries here become dead, and the block shrinks. It is scaffolding,
   not architecture — do not add to it for new work; use the k- classes.
   ========================================================================= */

/* ---- inputs ---- */
input.style2[type="text"], input.style2[type="password"], select.style2, textarea.style2,
input.tbox[type="text"], select.tbox, textarea.tbox,
input.txtbox[type="text"], select.txtbox,
select.drpDwn, select.drpdwn2, select.drpDwn4status,
input.width[type="text"], input.width2[type="text"], input.width4[type="text"],
input.textEntry[type="text"], input.passwordEntry[type="password"],
input.time[type="text"], input.dates[type="text"], input.start[type="text"], input.end[type="text"] {
  border: 1px solid var(--border-input); background: var(--surface);
  padding: 7px 10px; font-family: var(--f-body); font-size: 13px;
  color: var(--text); min-height: 34px; border-radius: 0; box-sizing: border-box;
}
input.style2:focus, select.style2:focus, textarea.style2:focus,
input.tbox:focus, select.tbox:focus, input.txtbox:focus,
select.drpDwn:focus, select.drpdwn2:focus {
  border-color: var(--blue-sea); outline: none; box-shadow: 0 0 0 2px rgba(59,151,255,.18);
}

/* ---- labels: the same class is used on captions, so target the rendered span ---- */
span.style2, span.lblCust, span.Text, span.label, td.tdsty span, .lblCust {
  color: var(--text); font-family: var(--f-body); font-size: 13px;
}

/* ---- buttons ---- */
input.classbtn[type="submit"], input.classbtn[type="button"],
input.btnSubmit[type="submit"], input.btnSubmit[type="button"],
a.classbtn, a.btnSubmit {
  display: inline-block; background: var(--surface); color: var(--text-strong);
  border: 1px solid var(--border-input); border-radius: 8px;
  padding: 8px 15px; font-family: var(--f-body); font-size: 12.5px; font-weight: 500;
  cursor: pointer; text-decoration: none; line-height: 1.4;
}
input.classbtn:hover, input.btnSubmit:hover { filter: brightness(.94); }
input.orange-btn[type="submit"], input.orange-btn[type="button"], a.orange-btn {
  background: var(--noon); color: var(--snow); border-color: var(--noon);
  border-radius: 8px; padding: 8px 15px; font-size: 12.5px; font-weight: 500; cursor: pointer;
}

/* ---- page headings ---- */
.Title { margin: 0 0 4px; }
.Title h2 { margin: 0; font-size: 15px; line-height: 1.15; font-weight: 700; color: var(--text-strong); letter-spacing: -.01em; }

/* ---- containers ---- */
.PageBorder, .list_table, .tbl, .tbl2, .table1, .main1, .backgrnd {
  border: 0; background: transparent;
}
fieldset.PageBorder { border: 1px solid var(--border); background: var(--surface); padding: 0 0 14px; }
.w3-round-large { border-radius: 0 !important; }
.w3-border { border: 1px solid var(--border) !important; }
td.tdsty { padding: 7px 10px; vertical-align: middle; }

/* ---- grids rendered with the old classes ---- */
.Grid { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--surface); }
.Grid td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--surface-quiet); }
.Grid th, .GridHeader th, tr.GridHeader td, tr.GridHeader th {
  font-family: var(--f-tech); font-size: 9.5px; font-weight: 600; letter-spacing: .11em;
  text-transform: uppercase; text-align: left; color: var(--text-strong);
  background: var(--surface); padding: 8px 12px 8px 0;
  border-bottom: 2px solid var(--deep-sea);
}
.GridHeader a, .Grid th a { color: var(--text-strong); text-decoration: none; }
.Paging td, tr.Paging td { padding-top: 12px; }
.Paging a, .Paging span {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px;
  border: 1px solid var(--border-input); background: var(--surface);
  font-family: var(--f-mono); font-size: 11.5px; color: var(--text-strong);
  text-decoration: none; margin-right: 4px; padding: 0 6px;
}
.Paging span { background: var(--deep-sea); color: var(--snow); border-color: var(--deep-sea); }

/* ---- validation and messages ---- */
.SpanRed, .failureNotification, .errmsg { color: var(--danger); font-size: 12px; }

/* ---- collapsible filter headers used on several screens ---- */
.header { padding: 10px 14px; cursor: pointer; }
.header a { color: var(--text-strong) !important; text-decoration: none; font-weight: 500;
            background: transparent !important; }

/* ============================ forms: multi-field layout ==================== */
/* Fields flow into as many columns as fit, so nothing has a hand-tuned pixel
   width that breaks at a different zoom or window size. */
.k-formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
              gap: 16px 20px; align-items: start; }
.k-formgrid .k-col-2 { grid-column: span 2; }
.k-formgrid .k-col-3 { grid-column: span 3; }
.k-formgrid-top { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--surface-quiet); }

.k-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.k-field .k-input, .k-field select.k-input { width: 100%; box-sizing: border-box; }

.k-textarea { min-height: 84px; resize: vertical; font-family: var(--f-body); line-height: 1.5; }
.k-readonly { background: var(--surface-quiet); color: var(--text-meta); cursor: not-allowed; }

.k-req { color: var(--danger); font-weight: 700; }
.k-hint { font-size: 11.5px; color: var(--text-meta); }
.k-err { font-size: 12px; color: var(--danger); }

.k-inline { display: flex; align-items: center; gap: 6px; }
.k-inline .k-input { flex: 1 1 auto; }
.k-inline img { flex: 0 0 auto; cursor: pointer; border: 0; }

.k-actions-bar { display: flex; justify-content: flex-end; align-items: center; gap: 10px;
                 margin: 4px 0 20px; }

/* ============================ timeline ==================================== */
/* Comments and history: one column, newest entries readable as a sequence
   rather than a three-cell table row. */
.k-timeline { list-style: none; margin: 16px 0 0; padding: 0 0 0 18px;
              border-left: 2px solid var(--surface-quiet); }
.k-timeline li { position: relative; padding: 0 0 18px 14px; }
.k-timeline li:last-child { padding-bottom: 0; }
.k-timeline li::before { content: ""; position: absolute; left: -25px; top: 4px;
                         width: 13px; height: 13px; border-radius: 50%;
                         background: var(--surface); border: 2px solid var(--blue-sea); }
.k-tl-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 3px; }
.k-tl-when { font-family: var(--f-mono); font-size: 11px; color: var(--text-meta); }
.k-tl-who { font-size: 12px; font-weight: 600; color: var(--text-strong); }
.k-tl-body { font-size: 13px; color: var(--text); line-height: 1.55; white-space: pre-wrap; }

@media (max-width: 700px) {
  .k-formgrid { grid-template-columns: 1fr; }
  .k-formgrid .k-col-2, .k-formgrid .k-col-3 { grid-column: span 1; }
}

/* ============================ two-column record layout ==================== */
/* The problem on the left, the record's metadata on the right. The aside is a
   fixed width so the form column never stretches to a full-width line length. */
.k-two-col { display: grid; grid-template-columns: minmax(0, 1fr) 336px;
             gap: 20px; align-items: start; }
.k-main-col, .k-side-col { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.k-side-col .k-card-b { padding: 16px 18px; }
.k-stack { display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 1100px) {
  .k-two-col { grid-template-columns: 1fr; }
}

/* Severity accent — same colour vocabulary as the incident list chips. */
.k-sevpick { border-left-width: 3px; }
.k-sevpick.k-sev-crit { border-left-color: var(--danger); }
.k-sevpick.k-sev-high { border-left-color: var(--warn); }
.k-sevpick.k-sev-med  { border-left-color: var(--blue-sea); }
.k-sevpick.k-sev-low  { border-left-color: var(--border-input); }

/* Attachments: a real drop target rather than a bare file input. */
.k-dropzone { margin-top: 12px; padding: 14px; border: 1px dashed var(--border-input);
              background: var(--surface-quiet); display: flex; flex-direction: column;
              gap: 10px; align-items: flex-start; }
.k-dropzone input[type="file"] { font-size: 12px; max-width: 100%; }
.k-btn-sm { padding: 5px 11px; font-size: 12px; }
.k-table-tight td, .k-table-tight th { padding: 6px 8px 6px 0; font-size: 12px; }

/* ---- About panel: label beside the field, not above it -------------------
   In the main column a label sits above its input, because those fields are
   wide and the eye reads down. The About panel is a narrow column of short
   values, so stacking the label wastes half the height. Here the label takes a
   fixed left gutter and the control fills the rest, which lines every value up
   on a single vertical edge and roughly halves the panel. */
.k-side-col .k-field {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: start;
  gap: 4px 10px;
}
.k-side-col .k-field > .k-label {
  padding-top: 9px;          /* aligns the cap-height with the input's text */
  line-height: 1.25;
  word-break: break-word;    /* "test scenario / case id" wraps, never clips */
}
/* Hints and validation messages belong under the control, not under the label. */
.k-side-col .k-field > .k-hint,
.k-side-col .k-field > .k-err,
.k-side-col .k-field > span.k-hint,
.k-side-col .k-field > span.k-err { grid-column: 2; }

.k-side-col .k-stack { gap: 10px; }

/* ============================ compact record layout ======================
   Tightens the add/edit screen so the whole record fits without scrolling on a
   normal laptop. Nothing is hidden or removed — the same fields, less air.
   Scoped to .k-two-col so list and dashboard pages keep their roomier rhythm. */

/* Six supporting fields in two tidy rows of three, rather than a 4 + 2 split
   with a divider between them. */
.k-formgrid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1400px) { .k-formgrid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .k-formgrid-3 { grid-template-columns: 1fr; } }

.k-two-col { gap: 14px; }
.k-two-col .k-main-col, .k-two-col .k-side-col { gap: 14px; }
.k-two-col .k-card-b { padding: 14px 18px; }
.k-two-col .k-card-h { padding: 10px 18px; }
.k-two-col .k-field { gap: 3px; }
.k-two-col .k-formgrid { gap: 11px 16px; }
.k-two-col .k-formgrid-top { margin-top: 13px; padding-top: 13px; }

/* Textareas keep a sane floor but no longer reserve ten rows of empty space.
   Both stay resizable, so anyone pasting a long log can still drag them open. */
.k-two-col .k-textarea { min-height: 76px; }
.k-two-col .k-textarea-sm { min-height: 54px; }

.k-two-col + .k-actions-bar { margin: 0 0 16px; }

/* ---- denser pass: fit the whole record on one laptop screen --------------
   Everything below only tightens metrics — no field is hidden, truncated or
   removed, and every control stays at a comfortable click target. Still scoped
   to .k-two-col so the list and dashboard keep their roomier rhythm. */

.k-two-col .k-input,
.k-two-col select.k-input,
.k-two-col input.k-input { min-height: 29px; padding: 4px 9px; font-size: 12.5px; }

.k-two-col .k-label { font-size: 9px; letter-spacing: .1em; line-height: 1.2; }
.k-two-col .k-hint { font-size: 11px; line-height: 1.35; }
.k-two-col .k-field { gap: 2px; }
.k-two-col .k-formgrid { gap: 9px 14px; }
.k-two-col .k-formgrid-top { margin-top: 11px; padding-top: 11px; }

.k-two-col .k-card-b { padding: 12px 16px; }
.k-two-col .k-card-h { padding: 8px 16px; }
.k-two-col .k-card-h h3 { font-size: 13px; }
.k-two-col, .k-two-col .k-main-col, .k-two-col .k-side-col { gap: 10px; }

.k-two-col .k-textarea { min-height: 62px; }
.k-two-col .k-textarea-sm { min-height: 44px; }

/* About panel: narrower gutter, and the label's top padding re-matched to the
   shorter input so captions still line up with the text inside the control. */
.k-side-col .k-field { grid-template-columns: 96px minmax(0, 1fr); gap: 3px 9px; }
.k-side-col .k-field > .k-label { padding-top: 7px; }
.k-side-col .k-stack { gap: 7px; }

/* History can grow without limit as an incident ages. Capping it keeps the
   form itself on screen; the list scrolls in place instead of the page. */
.k-two-col .k-timeline { max-height: 300px; overflow-y: auto; margin-top: 12px; }
.k-two-col .k-timeline li { padding-bottom: 13px; }

.k-page-head { margin-bottom: 10px; }

/* ---- breathing room back between stacked fields -------------------------
   .k-card-b was a plain block, so consecutive .k-field divs had no separation
   at all — a field's hint text ran straight into the next field's label. The
   earlier compaction made that collision obvious rather than causing it. */
.k-two-col .k-card-b { display: flex; flex-direction: column; gap: 13px; }
.k-two-col .k-card-b > .k-formgrid-top { margin-top: 0; padding-top: 13px; }

/* ---- About panel: two fields per row ------------------------------------
   A single column of short values wasted most of the panel's width and made it
   twice as tall as it needed to be. Labels go back above their control here —
   at ~170px per field there is no room for a side gutter — and short fields
   pair up. Product and Root cause analysis keep the full width because their
   option text is long enough to truncate at half. */
.k-side-col .k-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 12px;
  align-items: start;
}
.k-side-col .k-field {
  display: flex;            /* overrides the earlier label-beside grid */
  flex-direction: column;
  gap: 3px;
}
.k-side-col .k-field > .k-label { padding-top: 0; }
.k-side-col .k-field.k-wide { grid-column: span 2; }
.k-side-col .k-stack .k-formgrid-top { grid-column: span 2; margin-top: 2px; padding-top: 11px; }

/* The panel earns a little more width now that it carries two columns. */
.k-two-col { grid-template-columns: minmax(0, 1fr) 384px; }
@media (max-width: 1100px) { .k-two-col { grid-template-columns: 1fr; } }

/* ---- page chrome: shorter header strip ----------------------------------
   The band above the first card was three separate spacings stacked: 22px of
   content padding, a 20px flex gap, and a 10px margin under the heading. Each
   looked reasonable alone; together they cost about 50px on every page.

   Applied globally rather than to the record screen, so all pages keep the same
   chrome and only the content density differs between them. */
.k-content { padding: 15px 18px; gap: 14px; }
.k-page-head { align-items: center; margin-bottom: 0; }
.k-page-head h2 { font-size: 16px; }

/* Buttons drop to the same 29px as the inputs they sit alongside, so a control
   row reads as one line rather than two heights. Still a comfortable target. */
.k-btn { padding: 6px 13px; font-size: 12px; }
.k-btn-sm { padding: 4px 10px; font-size: 11.5px; }

@media (max-width: 900px) { .k-content { padding: 12px; gap: 12px; } }

/* ============================================================================
   LEGACY FORM STRUCTURE — lifts un-converted pages to the card look
   Added 2026-09-02.

   Several screens still carry <fieldset><table> form layouts. This makes those
   fieldsets render as cards and normalises the cells inside them, so a page
   reads as part of the same system before its markup is rewritten. It does not
   change field ORDER or placement — only markup can do that — so it is a floor,
   not a substitute for converting a page.

   Scoped under .k-content and excluded from .k-card so converted pages are
   never touched by it.
   ========================================================================= */

.k-content fieldset:not(.k-filterset) {
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow-1); padding: 0 16px 14px; margin: 0 0 14px;
}
.k-content fieldset:not(.k-filterset) > legend {
  font-family: var(--f-body); font-size: 13px; font-weight: 700;
  color: var(--text-strong); padding: 0 8px 0 0; margin-left: 0;
}

/* Form cells: consistent rhythm instead of per-cell padding-left values. */
.k-content fieldset table:not(.k-table):not(.Grid) > tbody > tr > td,
.k-content fieldset table:not(.k-table):not(.Grid) > tr > td { padding: 6px 10px 6px 0; vertical-align: middle; }

/* Inputs inside legacy forms stop carrying hand-set pixel widths that no longer
   match anything. A width attribute in the markup still wins where one was set
   deliberately, because that renders as an inline style. */
.k-content fieldset input[type="text"]:not([style*="width"]),
.k-content fieldset input[type="password"]:not([style*="width"]),
.k-content fieldset select:not([style*="width"]),
.k-content fieldset textarea:not([style*="width"]) { min-width: 180px; max-width: 100%; }

/* Legacy pages put their action buttons in a bare table row; give that row the
   same right-aligned treatment the converted pages use. */
.k-content .alignRight, .k-content td[align="right"] { text-align: right; }
.k-content .alignRight input[type="submit"],
.k-content .alignRight input[type="button"] { margin-left: 8px; }

/* ---- shared list/form page pieces ---------------------------------------- */
/* A read-only value shown where a field would otherwise be, so a form row still
   lines up when the value is context rather than an input. */
.k-value { font-size: 13px; color: var(--text-strong); font-weight: 500;
           min-height: 29px; display: flex; align-items: center; }
.k-link { color: var(--blue-sea); text-decoration: none; font-weight: 500; }
.k-link:hover { text-decoration: underline; }
.k-input-sm { min-height: 24px; padding: 2px 7px; font-size: 11.5px; }
.k-scroll { overflow-x: auto; }
.k-card .k-actions-bar { margin: 14px 0 0; }

/* Report surfaces rendered as raw HTML by a code-behind. */
.k-report { font-size: 12.5px; line-height: 1.6; }
.k-report table { border-collapse: collapse; width: 100%; }
.k-report th, .k-report td { padding: 7px 10px; border: 1px solid var(--border);
                             text-align: left; vertical-align: top; }
.k-report th { font-family: var(--f-tech); font-size: 9.5px; font-weight: 600; letter-spacing: .11em;
               text-transform: uppercase; color: var(--text-strong); border: 1px solid var(--border);
               border-bottom: 2px solid var(--deep-sea); }
.k-empty { color: var(--text-meta); font-size: 13px; padding: 14px 0; margin: 0; }

/* ---- checkboxes and checkbox lists --------------------------------------- */
.k-check { display: inline-flex; align-items: center; gap: 7px; min-height: 29px; font-size: 13px; }
.k-check input[type="checkbox"] { margin: 0; }
.k-check label { margin: 0; cursor: pointer; }

.k-checklist { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; }
.k-checklist label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.k-checklist input[type="checkbox"] { margin: 0; }
.k-checklist td { padding: 3px 16px 3px 0; }

/* ---- beat the legacy sheet where it still defines the same classes -------
   Custom.css defines .GridHeader twice and .Paging with a navy background and
   white text. Those produced a white-on-white header row and a navy pager strip
   of blank boxes. These rules are deliberately more specific so they win even if
   Custom.css is ever loaded after this file again. */
table.k-table tr.GridHeader th,
table.k-table tr.GridHeader td,
table.k-table th.GridHeader,
tr.GridHeader th, tr.GridHeader td {
  background: var(--surface) !important; color: var(--text-strong) !important;
  font-family: var(--f-tech); font-size: 9.5px; font-weight: 600; letter-spacing: .11em;
  text-transform: uppercase; text-align: left; padding: 8px 12px 8px 0;
  border-bottom: 2px solid var(--deep-sea);
}
tr.GridHeader th a, tr.GridHeader td a { color: var(--text-strong) !important; text-decoration: none; }

tr.Paging, tr.Paging td, table.k-table tr.Paging td {
  background: var(--surface) !important; color: var(--text) !important;
  padding-top: 12px; border: 0;
}
tr.Paging a, tr.Paging span {
  display: inline-grid; place-items: center; min-width: 25px; height: 25px; padding: 0 6px;
  border: 1px solid var(--border-input); background: var(--surface) !important;
  color: var(--text-strong) !important; font-family: var(--f-mono); font-size: 11.5px;
  text-decoration: none; margin-right: 4px;
}
tr.Paging span { background: var(--deep-sea) !important; color: var(--snow) !important;
                 border-color: var(--deep-sea); font-weight: 600; }

/* The export button was the last green control on the site. */
input.btnExportToExcel, .btnExportToExcel {
  background: var(--surface) !important; color: var(--text-strong) !important;
  border: 1px solid var(--border-input) !important; border-radius: 8px !important;
  padding: 6px 13px !important; font-family: var(--f-body) !important; font-size: 12px !important;
  font-weight: 500; cursor: pointer; height: auto !important; width: auto !important;
  background-image: none !important;
}

/* ---- incident list column widths ----------------------------------------
   Thirteen columns squeezed into the viewport gave Title about 40px, so every
   title wrapped one word per line and rows grew to ten lines tall. The table now
   claims the width it needs and the container scrolls sideways instead. */
.k-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.k-table-incidents { min-width: 1240px; }
.k-table-incidents > tbody > tr > th, .k-table-incidents > tbody > tr > td { white-space: nowrap; }
/* Title and customer are the two that genuinely need to wrap. */
.k-table-incidents > tbody > tr > td:nth-child(2) { white-space: normal; min-width: 250px; max-width: 360px; }
.k-table-incidents > tbody > tr > td:nth-child(9) { white-space: normal; min-width: 130px; max-width: 190px; }
.k-table-incidents td { vertical-align: top; }

/* ---- keep wide content inside its own scroller ---------------------------
   A flex/grid child defaults to min-width:auto, which refuses to shrink below
   its content. That is what let a 1240px table widen the page itself instead of
   scrolling inside its container, giving the whole document a horizontal bar. */
.k-main, .k-content, .k-content > *, .k-card, .k-card-b { min-width: 0; }
.k-app { max-width: 100%; overflow-x: hidden; }
.k-scroll { max-width: 100%; overflow-x: auto; }

/* ============================ tables get a full border ===================
   Requested 2026-09-02. Bottom-rules alone read as a list; with thirteen
   columns of dense data a full grid makes a row scannable across. */
.k-table { border: 1px solid var(--border); border-collapse: collapse; }
.k-table th, .k-table td { border: 1px solid var(--border); padding: 8px 11px; }
.k-table th, tr.GridHeader th, tr.GridHeader td { padding: 8px 11px !important; }
.k-table tr.Paging td { border: 0; }
.k-table-tight td, .k-table-tight th { padding: 6px 9px; }

/* ============================ advanced filter panel ======================
   The filter kept its old table layout, so labels sat flush against the panel
   edge with no padding and the captions were plain body text. This gives the
   panel real padding and treats the caption cells as design-system labels. */
.k-filterset .list_table, .k-filterset > div[id$="ContDetails"] { padding: 6px 18px 16px; }
.k-filterset .k-filter-toggle { padding: 11px 18px; border-bottom: 1px solid var(--surface-quiet); }

.tblIncidents { width: 100%; border-collapse: separate; border-spacing: 0 9px; }
.tblIncidents > tbody > tr > td { padding: 0 14px 0 0; vertical-align: middle; }

/* Caption cells are the ones holding no control. :has() is supported in every
   browser this portal targets; where it is not, captions simply stay as body
   text rather than breaking. */
.tblIncidents td:not(:has(input)):not(:has(select)):not(:has(table)):not(:has(div)):not(:has(span)) {
  font-family: var(--f-tech); font-size: 9.5px; font-weight: 600; letter-spacing: .11em;
  text-transform: uppercase; color: var(--text-meta); white-space: nowrap;
  width: 1%; padding-right: 12px;
}

/* Every control in the filter picks up the shared input look and a shared width,
   instead of the per-control pixel widths the old markup set. */
.tblIncidents input[type="text"], .tblIncidents select {
  border: 1px solid var(--border-input); background: var(--surface);
  padding: 4px 9px; min-height: 29px; font-family: var(--f-body); font-size: 12.5px;
  color: var(--text); box-sizing: border-box; width: 100%; max-width: 260px;
}
.tblIncidents input[type="text"]:focus, .tblIncidents select:focus {
  border-color: var(--blue-sea); outline: none; box-shadow: 0 0 0 2px rgba(59,151,255,.18);
}
.tblIncidents img { vertical-align: middle; margin-left: 5px; cursor: pointer; }
/* The DropDownCheckBoxes control renders its own nested table. */
.k-content .drpDwn4status, .k-content .drpDwn4status select { max-width: 260px; }

/* The From/To cells hold an input plus a calendar icon. Giving the input a flat
   width:100% left the icon no room, so it wrapped onto the next line. Reserve
   the icon's width instead of letting it fall through. */
.tblIncidents td:has(> img) input[type="text"] { width: calc(100% - 32px); max-width: 228px; }
.tblIncidents td:has(> img) img { margin-left: 5px; vertical-align: middle; }

/* ============================ tighter page-head band =====================
   Requested 2026-09-02. The header strip (title + result count + action button)
   repeats on every page, and it sat taller than it needed to: the content's
   top padding, the h2's own line box, and a header button one size larger than
   the row required stacked into ~60px above the first card.

   Trim all three. Applied globally via .k-page-head so every page loses the
   same slice of chrome and nothing below shifts inconsistently. Card internals
   and the horizontal padding are untouched. */
.k-content { padding-top: 9px; }
.k-page-head { align-items: center; gap: 10px; margin-bottom: 0; min-height: 0; }
.k-page-head h2 { font-size: 15px; line-height: 1.15; }
/* Only the button living in the header band shrinks; in-form buttons (Search,
   Clear, Save) keep their normal target size. */
.k-page-head .k-btn { padding: 4px 12px; font-size: 11.5px; min-height: 0; }

/* Pull the header strip tighter to the topbar (requested 2026-09-02). The 9px
   top padding left a visible gap above the title and action button; 4px keeps
   them clear of the topbar's border without floating. */
.k-content { padding-top: 4px; }
.k-page-head { line-height: 1.1; }
/* The space below the head must read the same 4px as the space above it, on
   every page. Whether the flex column-gap falls below the head depends on the
   page's markup: some wrap the head in an asp:Panel (it is NOT a direct flex
   child of .k-content, so no gap applies and it sat flush — the "overlap"),
   others place it straight in .k-content (the 14px gap applies, so it sat too
   far). Handle both by structure so each lands on 4px. */
.k-page-head { margin-bottom: 4px; }                    /* wrapped head: 0 gap  + 4      = 4 */
.k-content > .k-page-head { margin-bottom: -10px; }     /* direct child: 14 gap + (-10)  = 4 */
@media (max-width: 900px) { .k-content > .k-page-head { margin-bottom: -8px; } } /* 12 gap - 8 = 4 */
.k-page-head .k-btn { padding: 3px 12px; }

/* ============================================================================
   UNIFORM PAGE SPACING + TABLE INSET (decided 2026-09-02)
   One common frame for every page, whatever its markup shape.
   ============================================================================ */

/* 1 — 6px on all four sides of the content, identical top/right/bottom/left.
   Overrides the earlier 15/18 + 4px-top rules; last declaration wins. */
.k-content { padding: 6px; }

/* Header strip: 6px above (from the padding) and 6px below, on both markup
   shapes. Wrapped head gets no flex gap (0 + 6); a head that is a direct flex
   child gets the column gap (14 desktop / 12 mobile) which we cancel down to 6. */
.k-page-head { margin-bottom: 6px; }
.k-content > .k-page-head { margin-bottom: -8px; }              /* 14 gap - 8 = 6 */
@media (max-width: 900px) { .k-content > .k-page-head { margin-bottom: -6px; } } /* 12 - 6 = 6 */

/* 2 — data tables span the full card; the card body stops padding when its
   content is a grid, so the table's own cell padding is the only inset. Form
   card bodies (no .k-table inside) keep their 18px. */
.k-card-b:has(> table.k-table),
.k-card-b:has(> div > table.k-table) { padding: 0; }

/* 3 — pager alignment. GridView renders the numeric pager as an inner table in
   one cell; left at width:100% its cells spread across the row (the "1  2 ....
   3 4 5 ... Last" gap). Pin it to its content width and pack it to the left. */
tr.Paging td { text-align: left !important; }
tr.Paging td > table { width: auto !important; margin: 0 !important; }
tr.Paging td > table td { width: auto !important; border: 0 !important; padding: 0 !important; }

/* ---- common listing filter bar (Users, and any listing that adopts it) ---- */
.k-filter-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.k-filter-row .k-field { min-width: 200px; }
.k-filter-row .k-field .k-input { width: 100%; }
.k-field-actions { display: flex; gap: 8px; align-items: flex-end; }

/* ============================ grid width control =========================
   Requested 2026-09-02. Emails (no spaces) can't wrap, so they forced the
   Users and Products grids wider than the page and produced a horizontal
   scrollbar. Let ordinary grid cells wrap long tokens so the table fits its
   container. Incidents keeps its intentional nowrap + sideways scroll because
   .k-table-incidents sets white-space:nowrap, which wins over this. */
.k-table td, .k-table th { overflow-wrap: anywhere; word-break: break-word; }

/* Products carries five identical email columns; a fixed layout shares the
   width evenly and forces the emails to wrap to ~two lines instead of pushing
   the grid off-screen. Name/description get a little more, delete a little. */
.k-table-products { table-layout: fixed; }
.k-table-products th:nth-child(1), .k-table-products td:nth-child(1) { width: 11%; }
.k-table-products th:nth-child(2), .k-table-products td:nth-child(2) { width: 15%; }
.k-table-products th:nth-child(8), .k-table-products td:nth-child(8) { width: 42px; }

/* ============================ canonical control size =====================
   Requested 2026-09-02. Every text box and dropdown across the app must be the
   same size as the AddIncidents form (29px tall, 4/9 padding, 12.5px). The base
   .k-input is 36px and legacy forms used their own sizes, so controls differed
   page to page. This one rule, scoped to .k-content, normalises them all —
   including legacy inputs that carry an inline width. Textareas, checkboxes and
   radios are deliberately excluded so multi-line and toggle controls keep their
   own sizing. The standalone login page (outside .k-content) is unaffected. */
.k-content input[type="text"], .k-content input[type="password"],
.k-content input[type="email"], .k-content input[type="search"],
.k-content input[type="number"], .k-content input[type="tel"],
.k-content input[type="url"], .k-content input[type="date"],
.k-content select {
  min-height: 29px; height: 29px; padding: 4px 9px; font-size: 12.5px;
  font-family: var(--f-body); color: var(--text); box-sizing: border-box;
  border: 1px solid var(--border-input); background: var(--surface);
  border-radius: 0; vertical-align: middle;
}
/* Keep the small in-grid dropdown variant genuinely small where it is used
   inside a table cell (it would otherwise inherit 29px and stretch rows). */
.k-table .k-input-sm, .k-table select.k-input-sm { min-height: 24px; height: 24px; padding: 2px 7px; font-size: 11.5px; }

/* ============================ advanced filter redesign ===================
   Requested 2026-09-02: the panel read as ragged (each control sized to its own
   content) with a big empty gap before the grid. Fixed table layout makes the
   three control columns equal; controls fill their column; the actions sit on
   their own left-aligned row; trailing space is trimmed. */
.tblIncidents { table-layout: fixed; border-spacing: 0 9px; }
.tblIncidents > tbody > tr > td { padding: 0 16px 0 0; }
.tblIncidents > tbody > tr > td:nth-child(odd)  { width: 98px; }   /* label columns */
.tblIncidents > tbody > tr > td:nth-child(even) { width: auto; }   /* control columns share evenly */

/* controls fill their column instead of a fixed 260px cap */
.tblIncidents input[type="text"], .tblIncidents select { max-width: none; }
.tblIncidents td:has(> img) input[type="text"] { width: calc(100% - 30px); max-width: none; }

/* the multiselect pickers stretch to the column width like the other controls */
.k-content .drpDwn, .k-content .drpDwn4status { display: inline-block; width: 100%; max-width: none; }
.k-content .drpDwn > table, .k-content .drpDwn4status > table,
.k-content .drpDwn span, .k-content .drpDwn4status span { max-width: 100%; }

/* actions on their own row, left-aligned, minimal extra height */
.k-filter-actions { padding: 6px 0 0 !important; text-align: left; }
.k-filter-actions .k-btn { margin-right: 8px; }

/* trim the empty space between the filter and the grid */
.k-filterset { padding-bottom: 10px; }
.k-filterset .list_table, .k-filterset > div[id$="ContDetails"] { padding: 8px 18px 10px; }

/* ============================ lift legacy WebForms forms =================
   Requested 2026-09-02: pages not yet reskinned still show blue-gradient image
   buttons (button2.jpg), #d0e1f5 fieldsets and navy Arial-Narrow titles. These
   rules restyle those legacy elements in place. CSS !important wins because the
   legacy inline styles are not themselves !important. Scoped to legacy markers
   (.label / inline button image) so real .k-btn controls are untouched. */
.k-content input.label[type="submit"], .k-content input.label[type="button"],
.k-content input[type="submit"][style*="button"], .k-content input[type="button"][style*="button"],
.k-content input[type="image"][src*="button"] {
  background: var(--deep-sea) !important; background-image: none !important; color: var(--snow) !important;
  border: 1px solid var(--deep-sea) !important; border-radius: 8px !important;
  padding: 6px 14px !important; width: auto !important; height: auto !important; min-height: 30px !important;
  font-family: var(--f-body) !important; font-size: 12px !important; font-weight: 500 !important;
  letter-spacing: 0 !important; cursor: pointer !important; box-shadow: none !important;
}
/* a "Cancel"/"Clear" legacy button reads as secondary */
.k-content input.label[value*="Cancel"], .k-content input.label[value*="cancel"],
.k-content input[type="button"][value*="Cancel"][style*="button"] {
  background: var(--surface) !important; color: var(--text-strong) !important;
  border: 1px solid var(--border-input) !important;
}

/* Legacy fieldsets with an inline #d0e1f5 border -> quiet card surface. */
.k-content fieldset[style*="d0e1f5"] {
  border: 1px solid var(--border) !important; background: var(--surface);
  padding: 14px 16px; margin: 0; box-shadow: var(--shadow-1);
}
.k-content fieldset[style*="d0e1f5"] > legend {
  font-family: var(--f-tech); font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-strong); padding: 0 6px;
}

/* Legacy navy Arial-Narrow section titles -> house heading. */
.k-content [style*="arial narrow" i] h2, .k-content td[style*="#014294"] h2 {
  color: var(--text-strong) !important; font-family: var(--f-body) !important;
  font-size: 16px !important; font-weight: 700 !important;
}

/* Legacy navy table-header rows (inline "#0a4d94" + aliceblue text) — seen on
   the SLA matrix and similar hand-built tables — restyled to the house header
   look. Attribute selector + !important beats the non-important inline style. */
.k-content tr[style*="0a4d94"] { background: var(--surface-quiet) !important; }
/* Border lives on the CELL only (at its bottom); the label span must NOT carry
   its own border or it underlines its first line and collides with wrapped text. */
.k-content tr[style*="0a4d94"] > td, .k-content tr[style*="0a4d94"] > th {
  border-bottom: 2px solid var(--deep-sea) !important; vertical-align: bottom !important;
  padding: 7px 10px !important; background: var(--surface-quiet) !important;
}
.k-content tr[style*="0a4d94"] .header {
  color: var(--text-strong) !important; font-family: var(--f-tech) !important;
  font-size: 9.5px !important; font-weight: 600 !important; letter-spacing: .1em !important;
  text-transform: uppercase !important; border-bottom: 0 !important; text-decoration: none !important;
  cursor: default !important; display: inline-block; line-height: 1.3;
}

/* ============================ polish pass 2026-09-02 ====================== */

/* Inline label + hint (Email copy to, Detail) so the helper text shares the
   label's line instead of adding a row. */
.k-label-inline { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.k-label-inline .k-label { margin: 0; }
.k-label-inline .k-hint { font-size: 11px; font-weight: 400; }

/* 2-column form grid (the Build version / Due date pair moved into About). */
.k-formgrid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Attachments: drop the dead space in the dropzone. */
.k-dropzone { margin-top: 8px !important; padding: 10px 12px !important; }

/* Advanced filter — no empty band when collapsed, tighter when expanded. */
.k-filterset { padding: 0 !important; }
.k-filter-toggle { padding: 9px 18px !important; }
.k-filterset .list_table, .k-filterset > div[id$="ContDetails"] { padding: 10px 18px 12px !important; }
.tblIncidents { border-spacing: 0 7px; }

/* User listing filter — compact so it stops eating vertical space. */
.k-card-b:has(> .k-filter-row) { padding: 12px 18px; }
.k-filter-row { gap: 12px; align-items: flex-end; }
.k-filter-row .k-field { min-width: 170px; gap: 3px; }

/* DropDownCheckBoxes (Status/Type/Priority/Severity/Client) render as
   div.dd_chk_select with a #caption inside and were ~18px and unbordered —
   out of step with the 29px inputs. Give the box the same look, a caret, and a
   proper popover so every filter control matches. */
.k-content .dd_chk_select {
  display: inline-flex !important; align-items: center; width: 100%;
  min-height: 29px; height: 29px; box-sizing: border-box; border-radius: 0;
  border: 1px solid var(--border-input); background: var(--surface) !important;
  background-image: none !important; padding: 4px 26px 4px 9px; position: relative;
  cursor: pointer; font-size: 12.5px; color: var(--text);
}
.k-content .dd_chk_select > div[id="caption"], .k-content .dd_chk_select > div:first-child {
  flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.k-content .dd_chk_select::after {
  content: ""; position: absolute; right: 10px; top: 50%; margin-top: -2px; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--text-meta); pointer-events: none;
}
.k-content .dd_chk_drop {
  border: 1px solid var(--border); background: var(--surface) !important; box-shadow: var(--shadow-1);
  z-index: 50; padding: 6px 8px; min-width: 100%; max-height: 260px; overflow: auto;
}
.k-content .dd_chk_drop span { display: block; padding: 2px 0; font-size: 12.5px; white-space: nowrap; }

/* Add/edit user form: a contained 3-column form reads better than six fields
   stretched across the whole page. */
.k-form-narrow { max-width: 940px; }

/* ============================ FORM & FILTER STANDARD =====================
   The one layout every data-entry surface follows (2026-09-03). A field is a
   label ABOVE its control (.k-field); fields flow in a responsive grid
   (.k-formgrid). Filters use ~4-6 columns, edit forms ~2-3. All controls are
   29px (see canonical control size). No page hand-rolls a <table> form again.
   ------------------------------------------------------------------------ */
.k-filter-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 18px; }
.k-filter-grid .k-field { min-width: 0; }
/* a lone DropDownCheckBoxes inside a k-inline wrapper (Client name) still fills */
.k-field .k-inline { display: flex; gap: 6px; align-items: center; }
.k-field .k-inline > .dd_chk_select { flex: 1 1 auto; }
.k-filter-actions { display: flex; gap: 8px; align-items: center; padding: 4px 0 0; }

/* Explicit column counts for forms that want a fixed shape (collapse on narrow). */
.k-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.k-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .k-cols-2, .k-cols-3 { grid-template-columns: 1fr; } }

/* ---- standard radio / checkbox controls (SLA type selector, etc.) -------- */
.k-content input[type="radio"], .k-content input[type="checkbox"] {
  width: 15px; height: 15px; margin: 0 6px 0 0; vertical-align: middle;
  accent-color: var(--deep-sea); cursor: pointer;
}
.k-content .k-radio-row label, .k-content input[type="radio"] + label { font-size: 13px; }
/* RadioButtonList renders an inline table; give its options room to breathe. */
.k-content table td label, .k-content .style2 label { margin-right: 18px; }

/* SLA tables must align to the content edge like every other surface. */
.k-content .table1 { margin-left: 0 !important; width: 100%; }

/* Polish 2026-09-03 */
/* Advanced filter — tighter still, so expanding it pushes the grid down less. */
.k-filter-grid { gap: 8px 16px; }
.k-filter-grid .k-field { gap: 2px; }
.k-filterset .list_table, .k-filterset > div[id$="ContDetails"] { padding: 8px 18px 10px !important; }

/* Attachments card — no dead space above the dropzone. */
.k-dropzone { margin-top: 0 !important; }

/* Info icon with tooltip — the standard way to attach a hint to a field label
   without pushing the control down or breaking grid alignment. Hover shows the
   native tooltip (title/ToolTip). */
.k-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--border-input);
  color: var(--text-meta); background: var(--surface); font-family: var(--f-body);
  font-size: 9px; font-weight: 700; font-style: normal; line-height: 1; cursor: help;
  text-transform: none; letter-spacing: 0; flex: none;
}
.k-info:hover { border-color: var(--blue-sea); color: var(--blue-sea); }
.k-label-inline { flex-wrap: nowrap; }

/* Polish 2026-09-03 (round 2) */
/* Products checklist as a clean 4-column table (was Flow, so it wrapped raggedly). */
.k-checklist { display: table; border-collapse: separate; border-spacing: 0; }
.k-checklist td { padding: 4px 26px 4px 0; white-space: nowrap; font-size: 13px; vertical-align: middle; }
.k-checklist label { margin: 0 0 0 2px; }

/* Attachments: pull the dropzone up to cover the white space under the header. */
.k-attach-card .k-card-h { padding: 8px 18px 6px; }
.k-attach-card .k-card-b { padding-top: 0px !important; }
.k-attach-card .k-dropzone { margin-top: 0 !important; }

/* History timeline: sit the entries closer to the markers (less dead left gap). */
.k-two-col .k-timeline { margin-top: 8px; }
.k-timeline { padding-left: 12px; }
.k-timeline li { padding-left: 10px; }
.k-timeline li::before { left: -20px; }
