/* SOVRA × Group-IB — design tokens and every shared page component.
   App chrome (rail, top bar, sub-nav, footer, palette, auth layout) lives in shell.css. */

/* ───────────────────────── 1. Tokens ───────────────────────── */
:root {
  --bg:#0C0F16; --bg-1:#0F121B; --bg-2:#121622;
  --rail:#090B11; --topbar:#0B0E15;
  --surface:#151924; --surface-2:#1A1F2C; --surface-3:#212737; --surface-4:#2A3144;
  --glass:rgba(26,31,46,.72); --glass-2:rgba(34,40,58,.8);
  --line:rgba(255,255,255,.06); --line-2:rgba(255,255,255,.1); --line-3:rgba(255,255,255,.18);
  --line-blue:rgba(61,107,255,.38);
  --text:#F2F4F8; --text-2:#A7ADBB; --text-3:#7B8293; --text-4:#596071;
  --malicious:#F0505F; --trusted:#3FBF8A; --unknown-v:#8A91A3;
  --blue:#003CF5; --blue-2:#0A2FFF; --blue-3:#0721B5; --blue-glow:#2D6BFF; --sky:#8DCAFE;
  --lav:#A3A9F7; --lav-2:#868CD6; --ice:#B9BDDF;
  --pink:#FF2D78; --red:#FF4D5E; --peach:#FFB59A; --amber:#FFB547; --green:#32AE88; --mint:#4BE3B0; --cyan:#3CD4FF; --violet:#8B5CFF;
  --series-1:#2D6BFF; --series-2:#3CD4FF; --series-3:#FF2D78; --series-4:#FFB547; --series-5:#32AE88; --series-6:#8B5CFF; --series-7:#FFB59A; --series-8:#A3A9F7;
  --unknown:#5E6478;
  --radius-xs:6px; --radius-sm:8px; --radius:12px; --radius-lg:16px; --radius-xl:24px; --radius-2xl:28px;
  --font-display:'Inter Tight',Inter,system-ui,sans-serif; --font-ui:Inter,system-ui,sans-serif; --font-mono:'JetBrains Mono',ui-monospace,monospace;
  --shadow-float:0 30px 80px -20px rgba(0,0,0,.8), 0 0 0 1px var(--line-2);
  --glow-blue:0 0 0 1px rgba(61,107,255,.55), 0 0 28px -4px rgba(45,107,255,.55);
  --glow-pink:0 0 0 1px rgba(255,45,120,.55), 0 0 28px -4px rgba(255,45,120,.55);
  --rail-w:88px; --topbar-h:60px;

  /* internal helpers (not part of the contract) */
  --ease:cubic-bezier(.2,.7,.2,1);
  --hi:inset 0 1px 0 rgba(255,255,255,.045);
}

/* Severity → colour, usable on any element with data-sev (records, matrix cells, timeline, rows). */
[data-sev] { --sev: var(--unknown-v); }
[data-sev="crit"] { --sev: var(--malicious); }
[data-sev="warn"] { --sev: var(--amber); }
[data-sev="ok"] { --sev: var(--trusted); }
[data-sev="info"] { --sev: var(--blue-glow); }
[data-sev="neutral"] { --sev: var(--unknown-v); }

/* ───────────────────────── 2. Base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font: 400 13.5px/20px var(--font-ui);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
img, video, canvas { display: block; max-width: 100%; }
svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); color: var(--text); letter-spacing: 0; }
h1 { font-size: 28px; line-height: 34px; font-weight: 600; }
h2 { font-size: 17px; line-height: 24px; font-weight: 600; }
h3 { font-size: 14px; line-height: 20px; font-weight: 600; }
h4, h5, h6 { font-size: 13px; line-height: 18px; font-weight: 600; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
small { font-size: 12px; line-height: 16px; }
b, strong { font-weight: 600; }
a { color: var(--sky); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
code, kbd, samp { font-family: var(--font-mono); font-size: .9em; }
code { color: var(--ice); }
kbd {
  display: inline-flex; align-items: center; height: 18px; padding: 0 5px;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px;
  background: var(--surface-2); color: var(--text-2); font-size: 10.5px; line-height: 1;
}
hr { border: 0; height: 1px; background: var(--line-2); margin: 16px 0; }
::selection { background: rgba(45,107,255,.42); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: var(--surface-4) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-4); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
:focus-visible { outline: 2px solid var(--blue-glow); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

/* Icons from the shell sprite */
.gib-i {
  width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: -3px;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.gib-i.sm { width: 12px; height: 12px; vertical-align: -1px; }
.gib-i.lg { width: 20px; height: 20px; }

/* ───────────────────────── 3. Layout ───────────────────────── */
.gib-main { display: block; min-width: 0; position: relative; }
.gib-page { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 28px 32px 48px; }
.gib-page > .gib-head + .gib-tabs { margin-top: -4px; }

.gib-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; min-width: 0; }
.gib-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gib-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gib-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gib-grid.cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.gib-grid > * { min-width: 0; }
.gib-grid > .span-3 { grid-column: span 3; }
.gib-grid > .span-4 { grid-column: span 4; }
.gib-grid > .span-5 { grid-column: span 5; }
.gib-grid > .span-6 { grid-column: span 6; }
.gib-grid > .span-7 { grid-column: span 7; }
.gib-grid > .span-8 { grid-column: span 8; }
.gib-grid > .span-9 { grid-column: span 9; }
.gib-grid > .span-12 { grid-column: 1 / -1; }

.gib-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; }
.gib-stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gib-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.gib-split > * { min-width: 0; }
.gib-sep { border: 0; height: 1px; background: var(--line-2); margin: 16px 0; flex: none; }
:is(.gib-row, .gib-toolbar, .gib-actions) > .gib-sep { width: 1px; height: 20px; margin: 0 2px; }
.gib-push { margin-left: auto; }

/* ───────────────────────── 4. Page header ───────────────────────── */
.gib-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: end; }
.gib-head > * { grid-column: 1; min-width: 0; }
.gib-head > .gib-actions { grid-column: 2; grid-row: 1 / span 3; align-self: end; }
.gib-head > .gib-tabs { grid-column: 1 / -1; margin-top: 14px; }
.gib-eyebrow {
  display: block; margin: 0 0 6px;
  font: 500 11px/14px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3);
}
.gib-eyebrow b, .gib-eyebrow strong { color: var(--sky); font-weight: 500; }
.gib-eyebrow .gib-i { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.gib-title {
  margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 34px; letter-spacing: -.012em;
  font-weight: 300; color: var(--lav);
}
.gib-title b, .gib-title strong { font-weight: 600; color: var(--text); }
.gib-title span { font-weight: 300; color: var(--lav); }
.gib-lead { margin: 6px 0 0; max-width: 780px; color: var(--text-2); font-size: 13.5px; line-height: 20px; }
.gib-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }

/* ───────────────────────── 5. Tabs with count pills ───────────────────────── */
.gib-tabs {
  display: flex; align-items: stretch; gap: 22px; min-width: 0;
  border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
}
.gib-tabs::-webkit-scrollbar { display: none; }
.gib-tab {
  position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 9px 0 11px; margin: 0; border: 0; background: none;
  color: var(--text-2); font: 500 13.5px/20px var(--font-ui); white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: color .15s var(--ease);
}
.gib-tab:hover { color: var(--text); text-decoration: none; }
.gib-tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0;
  background: var(--blue-glow); box-shadow: 0 0 12px rgba(45,107,255,.8); transform: scaleX(0); transition: transform .2s var(--ease);
}
.gib-tab:is([aria-current="page"], [aria-current="true"], [aria-selected="true"], .is-active) { color: var(--sky); }
.gib-tab:is([aria-current="page"], [aria-current="true"], [aria-selected="true"], .is-active)::after { transform: scaleX(1); }
.gib-tab .gib-i { width: 15px; height: 15px; }
.gib-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 6px;
  border-radius: 999px; background: var(--surface-3); color: var(--text-2);
  font: 600 11px/18px var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.gib-tab:is([aria-current="page"], [aria-current="true"], [aria-selected="true"], .is-active) .gib-count { background: rgba(45,107,255,.22); color: var(--sky); }

