/* Kevlar web kit: the client's A4 "graphite twill" design kit (design/kevlar-ui, KevlarTheme / KevlarPainters) for the
   Kevlar sites (dashboard, release notes). Every colour, font and shape below is the client's own; edit the client's
   kit first and copy the change here. Served from /assets/kevlar.css. */

@font-face { font-family: "Saira Stencil One"; src: url("/assets/SairaStencilOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; src: url("/assets/BarlowCondensed-SemiBold.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; src: url("/assets/BarlowCondensed-Bold.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Barlow"; font-weight: 400; src: url("/assets/Barlow-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Barlow"; font-weight: 500; src: url("/assets/Barlow-Medium.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Barlow"; font-weight: 600; src: url("/assets/Barlow-SemiBold.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; src: url("/assets/IBMPlexMono-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; src: url("/assets/IBMPlexMono-Medium.ttf") format("truetype"); font-display: swap; }

:root {
  /* surfaces */
  --backing: #070807; --ground: #0e100d; --field: #141613; --card: #1c1f1b; --tile: #252823; --patch: #30342e;
  --stitch: #3e4239; --divider: #282b26;
  /* text */
  --text: #e4e6df; --text-soft: #bcc1b6; --muted: #8f948b; --dim: #525550; --ink: #0f110c;
  /* accents */
  --olive: #5c6b3a; --olive-hi: #6f7f48; --olive-lo: #414c2a; --olive-text: #879757; --ok: #929e75;
  --brass: #c2a65e; --coyote: #bfae80; --rust: #b8653f; --rust-text: #e8a07a; --steel: #9db7c2;
  --dot-running: #7e9a3e; --dot-waiting: #e0b23c; --dot-failed: #d9502e;
  --section-ink: #cdbd8e; --selected-top: #4a4431; --selected-bottom: #2b2920; --selected-ink: #f0e8d2;
  --hover-top: #2a2d28; --hover-bottom: #181b17;
  /* fonts */
  --f-title: "Saira Stencil One", "Barlow Condensed", system-ui, sans-serif;
  --f-label: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  /* shapes */
  --radius: 10px; --chamfer: 6px;
  --chamfer-shape: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer));
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  color: var(--text); font: 400 14px/1.45 var(--f-body);
  /* the ground painter: base, twill at 128 px, then a darkening wash */
  background-color: #0c0e0b;
  background-image: linear-gradient(rgba(7, 8, 7, .47), rgba(7, 8, 7, .67)), url("/assets/twill.png");
  background-size: auto, 128px 128px; background-attachment: fixed;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brass); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid rgba(194, 166, 94, .67); outline-offset: 2px; }
::selection { background: var(--patch); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.gp { color: var(--brass); font-family: var(--f-mono); }
.bad { color: var(--rust-text); }
.ok-text { color: var(--ok); }
.mono { font-family: var(--f-mono); }

/* ---- type ---------------------------------------------------------------------------------------------------------- */
.k-title { font-family: var(--f-title); text-transform: uppercase; letter-spacing: .05em; font-weight: 400; }
.k-label { font-family: var(--f-label); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: 13px; }
.k-small { font-family: var(--f-label); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: 11px; color: var(--muted); }

/* ---- header (twill, olive wash, darkening, 2 px brass rule) ---------------------------------------------------------- */
.k-header {
  position: sticky; top: 0; z-index: 5;
  background-color: #0c0e0b;
  background-image: linear-gradient(rgba(7, 8, 7, .16), rgba(7, 8, 7, .47)), linear-gradient(rgba(56, 63, 44, .47), rgba(56, 63, 44, .47)), url("/assets/twill.png");
  background-size: auto, auto, 128px 128px;
  border-bottom: 2px solid var(--brass);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand .k-title { font-size: 20px; line-height: 1; }
.brand .sub { font-family: var(--f-label); font-weight: 700; letter-spacing: .14em; font-size: 13px; color: var(--brass); margin-left: 2px; }

/* ---- cards ---------------------------------------------------------------------------------------------------------- */
.card {
  position: relative; min-width: 0;
  background: linear-gradient(#191c18, #131512);
  border: 2px solid var(--backing); border-radius: var(--radius);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .43), inset 0 1px 0 rgba(232, 240, 226, .09);
  padding: 14px 12px 12px;
}
.card h3, .section-head {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-family: var(--f-label); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--section-ink);
}
.card h3::after, .section-head::after { content: ""; flex: 1; height: 1px; background: var(--stitch); }
.card h3 .gp, .card h3 .muted { letter-spacing: 0; text-transform: none; font-family: var(--f-mono); font-weight: 400; }

/* stat tile: chamfered, tile gradient */
.stat {
  clip-path: var(--chamfer-shape);
  background: linear-gradient(#21231f, #181a16); box-shadow: inset 0 1px 0 rgba(232, 240, 226, .1);
  padding: 9px 12px; min-height: 48px;
}
.stat small { display: block; font-family: var(--f-label); font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat b { display: block; font: 500 20px/1.25 var(--f-mono); color: var(--text); margin-top: 2px; }

/* ---- buttons: chamfered, vertical gradient, bevel highlight and lip --------------------------------------------------- */
.btn, .primary, .ghost, .danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 16px; border: 0; clip-path: var(--chamfer-shape);
  font-family: var(--f-label); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 var(--bevel, rgba(236, 244, 230, .14)), inset 0 -2px 0 rgba(0, 0, 0, .31);
}
.primary { --top: var(--olive-hi); --bottom: var(--olive-lo); --bevel: rgba(236, 244, 230, .39); background: linear-gradient(var(--top), var(--bottom)); color: var(--ink); }
.primary:hover:not(:disabled) { --top: #9eb566; }
.btn, .ghost { --top: #363a33; --bottom: #232622; background: linear-gradient(var(--top), var(--bottom)); color: var(--text); }
.btn:hover:not(:disabled), .ghost:hover:not(:disabled) { --top: #4d5248; }
.danger { --top: #4a3424; --bottom: #2e2117; --bevel: rgba(255, 220, 190, .14); background: linear-gradient(var(--top), var(--bottom)); color: var(--rust-text); }
.danger:hover:not(:disabled) { --top: #694a33; }
.btn:active:not(:disabled), .primary:active:not(:disabled), .ghost:active:not(:disabled), .danger:active:not(:disabled) {
  background: linear-gradient(var(--bottom), var(--top)); padding-top: 2px;
}
.btn:disabled, .primary:disabled, .ghost:disabled, .danger:disabled { color: var(--dim); cursor: default; filter: saturate(.4); }
.quiet { background: none; border: 0; color: var(--muted); font-family: var(--f-label); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.quiet:hover { color: var(--text); }

/* ---- inputs (wells) ------------------------------------------------------------------------------------------------- */
.field, .search, select {
  height: 36px; padding: 0 10px; color: var(--text); caret-color: var(--brass);
  background: var(--backing); border: 1px solid var(--patch); border-radius: 6px;
  box-shadow: inset 0 6px 6px -6px rgba(0, 0, 0, .59);
}
.field:focus, .search:focus, select:focus { outline: none; border-color: rgba(194, 166, 94, .67); }
select { padding-right: 28px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--brass) 50%), linear-gradient(135deg, var(--brass) 50%, transparent 50%);
  background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
option { background: var(--card); color: var(--text); }
input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0 6px 0 0; vertical-align: -3px;
  background: var(--backing); border: 1.5px solid var(--patch); border-radius: 5px; display: inline-grid; place-items: center; }
input[type="checkbox"]:checked { background: var(--olive); border-color: var(--olive-hi); }
input[type="checkbox"]:checked::after { content: ""; width: 4px; height: 8px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }

/* ---- tabs / segmented controls: chamfered well, selected plate with brass underline ---------------------------------- */
.seg { display: inline-flex; gap: 2px; padding: 4px; background: var(--backing); clip-path: var(--chamfer-shape); }
.seg button, .tab {
  position: relative; height: 28px; padding: 0 13px; border: 0; background: none; color: var(--muted);
  font-family: var(--f-label); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
}
.seg button:hover, .tab:hover { color: var(--text); }
.seg button.on, .tab.on {
  color: var(--selected-ink); background: linear-gradient(var(--selected-top), var(--selected-bottom));
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
.seg button.on::after, .tab.on::after { content: ""; position: absolute; left: 5px; right: 5px; bottom: 2px; height: 2px; background: var(--brass); }
.seg small { color: var(--dim); margin-left: 5px; font-family: var(--f-mono); letter-spacing: 0; }
.seg button.on small { color: var(--coyote); }

/* ---- pills, chips, status dots ---------------------------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 11px 0 9px; border-radius: 12px; white-space: nowrap;
  background: var(--tile); border: 2px solid var(--backing);
  font-family: var(--f-label); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.chip.run { color: #a6bf63; } .chip.run::before { background: var(--dot-running); box-shadow: 0 0 6px rgba(126, 154, 62, .8); }
.chip.idle { color: var(--dot-waiting); } .chip.idle::before { background: var(--dot-waiting); box-shadow: 0 0 6px rgba(224, 178, 60, .6); }
.chip.fail { color: var(--rust-text); } .chip.fail::before { background: var(--dot-failed); box-shadow: 0 0 6px rgba(217, 80, 46, .7); }
.pill, .badge {
  display: inline-flex; align-items: center; height: 18px; padding: 0 8px; border-radius: 9px; margin: 0 5px 5px 0;
  background: var(--tile); border: 1px solid var(--backing);
  font-family: var(--f-label); font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--olive-text);
}
.badge.bad { color: var(--rust-text); } .badge.warn { color: var(--dot-waiting); } .badge.ok { color: var(--olive-text); }

/* ---- progress bars ----------------------------------------------------------------------------------------------------- */
.track, .prog { height: 7px; border-radius: 4px; background: var(--backing); overflow: hidden; }
.fill, .prog > div { height: 100%; border-radius: 4px; min-width: 7px; background: linear-gradient(90deg, var(--olive-lo), var(--olive-hi)); }

/* ---- tables ----------------------------------------------------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
td, th { padding: 7px 6px; border-bottom: 1px solid var(--divider); text-align: left; }
th { font-family: var(--f-label); font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.r { text-align: right; font-variant-numeric: tabular-nums; }
td.r { font-family: var(--f-mono); font-size: 12.5px; }
tfoot th { color: var(--text); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; }
.kv dt, .kv dd { padding: 6px 0; border-bottom: 1px solid var(--divider); }
.kv dt { color: var(--text-soft); padding-right: 14px; }
.kv dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; font-family: var(--f-mono); font-size: 12.5px; }

.empty { color: var(--muted); padding: 40px 20px; text-align: center; border: 1px dashed var(--stitch); border-radius: var(--radius); background: rgba(7, 8, 7, .35); }