/* ───────────────────────── 6. Toolbar: search, chips, select, segmented ───────────────────────── */
.gib-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.gib-toolbar > .gib-search { flex: 1 1 280px; }
.gib-toolbar-l { color: var(--text-3); font-size: 12.5px; white-space: nowrap; }

.gib-search { position: relative; display: flex; align-items: center; min-width: 0; height: 34px; }
.gib-search > .gib-i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.gib-search > input, input.gib-search {
  width: 100%; height: 34px; padding: 0 12px 0 34px; min-width: 0;
  background: var(--surface) ; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  color: var(--text); font-size: 13.5px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input.gib-search {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237B8293' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 11px 50%; background-size: 16px;
}
.gib-search > input::placeholder, input.gib-search::placeholder { color: var(--text-4); }
.gib-search > input:hover, input.gib-search:hover { border-color: var(--line-3); }
.gib-search > input:focus, input.gib-search:focus { border-color: var(--blue-glow); box-shadow: 0 0 0 3px rgba(45,107,255,.18); }
.gib-search > kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.gib-search > input::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.4); }

.gib-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface-2);
  color: var(--text-2); font: 500 12.5px/1 var(--font-ui); white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.gib-chip:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.gib-chip[aria-pressed="true"], .gib-chip.is-active {
  background: rgba(45,107,255,.16); border-color: var(--line-blue); color: var(--sky);
}
.gib-chip .gib-count { height: 16px; min-width: 18px; font-size: 10.5px; }
.gib-chip .gib-i { width: 14px; height: 14px; }

.gib-select {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 30px 0 10px; max-width: 100%;
  -webkit-appearance: none; appearance: none;
  border: 1px solid var(--line-2); border-radius: 7px; color: var(--text);
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A7ADBB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 8px center / 14px;
  font: 500 12.5px/1 var(--font-ui); white-space: nowrap; cursor: pointer; text-overflow: ellipsis;
}
.gib-select:hover { border-color: var(--line-3); }
.gib-select:focus { border-color: var(--blue-glow); outline: none; box-shadow: 0 0 0 3px rgba(45,107,255,.18); }
.gib-select option { background: var(--surface-2); color: var(--text); }
.gib-select .gib-muted { font-weight: 400; }

.gib-seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px; flex: none; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg-2);
}
.gib-seg > :is(button, a, label) {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; flex: none;
  border: 0; border-radius: 6px; background: transparent; color: var(--text-2);
  font: 500 12.5px/1 var(--font-ui); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
}
.gib-seg > :is(button, a, label):hover { color: var(--text); background: rgba(255,255,255,.04); text-decoration: none; }
.gib-seg > :is([aria-pressed="true"], [aria-selected="true"], [aria-current="page"], [aria-current="true"], .is-active),
.gib-seg > label:has(input:checked) {
  background: rgba(45,107,255,.22); color: #fff; box-shadow: inset 0 0 0 1px var(--line-blue), 0 0 14px -6px var(--blue-glow);
}
.gib-seg input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.gib-seg .gib-i { width: 14px; height: 14px; }

/* ───────────────────────── 7. Surfaces ───────────────────────── */
.gib-card {
  position: relative; min-width: 0;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--hi);
}
.gib-card-h {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 48px;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.gib-card-h > :is(h2, h3, h4) { font-size: 15px; line-height: 22px; }
.gib-card-h > h3 { font-size: 14px; }
.gib-card-h > .gib-actions, .gib-card-h > .gib-seg:last-child, .gib-card-h > .gib-select:last-child,
.gib-card-h > .gib-btn:last-child, .gib-card-h > .gib-icon-btn:last-child, .gib-card-h > .gib-legend-chips:last-child { margin-left: auto; }
.gib-card-h > .gib-tabs { border-bottom: 0; align-self: stretch; margin-bottom: -12px; }
.gib-card-b { padding: 14px; min-width: 0; }
.gib-card-f {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 9px 14px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; line-height: 16px;
}
.gib-card > .gib-tabs { padding: 0 14px; }
.gib-card-h + .gib-card-b:has(> .gib-table-wrap:only-child) { padding: 0; }

.gib-card.is-flat { background: var(--bg-1); box-shadow: none; border-color: var(--line); }
.gib-card.is-glow, .is-glow {
  border-color: rgba(61,107,255,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px rgba(61,107,255,.2), 0 0 34px -10px rgba(45,107,255,.6);
}
.is-glass, .gib-card.is-glass {
  background:
    linear-gradient(180deg, rgba(141,170,255,.07), rgba(141,170,255,0) 36%),
    linear-gradient(160deg, rgba(40,52,92,.62) 0%, rgba(23,28,44,.82) 45%, rgba(16,20,31,.9) 100%);
  border-color: rgba(150,170,255,.17);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 -1px 0 rgba(45,107,255,.16),
    0 22px 44px -22px rgba(0,0,0,.85), 0 0 40px -24px rgba(45,107,255,.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.25); backdrop-filter: blur(16px) saturate(1.25);
}
.is-glass .gib-card-h { border-bottom-color: rgba(150,170,255,.1); }
.gib-caption { margin: 8px 0 0; color: var(--text-3); font-size: 12px; line-height: 16px; }
.gib-caption b { color: var(--text-2); font-weight: 500; }

/* Showcase — login/register/gallery only: electric-blue panel holding a tilted product shot */
.gib-showcase {
  position: relative; overflow: hidden; isolation: isolate; min-width: 0;
  padding: 36px; border-radius: var(--radius-xl); color: #fff; perspective: 1600px;
  background:
    radial-gradient(90% 70% at 88% 6%, rgba(141,202,254,.38), transparent 55%),
    radial-gradient(80% 90% at 0% 100%, rgba(7,20,120,.95), transparent 60%),
    linear-gradient(135deg, #1D4DFF 0%, var(--blue) 46%, var(--blue-3) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 40px 90px -40px rgba(0,60,245,.65);
}
.gib-showcase::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 1px, transparent 1px 13px);
  -webkit-mask: linear-gradient(180deg, #000, transparent 70%); mask: linear-gradient(180deg, #000, transparent 70%);
}
.gib-showcase :is(h1, h2, h3) { color: #fff; }
.gib-showcase p { color: rgba(255,255,255,.78); }
.gib-tilt {
  position: relative; transform-style: preserve-3d; transform-origin: 30% 50%;
  transform: rotateY(18deg) rotateX(9deg) rotateZ(-2deg);
  border-radius: 14px; background: var(--bg); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), inset 0 1px 0 rgba(255,255,255,.12), -50px 60px 90px -30px rgba(0,6,60,.85);
  transition: transform .9s var(--ease);
}
.gib-showcase:hover .gib-tilt { transform: rotateY(11deg) rotateX(6deg) rotateZ(-1deg); }

/* ───────────────────────── 8. Drawers (P3/P4 stacked detail drawers) ───────────────────────── */
.gib-drawers { position: relative; min-width: 0; }
.gib-drawers:has(> .gib-drawer:not([hidden])) { min-height: 560px; }
.gib-drawers::before {
  content: ""; position: absolute; inset: 0; z-index: 19; pointer-events: none; border-radius: var(--radius);
  background: rgba(6,8,14,.62); opacity: 0; transition: opacity .2s var(--ease);
}
.gib-drawers:has(> .gib-drawer:not([hidden]))::before { opacity: 1; pointer-events: auto; }
.gib-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 20;
  width: min(100%, max(640px, 78%)); display: flex; flex-direction: column; min-width: 0;
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: -56px 0 70px -28px rgba(0,0,0,.9), -1px 0 0 rgba(255,255,255,.04), inset 0 1px 0 rgba(255,255,255,.04);
  animation: gib-drawer-in .26s var(--ease) both;
}
.gib-drawer.is-second {
  z-index: 22; width: min(100%, max(520px, 52%));
  background: var(--surface);
  box-shadow: -60px 0 70px -24px rgba(0,0,0,.92), inset 0 1px 0 rgba(255,255,255,.05);
}
@keyframes gib-drawer-in { from { transform: translateX(28px); opacity: 0; } }
.gib-drawer-h {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0;
  padding: 14px 18px 12px; border-bottom: 1px solid var(--line);
}
.gib-drawer-h > :is(h2, h3) { font-size: 19px; line-height: 26px; font-weight: 600; }
.gib-drawer-h > .gib-actions { margin-left: auto; gap: 4px; }
.gib-drawer-h > .gib-tabs { border-bottom: 0; align-self: stretch; margin: -14px 0 -13px 10px; gap: 18px; }
.gib-drawer-h > .gib-tabs .gib-tab { padding: 16px 0 15px; }
.gib-drawer-h > p, .gib-drawer-h > .gib-meta { flex-basis: 100%; margin: 0; color: var(--text-3); font-size: 12.5px; }
.gib-drawer > .gib-tabs { padding: 0 18px; }
.gib-drawer > .gib-tabs .gib-tab { font-size: 13px; }
.gib-drawer-b { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px 18px 24px; }
.gib-drawer-b > :not(:first-child) { margin-top: 14px; }
.gib-drawer-handle {
  position: absolute; left: -13px; top: 50%; transform: translateY(-50%); z-index: 2;
  display: grid; place-items: center; width: 13px; height: 44px; padding: 0;
  border: 1px solid var(--line-2); border-right: 0; border-radius: 7px 0 0 7px;
  background: var(--surface-3); color: var(--text-2); cursor: pointer;
}
.gib-drawer-handle:hover { background: var(--surface-4); color: var(--text); }
.gib-drawer-handle .gib-i { width: 12px; height: 12px; }

/* ───────────────────────── 9. 3D stage (P2 canvas with product chrome) ───────────────────────── */
.gib-stage {
  position: relative; overflow: hidden; isolation: isolate; min-width: 0;
  height: var(--stage-h, 420px);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(45,107,255,.13), transparent 70%),
    radial-gradient(50% 45% at 78% 100%, rgba(139,92,255,.10), transparent 70%),
    radial-gradient(rgba(255,255,255,.045) 1px, transparent 1.2px) 0 0 / 22px 22px,
    linear-gradient(180deg, #0D1019 0%, #0A0C13 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), inset 0 0 80px rgba(0,0,0,.45);
}
.gib-card > .gib-stage { border: 0; border-radius: 0; }
.gib-card > .gib-stage:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.gib-card > .gib-stage:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.gib-card > .gib-stage:only-child { border-radius: var(--radius); }
.gib-stage > canvas { position: absolute; inset: 0; display: block; }
.gib-stage > :is(.gib-legend-chips, .gib-viewtoggle, .gib-stage-ctrl, .gib-stage-cap) { z-index: 3; }

.gib-legend-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.gib-stage > .gib-legend-chips { position: absolute; top: 12px; right: 12px; justify-content: flex-end; max-width: calc(100% - 24px); }
.gib-legend-chips > * {
  --c: var(--text-3);
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border: 1px solid var(--line-2); border-radius: 6px; background: rgba(21,25,36,.84);
  color: var(--text-2); font: 500 11.5px/1 var(--font-ui); white-space: nowrap;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.gib-legend-chips > :not(:has(.gib-dot))::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); flex: none;
}
.gib-legend-chips > button { cursor: pointer; }
.gib-legend-chips > button:hover { color: var(--text); border-color: var(--line-3); }
.gib-legend-chips > [aria-pressed="false"] { opacity: .45; }
.gib-legend-chips b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.gib-viewtoggle {
  display: inline-flex; gap: 2px; padding: 3px; max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none;
  border: 1px solid var(--line-2); border-radius: 9px; background: rgba(15,18,27,.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 30px -10px rgba(0,0,0,.7);
}
.gib-stage > .gib-viewtoggle { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); }
.gib-viewtoggle > :is(button, a) {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; flex: none;
  border: 0; border-radius: 6px; background: transparent; color: var(--text-2);
  font: 500 12.5px/1 var(--font-ui); white-space: nowrap; text-decoration: none; cursor: pointer;
}
.gib-viewtoggle > :is(button, a):hover { color: var(--text); text-decoration: none; }
.gib-viewtoggle > :is([aria-pressed="true"], [aria-selected="true"], [aria-current="true"], .is-active) {
  background: var(--surface-4); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px var(--line-2);
}

:where(.gib-stage-label) {
  position: absolute; pointer-events: none; white-space: nowrap;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(12,15,22,.72); color: var(--text-2); font: 500 11px/1.25 var(--font-ui);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
:where(.gib-stage-label b) { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
:where(.gib-stage-label.is-plain) { background: none; border: 0; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; text-shadow: 0 1px 6px rgba(0,0,0,.9); }

.gib-stage-ctrl {
  position: absolute; right: 12px; bottom: 14px; display: flex; flex-direction: column; gap: 2px; padding: 3px;
  border: 1px solid var(--line-2); border-radius: 9px; background: rgba(15,18,27,.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.gib-stage-ctrl .gib-icon-btn { width: 28px; height: 28px; border-radius: 6px; }
.gib-stage-cap {
  position: absolute; left: 14px; bottom: 14px; max-width: min(46%, 420px); margin: 0;
  color: var(--text-3); font-size: 11.5px; line-height: 16px; pointer-events: none;
  text-shadow: 0 1px 8px rgba(0,0,0,.9);
}
.gib-stage-cap b, .gib-stage-cap strong { color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ───────────────────────── 10. KPI tiles ───────────────────────── */
.gib-kpi {
  position: relative; min-width: 0; display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  grid-template-areas: "l l l" "v d viz" "f f f";
  column-gap: 8px; align-items: end;
  padding: 14px 16px 12px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--hi);
}
.gib-kpi-l { grid-area: l; margin-bottom: 6px; color: var(--text-2); font-size: 12.5px; line-height: 16px; font-weight: 500; }
.gib-kpi-v {
  grid-area: v; font-family: var(--font-display); font-size: 38px; line-height: 42px; font-weight: 600;
  letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.gib-kpi-v small { margin-left: 3px; font-size: 15px; line-height: 1; font-weight: 400; letter-spacing: 0; color: var(--text-3); }
.gib-kpi > .gib-delta { grid-area: d; align-self: start; margin-top: 2px; }
.gib-kpi-v > .gib-delta { position: relative; top: -16px; margin-left: 6px; letter-spacing: 0; }
.gib-kpi-viz { grid-area: viz; justify-self: end; align-self: end; width: 100%; max-width: 150px; height: 42px; min-width: 0; }
.gib-kpi-viz > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.gib-kpi-f {
  grid-area: f; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line);
  color: var(--text-3); font-size: 11.5px; line-height: 16px;
}
.gib-kpi-f b { color: var(--text-2); font-weight: 500; }
.gib-delta {
  display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 999px;
  background: var(--surface-3); color: var(--text-2);
  font: 600 11.5px/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.gib-delta.up { color: var(--mint); background: rgba(75,227,176,.12); box-shadow: inset 0 0 0 1px rgba(75,227,176,.22); }
.gib-delta.down { color: #FF6E9E; background: rgba(255,45,120,.12); box-shadow: inset 0 0 0 1px rgba(255,45,120,.25); }
.gib-delta.flat { color: var(--text-2); background: var(--surface-3); }

/* ───────────────────────── 11. Records (P1 alert cards) ───────────────────────── */
.gib-records { display: flex; flex-direction: column; gap: 8px; min-width: 0; perspective: 1400px; perspective-origin: 30% 50%; }
.gib-record {
  --sev: var(--unknown-v);
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 11px 14px 12px 18px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); box-shadow: var(--hi);
  transform-style: preserve-3d; transition: transform .28s var(--ease), background .15s, border-color .15s, box-shadow .28s var(--ease);
}
.gib-record[data-sev="crit"] { --sev: var(--malicious); }
.gib-record[data-sev="warn"] { --sev: var(--amber); }
.gib-record[data-sev="ok"] { --sev: var(--trusted); }
.gib-record[data-sev="info"] { --sev: var(--blue-glow); }
.gib-record[data-sev="neutral"] { --sev: var(--unknown-v); }
.gib-record::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 10px 0 0 10px;
  background: var(--sev); opacity: .9;
}
[data-select-list] .gib-record, .gib-record[tabindex], a.gib-record { cursor: pointer; }
a.gib-record { color: inherit; text-decoration: none; }
.gib-record:hover { background: var(--surface-2); border-color: var(--line-2); }
.gib-record.is-selected {
  z-index: 2; transform: translate3d(-6px, 0, 22px);
  border-color: rgba(255,45,120,.34);
  background:
    linear-gradient(90deg, rgba(255,45,120,.13) 0%, rgba(45,107,255,.10) 32%, rgba(45,107,255,.03) 70%, transparent),
    var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 26px 50px -22px rgba(0,0,0,.95),
    -10px 0 34px -12px rgba(255,45,120,.55), 0 0 0 1px rgba(255,45,120,.12);
}
.gib-record.is-selected::before {
  width: 3px; background: linear-gradient(180deg, #FF7AAA, var(--pink) 40%, var(--pink));
  opacity: 1; box-shadow: 0 0 10px 1px var(--pink), 0 0 26px 2px rgba(255,45,120,.65);
}
.gib-record-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.gib-record-h > .gib-check { margin-right: 4px; }
.gib-record-b {
  display: grid; gap: 10px 22px; min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr) auto;
}
.gib-record-b > * { min-width: 0; }
.gib-record-title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 3px; min-width: 0;
  color: var(--text); font: 600 14px/20px var(--font-ui);
}
.gib-record-title > .gib-i { color: var(--sev); }
.gib-record-b p, .gib-record > p { margin: 0 0 7px; color: var(--text-2); font-size: 12.5px; line-height: 18px; }
.gib-record .gib-row { gap: 5px; }
.gib-record .gib-meta + .gib-row { margin-top: 5px; }

/* Counters: right-aligned label/number pairs (dl dt/dd, or div > span + b) */
.gib-counters {
  display: grid; grid-template-columns: max-content auto; align-content: start; justify-content: end;
  gap: 6px 16px; margin: 0; min-width: 120px; font-size: 12.5px; line-height: 20px;
}
.gib-counters > :not(dt, dd) { display: contents; }
.gib-counters dt, .gib-counters span { color: var(--text-2); margin: 0; }
.gib-counters dd, .gib-counters b {
  justify-self: end; margin: 0; min-width: 24px; height: 20px; padding: 0 6px; border-radius: 5px;
  background: var(--surface-3); color: var(--text); text-align: center;
  font: 600 12px/20px var(--font-display); font-variant-numeric: tabular-nums;
}
.gib-counters dd.is-empty, .gib-counters b.is-empty { background: transparent; color: var(--text-3); font-weight: 400; font-family: var(--font-ui); padding: 0; }

/* ───────────────────────── 12. Tables ───────────────────────── */
.gib-table-wrap {
  position: relative; max-width: 100%; min-width: 0; overflow: auto;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface);
}
.gib-card .gib-table-wrap { border-color: var(--line); background: transparent; }
.gib-card-b:has(> .gib-table-wrap:only-child) > .gib-table-wrap { border: 0; border-radius: 0 0 var(--radius) var(--radius); }
.gib-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 13px; line-height: 18px; color: var(--text-2); font-variant-numeric: tabular-nums;
}
.gib-table caption { caption-side: bottom; padding: 8px 12px; text-align: left; color: var(--text-3); font-size: 12px; }
.gib-table th {
  position: sticky; top: 0; z-index: 1;
  padding: 9px 12px; border-bottom: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--text-3); font-weight: 500; font-size: 12px; text-align: left; white-space: nowrap;
}
.gib-table th[aria-sort] { cursor: pointer; }
.gib-table th[aria-sort="ascending"]::after { content: " ↑"; color: var(--sky); }
.gib-table th[aria-sort="descending"]::after { content: " ↓"; color: var(--sky); }
.gib-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.gib-table tbody tr:last-child td { border-bottom: 0; }
.gib-table td:first-child { color: var(--text); }
.gib-table :is(td, th).num { text-align: right; font-family: var(--font-display); white-space: nowrap; }
.gib-table td.num { color: var(--text); }
.gib-table tbody tr { transition: background .12s; }
.gib-table tbody tr:hover td { background: rgba(255,255,255,.025); }
.gib-table tr[data-id] { cursor: pointer; }
.gib-table tr[data-sev] td:first-child { box-shadow: inset 3px 0 0 var(--sev); }
.gib-table tr.is-selected td { background: rgba(45,107,255,.11); }
.gib-table tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--blue-glow); }
.gib-table td.is-missing { color: var(--text-4); font-style: italic; }

/* ───────────────────────── 13. Badges, pills, chips ───────────────────────── */
.gib-badge, .gib-pill {
  --c: var(--unknown-v);
  display: inline-flex; align-items: center; gap: 5px; flex: none; max-width: 100%;
  height: 20px; padding: 0 7px; border-radius: 5px; border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  background: color-mix(in srgb, var(--c) 14%, transparent); color: color-mix(in srgb, var(--c) 78%, #fff);
  font: 500 11.5px/1 var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gib-badge .gib-i, .gib-pill .gib-i { width: 12px; height: 12px; }
.gib-pill { height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; }
.gib-badge.neutral, .gib-pill:not(.crit, .warn, .ok, .info, [class*="method-"], [style*="--c"]) {
  background: var(--surface-3); border-color: var(--line-2); color: var(--text-2);
}
:is(.gib-badge, .gib-pill).crit { --c: var(--malicious); }
:is(.gib-badge, .gib-pill).warn { --c: var(--amber); }
:is(.gib-badge, .gib-pill).ok { --c: var(--trusted); }
:is(.gib-badge, .gib-pill).info { --c: var(--blue-glow); color: #A9C3FF; }
:is(.gib-badge, .gib-pill).method-social { --c: var(--series-1); color: #A9C3FF; }
:is(.gib-badge, .gib-pill).method-controlled { --c: var(--series-2); }
:is(.gib-badge, .gib-pill).method-product { --c: var(--series-6); color: #C2AEFF; }
:is(.gib-badge, .gib-pill).method-process { --c: var(--series-4); }
:is(.gib-badge, .gib-pill).method-video { --c: var(--series-3); }
:is(.gib-badge, .gib-pill).method-probability { --c: var(--series-5); color: #7FE3BF; }
:is(.gib-badge, .gib-pill)[class*="method-"]::before {
  content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--c); box-shadow: 0 0 6px var(--c); flex: none;
}

.gib-dot { --c: var(--text-3); display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 70%, transparent); }

.gib-src {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; height: 22px; padding: 0 7px;
  border-radius: 5px; background: rgba(45,107,255,.12); border: 1px solid rgba(61,107,255,.16);
  color: #B7CBFF; font: 500 11.5px/1 var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gib-src > span:first-child { color: var(--text-3); font-family: var(--font-ui); flex: none; }
a.gib-src:hover, button.gib-src:hover { background: rgba(45,107,255,.2); text-decoration: none; }
button.gib-src { cursor: pointer; }
.gib-tag {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 22px; padding: 0 8px;
  border-radius: 5px; background: var(--surface-3); border: 1px solid var(--line-2);
  color: var(--text-2); font: 500 11.5px/1 var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gib-tag .gib-i { width: 12px; height: 12px; color: var(--text-3); }

/* ───────────────────────── 14. Buttons ───────────────────────── */
.gib-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: none;
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font: 600 13px/1 var(--font-ui); white-space: nowrap; text-decoration: none; cursor: pointer; user-select: none;
  box-shadow: var(--hi); transition: background .15s, border-color .15s, box-shadow .2s, color .15s, transform .1s;
}
.gib-btn:hover { background: var(--surface-3); border-color: var(--line-3); text-decoration: none; color: var(--text); }
.gib-btn:active { transform: translateY(1px); }
.gib-btn .gib-i { width: 16px; height: 16px; }
.gib-btn.primary {
  background: var(--blue); border-color: rgba(120,150,255,.35); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 18px -8px rgba(0,60,245,.9);
}
.gib-btn.primary:hover { background: var(--blue-2); border-color: rgba(150,175,255,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.24), var(--glow-blue); }
.gib-btn.ghost { background: transparent; border-color: rgba(61,107,255,.75); color: var(--text); box-shadow: none; }
.gib-btn.ghost:hover { background: rgba(45,107,255,.12); border-color: var(--blue-glow); box-shadow: 0 0 18px -6px var(--blue-glow); }
.gib-btn.quiet { background: transparent; border-color: transparent; color: var(--sky); box-shadow: none; padding: 0 10px; }
.gib-btn.quiet:hover { background: rgba(255,255,255,.05); }
.gib-btn.danger { background: rgba(255,77,94,.12); border-color: rgba(255,77,94,.42); color: #FF8A95; box-shadow: none; }
.gib-btn.danger:hover { background: rgba(255,77,94,.2); border-color: var(--red); color: #FFB1B8; }
.gib-btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; gap: 6px; }
.gib-btn.sm .gib-i { width: 14px; height: 14px; }
.gib-btn.lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 10px; }
.gib-btn:disabled, .gib-btn[aria-disabled="true"] { opacity: .42; pointer-events: none; }
.gib-btn .gib-count { background: rgba(255,255,255,.14); color: inherit; }

.gib-icon-btn {
  display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text-2);
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.gib-icon-btn:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.gib-icon-btn:is([aria-pressed="true"], [aria-expanded="true"], .is-active) { background: rgba(45,107,255,.16); color: var(--sky); border-color: var(--line-blue); }
.gib-icon-btn.sm { width: 26px; height: 26px; border-radius: 6px; }
.gib-icon-btn.sm .gib-i { width: 14px; height: 14px; }
.gib-icon-btn:disabled { opacity: .4; pointer-events: none; }

/* ───────────────────────── 15. Forms ───────────────────────── */
.gib-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.gib-field > label:not(.gib-radio-card, .gib-check, .gib-switch), .gib-field > .gib-label, .gib-field legend { color: var(--text-2); font-size: 12.5px; line-height: 16px; font-weight: 500; padding: 0; }
.gib-field > label:not(.gib-radio-card) .gib-muted { font-weight: 400; }
:is(.gib-field :is(input:not([type=checkbox], [type=radio], [type=range]), select, textarea), .gib-input) {
  width: 100%; min-width: 0; height: 36px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg-2); color: var(--text);
  font-size: 13.5px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.gib-field textarea, textarea.gib-input { height: auto; min-height: 96px; padding: 9px 12px; line-height: 20px; resize: vertical; }
.gib-field select, select.gib-input {
  -webkit-appearance: none; appearance: none; padding-right: 32px; cursor: pointer;
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A7ADBB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
}
:is(.gib-field :is(input, select, textarea), .gib-input)::placeholder { color: var(--text-4); }
:is(.gib-field :is(input:not([type=checkbox], [type=radio], [type=range]), select, textarea), .gib-input):hover { border-color: var(--line-3); }
:is(.gib-field :is(input:not([type=checkbox], [type=radio], [type=range]), select, textarea), .gib-input):focus {
  border-color: var(--blue-glow); background: var(--surface); box-shadow: 0 0 0 3px rgba(45,107,255,.18);
}
:is(.gib-field :is(input, select, textarea), .gib-input):disabled { opacity: .5; cursor: not-allowed; }
.gib-field.is-invalid :is(input, select, textarea), .gib-field [aria-invalid="true"], .gib-input[aria-invalid="true"] {
  border-color: rgba(255,77,94,.75); box-shadow: 0 0 0 3px rgba(255,77,94,.12);
}
.gib-hint { margin: 0; color: var(--text-3); font-size: 12px; line-height: 16px; }
.gib-error { display: flex; align-items: center; gap: 6px; margin: 0; color: #FF8A95; font-size: 12px; line-height: 16px; }
.gib-error::before {
  content: "!"; display: inline-grid; place-items: center; width: 14px; height: 14px; flex: none; border-radius: 50%;
  background: rgba(255,77,94,.2); color: var(--red); font: 700 10px/1 var(--font-ui);
}
fieldset.gib-field { border: 0; margin: 0; padding: 0; }

/* Checkbox */
input.gib-check, .gib-check > input[type="checkbox"], .gib-radio-card > input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: none; width: 16px; height: 16px; margin: 0;
  border: 1.5px solid var(--line-3); border-radius: 4px; background: transparent; cursor: pointer;
  display: inline-grid; place-content: center; vertical-align: -3px; transition: background .12s, border-color .12s;
}
input.gib-check:hover, .gib-check > input[type="checkbox"]:hover { border-color: var(--text-3); }
input.gib-check:checked, .gib-check > input[type="checkbox"]:checked, .gib-radio-card > input[type="checkbox"]:checked,
input.gib-check:indeterminate, .gib-check > input[type="checkbox"]:indeterminate {
  border-color: var(--blue-glow); background: var(--blue) no-repeat center / 12px;
  box-shadow: 0 0 10px -2px rgba(45,107,255,.8);
}
input.gib-check:checked, .gib-check > input[type="checkbox"]:checked, .gib-radio-card > input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.2 3 3 6-6.4'/%3E%3C/svg%3E");
}
input.gib-check:indeterminate, .gib-check > input[type="checkbox"]:indeterminate {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 8h8'/%3E%3C/svg%3E");
}
label.gib-check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; cursor: pointer; }
label.gib-check:hover { color: var(--text); }

/* Switch */
.gib-switch { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.gib-switch > input {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 34px; height: 20px; margin: 0;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-4); cursor: pointer; transition: background .18s, border-color .18s, box-shadow .18s;
}
.gib-switch > input::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: #C9CEDA; box-shadow: 0 1px 3px rgba(0,0,0,.5); transition: transform .18s var(--ease), background .18s;
}
.gib-switch > input:checked { background: var(--blue); border-color: rgba(120,150,255,.5); box-shadow: 0 0 14px -3px rgba(45,107,255,.8); }
.gib-switch > input:checked::before { transform: translateX(14px); background: #fff; }
.gib-switch:hover { color: var(--text); }
.gib-switch > input:disabled { opacity: .45; }

/* Radio card */
.gib-radio-card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 4px 10px; min-width: 0;
  padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface);
  color: var(--text-2); font-size: 12.5px; line-height: 18px; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .2s;
}
.gib-radio-card:hover { border-color: var(--line-3); background: var(--surface-2); }
.gib-radio-card > input[type="radio"], .gib-field input[type="radio"] {
  -webkit-appearance: none; appearance: none; flex: none; width: 16px; height: 16px; margin: 2px 0 0;
  border: 1.5px solid var(--line-3); border-radius: 50%; background: transparent; cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
.gib-radio-card > input[type="radio"]:checked, .gib-field input[type="radio"]:checked {
  border-color: var(--blue-glow); background: radial-gradient(circle, #fff 0 3px, var(--blue) 3.5px); box-shadow: 0 0 10px -2px rgba(45,107,255,.9);
}
.gib-radio-card :is(b, strong, .gib-radio-card-t) { display: block; color: var(--text); font-size: 13.5px; line-height: 20px; font-weight: 600; }
.gib-radio-card small { display: block; color: var(--text-3); }
.gib-radio-card:has(input:checked) {
  border-color: rgba(61,107,255,.6); background: linear-gradient(180deg, rgba(45,107,255,.12), rgba(45,107,255,.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 0 26px -10px rgba(45,107,255,.7);
}
.gib-radio-card:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.gib-radio-card:has(input:focus-visible) { outline: 2px solid var(--blue-glow); outline-offset: 2px; }

/* Stepper */
.gib-steps {
  counter-reset: gib-step; display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none;
  min-width: 0; overflow-x: auto; scrollbar-width: none;
}
.gib-step {
  counter-increment: gib-step; display: flex; align-items: center; flex: 1 1 0; min-width: max-content;
  gap: 9px; color: var(--text-3); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.gib-step:last-child { flex: none; }
.gib-step::before {
  content: counter(gib-step); display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line-3); color: var(--text-3); font: 600 11.5px/1 var(--font-display); font-variant-numeric: tabular-nums;
}
.gib-step:not(:last-child)::after { content: ""; flex: 1 1 24px; min-width: 16px; height: 1px; margin: 0 12px; background: var(--line-2); }
.gib-step small { display: block; margin-top: 1px; color: var(--text-4); font-size: 11px; font-weight: 400; }
.gib-step a { color: inherit; text-decoration: none; }
.gib-step.is-done { color: var(--text-2); }
.gib-step.is-done::before { content: "✓"; border-color: rgba(50,174,136,.6); background: rgba(50,174,136,.16); color: var(--mint); }
.gib-step.is-done::after { background: linear-gradient(90deg, rgba(50,174,136,.6), rgba(45,107,255,.5)); }
.gib-step.is-active { color: var(--text); }
.gib-step.is-active::before { border-color: transparent; background: var(--blue); color: #fff; box-shadow: 0 0 0 3px rgba(45,107,255,.22), 0 0 16px rgba(45,107,255,.6); }

/* Range */
.gib-range {
  --value: .5; -webkit-appearance: none; appearance: none; width: 100%; height: 20px; margin: 0; background: transparent; cursor: pointer;
}
.gib-range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--blue) 0, var(--blue-glow) calc(var(--value) * 100%), var(--surface-4) calc(var(--value) * 100%));
}
.gib-range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--surface-4); }
.gib-range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--blue-glow); }
.gib-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue-glow); box-shadow: 0 0 0 4px rgba(45,107,255,.18), 0 0 12px rgba(45,107,255,.7);
}
.gib-range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--blue-glow); }
.gib-range:focus-visible { outline: none; }
.gib-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(45,107,255,.4), 0 0 14px rgba(45,107,255,.9); }

/* ───────────────────────── 16. Panels ───────────────────────── */
.gib-inspector {
  position: sticky; top: calc(var(--topbar-h) + 16px); align-self: start; min-width: 0;
  max-height: calc(100vh - var(--topbar-h) - 32px); overflow: auto;
  padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--hi);
}
.gib-inspector > .gib-card-h:first-child { margin: -14px -16px 14px; padding-inline: 16px; }
.gib-inspector > .gib-card-b { padding: 0; }
.gib-inspector > :not(:first-child) { margin-top: 14px; }
.gib-inspector > .gib-card-h:first-child + * { margin-top: 0; }

.gib-kv { display: grid; grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); gap: 7px 20px; margin: 0; font-size: 13px; line-height: 18px; }
.gib-kv > :not(dt, dd) { display: contents; }
.gib-kv dt { color: var(--text-3); margin: 0; }
.gib-kv dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.gib-kv dd.gib-mono, .gib-kv dd .gib-mono { color: var(--ice); }

.gib-list { list-style: none; margin: 0; padding: 0; min-width: 0; }
.gib-list > li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.gib-list > li:last-child { border-bottom: 0; }
.gib-list > li > :is(a, button):only-child {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; margin: -9px -10px; padding: 9px 10px;
  border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; text-decoration: none;
}
.gib-list > li > :is(a, button):only-child:hover { background: var(--surface-2); }
.gib-list > li.is-selected { box-shadow: inset 2px 0 0 var(--blue-glow); padding-left: 10px; background: rgba(45,107,255,.07); }
.gib-list .gib-meta:last-child { margin-left: auto; }

/* Matrix (P5 MITRE grid) */
.gib-matrix {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(158px, 1fr); gap: 10px;
  min-width: 0; overflow-x: auto; padding-bottom: 4px;
}
.gib-matrix-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gib-matrix-col > :first-child:not(.gib-matrix-cell), .gib-matrix-h {
  display: flex; align-items: center; gap: 6px; margin: 0 0 4px; padding: 0 2px;
  color: var(--text); font: 600 12.5px/18px var(--font-ui); white-space: nowrap;
}
.gib-matrix-cell {
  --sev: var(--unknown-v);
  position: relative; display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 44px;
  padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-left: 0; border-radius: 6px;
  background: var(--surface-2); color: var(--text); text-align: left; text-decoration: none;
  font: 500 12.5px/16px var(--font-ui); transition: background .15s, box-shadow .15s;
}
.gib-matrix-cell::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 6px 0 0 6px; background: var(--sev); }
.gib-matrix-cell[data-sev="crit"] { --sev: var(--malicious); }
.gib-matrix-cell[data-sev="warn"] { --sev: var(--amber); }
.gib-matrix-cell[data-sev="ok"] { --sev: var(--trusted); }
.gib-matrix-cell[data-sev="info"] { --sev: var(--blue-glow); }
.gib-matrix-cell > :last-child:not(:first-child) {
  margin-left: auto; color: var(--text-2); font: 600 12.5px/16px var(--font-display); font-variant-numeric: tabular-nums;
}
:is(button, a).gib-matrix-cell { cursor: pointer; }
.gib-matrix-cell:hover { background: var(--surface-3); text-decoration: none; }
.gib-matrix-cell:is(.is-selected, [aria-pressed="true"]) {
  background: var(--surface-3); box-shadow: 0 0 0 1px color-mix(in srgb, var(--sev) 55%, transparent), 0 0 22px -8px var(--sev);
}
.gib-matrix-cell.is-empty { background: transparent; border-style: dashed; color: var(--text-4); }

/* Tree (P4 process tree) */
.gib-tree { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; min-width: 0; font-size: 13px; }
.gib-tree-row {
  --depth: 0;
  position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 36px;
  padding: 5px 10px 5px calc(10px + var(--depth) * 20px);
  border-bottom: 1px solid var(--line); color: var(--text);
  background-image: repeating-linear-gradient(90deg, transparent 0 9px, var(--line-2) 9px 10px, transparent 10px 20px);
  background-size: calc(var(--depth) * 20px) 100%; background-position: 10px 0; background-repeat: no-repeat;
}
.gib-tree-row::before {
  content: ""; position: absolute; top: 50%; height: 1px; background: var(--line-2);
  left: calc(19px + (var(--depth) - 1) * 20px); width: calc(min(var(--depth), 1) * 9px);
}
.gib-tree-row:hover { background-color: var(--surface-2); }
.gib-tree-row.is-selected, .gib-tree-row[aria-selected="true"] { background-color: rgba(45,107,255,.1); box-shadow: inset 2px 0 0 var(--blue-glow); }
.gib-tree-row > :is(b, strong, .gib-tree-name) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.gib-tree-row > .gib-muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.gib-tree-row > :not(.gib-badge) + .gib-badge { margin-left: auto; }
.gib-tree-row > .gib-src { flex: none; height: 20px; }
.gib-tree-row > button[aria-expanded] {
  display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: -4px; padding: 0; flex: none;
  border: 0; border-radius: 4px; background: none; color: var(--text-3); cursor: pointer;
}
.gib-tree-row > button[aria-expanded]:hover { background: var(--surface-3); color: var(--text); }
.gib-tree-row > button[aria-expanded] .gib-i { width: 12px; height: 12px; transition: transform .15s; }
.gib-tree-row > button[aria-expanded="true"] .gib-i { transform: rotate(90deg); }

/* Deck (stacked 3D card deck, P-render-12) */
.gib-deck { display: grid; align-items: start; align-self: start; padding: 18px 22px 0 0; perspective: 1100px; perspective-origin: 70% 0; min-width: 0; }
.gib-deck > * { grid-area: 1 / 1; min-width: 0; transition: transform .35s var(--ease), opacity .35s; transform-origin: 50% 0; }
.gib-deck > :nth-child(1) { z-index: 3; }
.gib-deck > :nth-child(2) { z-index: 2; transform: translate3d(11px, -9px, -36px); opacity: .72; pointer-events: none; }
.gib-deck > :nth-child(3) { z-index: 1; transform: translate3d(22px, -18px, -72px); opacity: .45; pointer-events: none; }
.gib-deck > :nth-child(n+4) { visibility: hidden; }
.gib-deck:hover > :nth-child(2) { transform: translate3d(15px, -13px, -36px); }
.gib-deck:hover > :nth-child(3) { transform: translate3d(30px, -26px, -72px); }

/* Quote + avatar */
.gib-quote {
  position: relative; margin: 0; padding: 14px 16px 14px 18px; min-width: 0;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2);
  box-shadow: inset 2px 0 0 var(--lav-2);
}
.gib-quote::before {
  content: "“"; position: absolute; right: 12px; top: -2px; color: var(--lav); opacity: .28;
  font: 600 48px/1 var(--font-display); pointer-events: none;
}
.gib-quote blockquote, blockquote.gib-quote > p, .gib-quote > p { margin: 0; color: var(--text); font-size: 14px; line-height: 22px; }
.gib-quote blockquote { padding-right: 18px; }
.gib-quote :is(figcaption, footer) { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--text-3); font-size: 12px; line-height: 16px; }
.gib-quote :is(figcaption, footer) b { color: var(--text-2); font-weight: 600; }
.gib-avatar {
  --ring: conic-gradient(from 210deg, var(--blue-glow), var(--cyan), var(--pink), var(--violet), var(--blue-glow));
  position: relative; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid transparent; background: linear-gradient(var(--surface-3), var(--surface-3)) padding-box, var(--ring) border-box;
  color: var(--text); font: 600 11.5px/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase;
}
.gib-avatar.sm { width: 24px; height: 24px; font-size: 9.5px; border-width: 1.5px; }
.gib-avatar.lg { width: 48px; height: 48px; font-size: 15px; border-width: 2.5px; }
.gib-avatar[style*="--c"] { --ring: conic-gradient(from 210deg, var(--c), color-mix(in srgb, var(--c) 30%, transparent), var(--c)); }

/* Progress, ring */
.gib-progress {
  --value: 0; --c: var(--blue-glow);
  position: relative; height: 6px; min-width: 40px; border-radius: 999px; background: var(--surface-3); overflow: hidden;
}
.gib-progress::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--value) * 100%); border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, var(--blue)), var(--c));
  box-shadow: 0 0 10px color-mix(in srgb, var(--c) 70%, transparent);
  transition: width .5s var(--ease);
}
.gib-progress.ok { --c: var(--mint); }
.gib-progress.warn { --c: var(--amber); }
.gib-progress.crit { --c: var(--pink); }
.gib-progress.is-indeterminate::before { width: 35%; animation: gib-indet 1.3s var(--ease) infinite; }
@keyframes gib-indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

.gib-ring {
  --value: 0; --c: var(--blue-glow); --size: 56px; --thick: 5px;
  position: relative; display: inline-grid; place-items: center; flex: none; width: var(--size); height: var(--size); border-radius: 50%;
  color: var(--text); font: 600 13px/1 var(--font-display); font-variant-numeric: tabular-nums;
}
.gib-ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--value) * 360deg), var(--surface-3) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--thick)), #000 calc(100% - var(--thick) + 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--thick)), #000 calc(100% - var(--thick) + 1px));
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 60%, transparent));
}
.gib-ring > * { position: relative; }
.gib-ring small { display: block; margin-top: 2px; color: var(--text-3); font: 500 9.5px/1 var(--font-ui); text-align: center; }
.gib-ring.ok { --c: var(--mint); } .gib-ring.warn { --c: var(--amber); } .gib-ring.crit { --c: var(--pink); }

/* Timeline */
.gib-timeline { list-style: none; margin: 0; padding: 0; min-width: 0; }
.gib-timeline > li { --sev: var(--blue-glow); position: relative; padding: 0 0 16px 24px; min-width: 0; }
.gib-timeline > li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--sev); box-shadow: 0 0 10px color-mix(in srgb, var(--sev) 60%, transparent);
}
.gib-timeline > li::after { content: ""; position: absolute; left: 4.5px; top: 19px; bottom: 2px; width: 1px; background: var(--line-2); }
.gib-timeline > li:last-child { padding-bottom: 0; }
.gib-timeline > li:last-child::after { display: none; }
.gib-timeline > li[data-sev="crit"] { --sev: var(--malicious); }
.gib-timeline > li[data-sev="warn"] { --sev: var(--amber); }
.gib-timeline > li[data-sev="ok"] { --sev: var(--trusted); }
.gib-timeline > li[data-sev="neutral"] { --sev: var(--unknown-v); }
.gib-timeline time, .gib-timeline .gib-meta:first-child { display: block; margin-bottom: 2px; color: var(--text-3); font: 500 11px/14px var(--font-mono); }
.gib-timeline b { color: var(--text); }
.gib-timeline p { margin: 2px 0 0; color: var(--text-2); font-size: 12.5px; line-height: 18px; }

/* ───────────────────────── 17. States ───────────────────────── */
.gib-empty, .gib-error-state {
  display: grid; justify-items: center; align-content: center; gap: 8px; min-width: 0;
  padding: 36px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius);
  background: radial-gradient(60% 80% at 50% 0%, rgba(45,107,255,.06), transparent 70%);
  color: var(--text-2); text-align: center;
}
.gib-empty > .gib-i, .gib-error-state > .gib-i, .gib-empty-i {
  width: 44px; height: 44px; padding: 11px; margin-bottom: 4px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--sky);
}
.gib-empty :is(h2, h3, b), .gib-error-state :is(h2, h3, b) { color: var(--text); font-size: 14px; line-height: 20px; font-weight: 600; }
.gib-empty p, .gib-error-state p { max-width: 440px; margin: 0; color: var(--text-3); font-size: 13px; }
.gib-empty .gib-row, .gib-error-state .gib-row { justify-content: center; margin-top: 6px; gap: 8px; }
.gib-error-state { border-style: solid; border-color: rgba(255,77,94,.3); background: radial-gradient(60% 80% at 50% 0%, rgba(255,77,94,.07), transparent 70%); }
.gib-error-state > .gib-i { color: var(--red); background: rgba(255,77,94,.1); border-color: rgba(255,77,94,.25); }
.gib-error-state code { color: #FF9AA3; }

.gib-skeleton {
  display: block; min-height: 12px; border-radius: 6px; color: transparent !important; user-select: none;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 40%, var(--surface-2) 80%) 0 0 / 220% 100%;
  animation: gib-shimmer 1.4s linear infinite;
}
.gib-skeleton * { visibility: hidden; }
@keyframes gib-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.gib-callout {
  --c: var(--blue-glow);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: start; min-width: 0;
  padding: 10px 14px 10px 12px; border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); border-radius: 10px;
  background: color-mix(in srgb, var(--c) 8%, var(--surface)); color: var(--text-2); font-size: 13px; line-height: 19px;
}
.gib-callout > .gib-i { grid-row: 1 / span 3; margin-top: 2px; color: var(--c); }
.gib-callout::before {
  content: ""; grid-row: 1 / span 3; width: 8px; height: 8px; margin: 6px 2px 0; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c);
}
.gib-callout:has(> .gib-i)::before { display: none; }
.gib-callout > * { grid-column: 2; min-width: 0; margin: 0; }
.gib-callout > .gib-i { grid-column: 1; }
.gib-callout :is(b, strong):first-child, .gib-callout > :is(h3, h4) { color: var(--text); font-weight: 600; }
.gib-callout.info { --c: var(--blue-glow); }
.gib-callout.warn { --c: var(--amber); }
.gib-callout.crit { --c: var(--red); }
.gib-callout.ok { --c: var(--trusted); }

/* ───────────────────────── 18. Overlays ───────────────────────── */
dialog.gib-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; overflow: auto;
  border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255,255,255,.06);
}
dialog.gib-dialog[open] { animation: gib-pop .2s var(--ease) both; }
dialog.gib-dialog::backdrop { background: rgba(5,7,12,.68); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.gib-dialog > form { margin: 0; }
:is(.gib-dialog, .gib-dialog > form) > :where(header, .gib-card-h) { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
:is(.gib-dialog, .gib-dialog > form) > :where(header, .gib-card-h) > :where(h2, h3) { font-size: 17px; line-height: 24px; }
:is(.gib-dialog, .gib-dialog > form) > :where(header, .gib-card-h) > :where(button:last-child, .gib-icon-btn:last-child) { margin-left: auto; }
:is(.gib-dialog, .gib-dialog > form) > :where(.gib-card-b, .gib-dialog-b, section) { padding: 16px 18px; }
:is(.gib-dialog, .gib-dialog > form) > :where(.gib-card-b, .gib-dialog-b, section) > * + * { margin-top: 12px; }
:is(.gib-dialog, .gib-dialog > form) > :where(footer, .gib-dialog-f) { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
@keyframes gib-pop { from { transform: translateY(8px) scale(.985); opacity: 0; } }

.gib-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.gib-toast {
  --c: var(--blue-glow);
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: min(400px, calc(100vw - 32px));
  padding: 10px 14px 10px 16px; overflow: hidden; pointer-events: auto;
  border: 1px solid var(--line-2); border-radius: 10px; background: rgba(28,33,48,.94); color: var(--text);
  font-size: 13px; line-height: 18px; box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: gib-pop .22s var(--ease) both;
}
.gib-toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.gib-toast > .gib-i { color: var(--c); }
.gib-toast.ok, .gib-toast.success { --c: var(--mint); }
.gib-toast.warn { --c: var(--amber); }
.gib-toast.crit, .gib-toast.error { --c: var(--red); }
.gib-toast.info { --c: var(--blue-glow); }
.gib-toast .gib-btn, .gib-toast .gib-icon-btn { margin-left: auto; }

.gib-tooltip {
  position: fixed; z-index: 1100; pointer-events: none; max-width: 280px;
  padding: 8px 11px; border: 1px solid var(--line-3); border-radius: 9px;
  background: rgba(16,19,29,.95); color: var(--text); font: 400 12px/16px var(--font-ui); font-variant-numeric: tabular-nums;
  box-shadow: 0 16px 36px -12px rgba(0,0,0,.85), 0 0 22px -8px rgba(45,107,255,.45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.gib-stage .gib-tooltip, .gib-tooltip.gib-3d-tip { position: absolute; }
.gib-tooltip b, .gib-tooltip strong { color: var(--text); font-weight: 600; }
.gib-tooltip .gib-muted, .gib-tooltip span { color: var(--text-2); }

.gib-popover {
  position: absolute; z-index: 900; min-width: 220px; max-width: min(360px, calc(100vw - 32px)); margin: 0; padding: 6px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); color: var(--text);
  box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255,255,255,.05);
}
[popover].gib-popover { inset: auto; }
.gib-popover > :where(button, a), .gib-popover :where(li > button, li > a) {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px;
  background: none; color: var(--text-2); font-size: 13px; line-height: 18px; text-align: left; text-decoration: none; cursor: pointer;
}
.gib-popover > :where(button, a):hover, .gib-popover :where(li > button, li > a):hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.gib-popover :where(button[aria-checked="true"], a[aria-checked="true"], button.is-active, a.is-active) { color: var(--sky); }
.gib-popover :where(hr) { margin: 5px 4px; }
.gib-popover :where(ul) { list-style: none; margin: 0; padding: 0; }
.gib-popover-l { padding: 6px 10px 4px; color: var(--text-3); font: 500 10.5px/14px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }

/* ───────────────────────── 19. Text utilities ───────────────────────── */
.gib-mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: 0; }
.gib-muted { color: var(--text-3); }
.gib-hl { color: var(--lav); }
.gib-num { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.gib-up { color: var(--mint); }
.gib-down { color: #FF5C93; }
.gib-meta { color: var(--text-3); font-size: 12px; line-height: 16px; }
.gib-meta :is(b, strong, time) { color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.gib-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ───────────────────────── 20. Responsive ───────────────────────── */
@media (max-width: 1100px) {
  .gib-grid.cols-3, .gib-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gib-grid.cols-3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .gib-grid > .span-3 { grid-column: span 6; }
  .gib-grid > :is(.span-4, .span-5, .span-7, .span-8, .span-9) { grid-column: 1 / -1; }
  .gib-split { grid-template-columns: minmax(0, 1fr); }
  .gib-inspector { position: static; max-height: none; }
  .gib-drawer { width: min(100%, max(560px, 86%)); }
  .gib-drawer.is-second { width: min(100%, max(460px, 64%)); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .gib-record-b { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; }
  .gib-record-b > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .gib-record-b > :nth-child(2):not(.gib-counters) { grid-column: 2; grid-row: 1 / span 2; }
  .gib-record-b > :nth-child(3):not(.gib-counters) { grid-column: 1; grid-row: 2; }
  .gib-record-b > .gib-counters { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 760px) {
  .gib-page { padding: 20px 16px 40px; gap: 14px; }
  .gib-grid, .gib-grid.cols-2, .gib-grid.cols-3, .gib-grid.cols-4, .gib-grid.cols-12 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .gib-grid > [class*="span-"], .gib-grid.cols-3 > :last-child:nth-child(odd) { grid-column: auto; }
  .gib-head { grid-template-columns: minmax(0, 1fr); }
  .gib-head > .gib-actions { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 12px; }
  .gib-title { font-size: 24px; line-height: 30px; }
  .gib-toolbar > .gib-search { flex-basis: 100%; }
  .gib-record { padding: 11px 12px 12px 15px; }
  .gib-record-b { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gib-record.is-selected { transform: translate3d(0, 0, 12px); }
  .gib-counters { justify-content: start; grid-auto-flow: column; grid-template-columns: none; grid-template-rows: auto; }
  .gib-kpi-v { font-size: 34px; line-height: 38px; }
  .gib-stage { height: var(--stage-h-m, min(var(--stage-h, 420px), 380px)); }
  .gib-stage > .gib-legend-chips { left: 10px; right: 10px; top: 10px; justify-content: flex-start; max-width: none; }
  .gib-stage-cap { left: 12px; right: 12px; bottom: 54px; max-width: none; }
  .gib-stage > .gib-viewtoggle { bottom: 10px; }
  .gib-stage-ctrl { right: 10px; bottom: auto; top: 50%; transform: translateY(-50%); }
  .gib-split { gap: 12px; }
  .gib-kv { grid-template-columns: minmax(84px, max-content) minmax(0, 1fr); gap: 6px 14px; }
  .gib-steps { padding-bottom: 2px; }
  .gib-step:not(.is-active) > span { display: none; }
  .gib-step:not(:last-child)::after { margin: 0 8px; min-width: 12px; }

  /* Drawers become bottom sheets */
  .gib-drawers:has(> .gib-drawer:not([hidden])) { min-height: 0; }
  .gib-drawers::before { position: fixed; z-index: 69; border-radius: 0; }
  .gib-drawer, .gib-drawer.is-second {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 70; width: 100%;
    height: 88vh; height: 88dvh; border-radius: 16px 16px 0 0; border-bottom: 0;
    box-shadow: 0 -30px 60px -10px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.06);
    animation-name: gib-sheet-in;
  }
  .gib-drawer.is-second { z-index: 71; height: 82vh; height: 82dvh; }
  .gib-drawer-h { padding: 22px 16px 10px; }
  .gib-drawer-h > .gib-tabs { flex: 1 1 0; min-width: 0; margin: -6px 0 -11px; }
  .gib-drawer-h > :is(h2, h3) ~ .gib-tabs { order: 3; flex: 1 1 100%; margin: 4px 0 -11px; }
  .gib-drawer-h > .gib-tabs .gib-tab { padding: 8px 0 10px; }
  .gib-drawer > .gib-tabs { padding: 0 16px; }
  .gib-drawer-b { padding: 14px 16px 28px; }
  .gib-drawer-handle {
    left: 50%; top: 7px; transform: translateX(-50%); width: 44px; height: 5px; border: 0; border-radius: 99px; background: var(--surface-4);
  }
  .gib-drawer-handle .gib-i { display: none; }
  @keyframes gib-sheet-in { from { transform: translateY(40px); opacity: 0; } }

  .gib-showcase { padding: 22px; border-radius: var(--radius-lg); }
  .gib-tilt { transform: rotateY(8deg) rotateX(5deg); }
  .gib-toasts { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
  .gib-toast { min-width: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .gib-skeleton { animation: none; }
  .gib-showcase:hover .gib-tilt { transform: rotateY(18deg) rotateX(9deg) rotateZ(-2deg); }
}

@media print {
  body { background: #fff; color: #000; }
  .gib-card, .gib-kpi, .gib-record { box-shadow: none; }
}
