@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");
:root {
  color-scheme: dark;
  --bg: #090a0c;
  --panel: #101114;
  --border: #25272c;
  --muted: #989ba5;
  --text: #f0f1f3;
  --steel: #dadce2;
  --green: #a9d8bb;
  --amber: #e4c28a;
  --red: #efaaaa;
  --radius: 12px;
  font-family:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
summary {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
input,
select,
textarea {
  background: #111317;
  border: 1px solid #353841;
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--text);
  min-width: 0;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 500;
  font-size: 13px;
}
label input,
label select,
label textarea {
  width: 100%;
}
input[type="checkbox"] {
  accent-color: var(--steel);
  width: 16px;
  height: 16px;
}
input[type="date"] {
  width: 145px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.stat-value {
  font-family: "Space Grotesk", sans-serif;
}
h1 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -1.3px;
  line-height: 1.2;
}
h2 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 15px;
  font-weight: 500;
}
p {
  margin-top: 7px;
}
small {
  font-size: 11px;
}
svg {
  flex-shrink: 0;
}
.button svg,
.text-link svg,
.attention > svg,
button svg,
[data-icon] svg {
  width: 17px;
  height: 17px;
  display: block;
}
:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 600;
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}
.button {
  border: 1px solid #34363d;
  border-radius: 7px;
  background: #17191d;
  padding: 9px 14px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap;
}
.button:hover {
  background: #23262c;
  border-color: #5b5e68;
}
.button.primary {
  background: var(--steel);
  border-color: var(--steel);
  color: #131419;
}
.button.primary:hover {
  background: #fff;
}
.button.danger {
  color: var(--red);
  border-color: #664343;
  background: #2a1b1e;
}
.button.small {
  padding: 7px 11px;
}
.button.full {
  width: 100%;
  justify-content: space-between;
  padding: 13px 16px;
}
.text-link {
  font-size: 12px;
  color: var(--steel);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.text-link:hover {
  text-decoration: underline;
}
.icon-button {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
}
.skip {
  position: fixed;
  top: -80px;
  left: 16px;
  padding: 12px;
  background: var(--steel);
  color: #111;
  z-index: 100;
}
.skip:focus {
  top: 16px;
}
.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 29px;
  letter-spacing: -1.7px;
  font-weight: 700;
  line-height: 1;
}
.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.brand-dot {
  color: var(--muted);
}
.brand small {
  margin-left: 8px;
  font-size: 8px;
  letter-spacing: 1.3px;
  padding: 4px 6px;
  border: 1px solid #3b3e45;
  border-radius: 4px;
  color: var(--muted);
}
.gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.gate-story {
  padding: 48px 9%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  border-right: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 20% 80%, #25282f 0, transparent 60%),
    repeating-linear-gradient(
      140deg,
      transparent 0,
      transparent 70px,
      #ffffff03 71px,
      transparent 72px
    );
}
.gate-story h1 {
  font-size: clamp(36px, 4.2vw, 66px);
  letter-spacing: -2.5px;
}
.gate-story p {
  color: #aaaeb8;
  max-width: 350px;
  margin-top: 22px;
  font-size: 16px;
}
.gate-caption {
  color: #777c88;
  font-size: 10px;
  letter-spacing: 2px;
}
.gate-form {
  display: grid;
  place-items: center;
  padding: 40px;
}
.gate-form-inner {
  max-width: 365px;
  width: 100%;
}
.gate-form h2 {
  font-size: 32px;
  margin-bottom: 8px;
}
.gate-form form {
  margin-top: 32px;
  display: grid;
  gap: 20px;
}
.gate-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 20px;
}
.gate-form input {
  padding: 12px;
}
.connection {
  font-size: 12px;
  color: var(--muted);
}
.connection label {
  margin-top: 12px;
}
.connection p {
  font-size: 11px;
}
.gate-note {
  font-size: 11px;
  color: #777c88;
  margin-top: 24px;
}
.error-text {
  color: var(--red);
  font-size: 12px;
}
.error-text:empty {
  display: none;
}
.app-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  padding: 24px 18px 18px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: #0d0e10;
}
.sidebar > .brand {
  padding: 0 10px;
  margin-bottom: 28px;
}
.nav-label {
  display: block;
  font-size: 9px;
  letter-spacing: 1.7px;
  color: #757985;
  padding: 0 12px;
  margin: 0 0 12px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #a0a4af;
  font-size: 12px;
  font-weight: 500;
}
.sidebar nav a:hover {
  color: white;
  background: #191b20;
}
.sidebar nav a[aria-current="page"] {
  background: #212329;
  border-color: #32353d;
  color: #f5f6f8;
}
.sidebar nav .nav-label {
  margin-top: 20px;
}
.nav-count {
  margin-left: auto;
  border-radius: 4px;
  background: #36313a;
  color: #ebd5d5;
  padding: 0 6px;
  font-size: 10px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 24px;
}
.environment {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 7px;
  overflow-wrap: anywhere;
}
.status-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}
.operator {
  border-top: 1px solid var(--border);
  padding: 18px 4px 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.avatar {
  width: 32px;
  height: 32px;
  border: 1px solid #434751;
  border-radius: 8px;
  background: linear-gradient(145deg, #33363e, #17191e);
  display: grid;
  place-items: center;
  font-size: 12px;
}
.operator > div {
  flex: 1;
  min-width: 0;
}
.operator strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 500;
}
.operator small {
  color: var(--muted);
  font-size: 9px;
}
.topbar {
  height: 70px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  font-size: 11px;
  color: var(--muted);
}
.topbar strong {
  font-weight: 500;
  color: #c8cbd3;
}
.slash {
  margin: 0 13px;
  color: #565b67;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.topbar .muted {
  font-size: 10px;
}
main {
  padding: 28px;
  max-width: 1660px;
  margin: auto;
  min-height: calc(100vh - 70px);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.page-heading .muted {
  font-size: 12px;
  margin-top: 10px;
}
#page-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.range-form {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
}
.range-form label {
  font-size: 10px;
  color: var(--muted);
}
.range-form select,
.range-form input {
  font-size: 11px;
  padding: 8px;
}
.range-form .custom-range {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
  min-width: 0;
}
#view {
  display: grid;
  gap: 20px;
  min-width: 0;
}
#view > * {
  min-width: 0;
  margin-block: 0;
}
.workspace-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid #1e2025;
  padding-top: 20px;
  margin-top: 36px;
  color: #737884;
  font-size: 10px;
}
.workspace-footer > span:first-child {
  letter-spacing: 2px;
  font-size: 9px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 15px;
  margin-bottom: 24px;
}
.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--panel);
  min-width: 0;
}
.stat-label {
  color: #b0b3bd;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.stat-label svg {
  width: 16px;
  height: 16px;
  color: #737985;
}
.stat-value {
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.2;
  margin: 14px 0 11px;
  overflow-wrap: anywhere;
}
.stat-value small {
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0;
}
.stat-note {
  font-size: 10px;
  color: var(--muted);
}
.delta {
  color: var(--green);
  margin-right: 5px;
}
.delta.down {
  color: var(--amber);
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}
.columns.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  margin-bottom: 20px;
}
.columns > .panel {
  margin-bottom: 0;
}
.panel-head {
  padding: 18px 20px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.panel-head p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.panel-body {
  padding: 4px 20px 18px;
}
.panel-footer {
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  color: var(--muted);
  font-size: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #383d46;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 10px;
  white-space: nowrap;
  color: #c1c5cf;
  background: #20232a;
}
.badge.good {
  color: var(--green);
  background: #18251e;
  border-color: #2c4535;
}
.badge.warn {
  color: var(--amber);
  background: #2c251a;
  border-color: #4c3e29;
}
.badge.bad {
  color: var(--red);
  background: #2b1d21;
  border-color: #55333a;
}
.legend {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 10px;
  flex-wrap: wrap;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--steel);
}
.legend i.secondary {
  background: #7f91b7;
}
.chart {
  width: 100%;
  height: 210px;
  display: block;
  margin: 8px 0 0;
  overflow: visible;
}
.chart text {
  fill: #848a96;
  font-size: 10px;
  font-family: inherit;
}
.chart-grid {
  stroke: #262a31;
  stroke-dasharray: 3 5;
}
.chart-details {
  font-size: 10px;
  color: var(--muted);
  margin-top: 9px;
}
.chart-details table {
  margin-top: 10px;
}
.metric-list {
  display: grid;
}
.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #22252b;
  font-size: 12px;
}
.metric-row:last-child {
  border-bottom: 0;
}
.metric-row > span {
  color: var(--muted);
}
.metric-row strong {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.progress {
  height: 6px;
  border-radius: 5px;
  background: #2c3039;
  overflow: hidden;
  margin: 16px 0;
}
.progress > span {
  display: block;
  height: 100%;
  background: #cbd1dc;
  border-radius: 5px;
}
.premium-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 44px;
  letter-spacing: -2px;
  margin-top: 6px;
}
.premium-value small {
  font-size: 14px;
  letter-spacing: 0;
  color: var(--muted);
}
.attention {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid #25272c;
  font-size: 12px;
}
.attention:last-child {
  border-bottom: 0;
}
.attention-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid #3a3430;
  background: #25211b;
  border-radius: 8px;
  color: var(--amber);
}
.attention-icon svg {
  width: 15px;
  height: 15px;
}
.attention > div {
  flex: 1;
}
.attention small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.attention > b {
  font-size: 14px;
  font-weight: 500;
}
.empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.empty svg {
  width: 26px;
  height: 26px;
  display: block;
  margin: 0 auto 12px;
  color: #79828f;
}
.empty strong {
  display: block;
  color: #d0d4dd;
  font-weight: 500;
  margin-bottom: 5px;
}
.loading {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.loading:before {
  content: "";
  display: block;
  margin: 0 auto 15px;
  width: 23px;
  height: 23px;
  border: 2px solid #333740;
  border-top-color: #d7dbe3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11px;
}
table:has(th:nth-child(4)) {
  min-width: 640px;
}
th {
  font-size: 9px;
  color: #8f95a1;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: #121419;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 14px 22px;
  border-bottom: 1px solid #22252b;
  vertical-align: middle;
  overflow-wrap: break-word;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #14171b;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 10px;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.numeric {
  font-variant-numeric: tabular-nums;
}
.truncate {
  max-width: 290px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filter-bar label {
  font-size: 10px;
  color: var(--muted);
  min-width: min(140px, 100%);
  max-width: 100%;
}
.filter-bar input,
.filter-bar select {
  font-size: 12px;
  padding: 9px 11px;
}
.filter-bar .search {
  flex: 1;
  min-width: min(200px, 100%);
}
.filter-spacer {
  flex: 1;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 22px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--muted);
}
.pagination > div {
  display: flex;
  gap: 8px;
}
.case-preview {
  min-width: 160px;
  max-width: 430px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.case-preview button {
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  font: inherit;
  font-weight: 500;
  color: var(--text);
}
.case-preview button:hover {
  text-decoration: underline;
}
.case-preview p {
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.bulk-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 15px;
  border: 1px solid #494f5c;
  background: #1e222b;
  border-radius: 8px;
  font-size: 12px;
}
.note-box,
#notice {
  padding: 14px 18px;
  border: 1px solid #50402d;
  background: #231e17;
  color: var(--amber);
  border-radius: 8px;
  font-size: 11px;
  margin-bottom: 20px;
}
.note-box.neutral {
  background: #15191f;
  border-color: #353c49;
  color: #b4bdcd;
}
.service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  gap: 15px;
}
.service:last-child {
  border: 0;
}
.service strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
}
.service small {
  color: var(--muted);
  font-size: 10px;
}
.tabs {
  display: flex;
  gap: 5px;
  padding: 0 22px 16px;
  flex-wrap: wrap;
}
.tab {
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}
.tab[aria-pressed="true"] {
  background: #262b33;
  border-color: #3c4350;
  color: #f3f5f9;
}
.log-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  padding: 12px 22px;
  border-top: 1px solid #25282f;
  display: grid;
  grid-template-columns: 65px 50px 1fr;
  gap: 10px;
}
.log-line time {
  color: #9098a6;
}
.log-line .error {
  color: var(--red);
}
.log-line .warn {
  color: var(--amber);
}
.log-line .info {
  color: var(--green);
}
.log-line p {
  margin: 5px 0 0;
  color: #8b94a3;
  overflow-wrap: anywhere;
}
.bar-row {
  display: grid;
  grid-template-columns: 75px 1fr 35px;
  align-items: center;
  gap: 15px;
  font-size: 11px;
  margin: 15px 0;
}
.bar-row > .progress {
  margin: 0;
}
.bar-row > b {
  text-align: right;
  font-weight: 500;
}
dialog {
  background: #111318;
  color: var(--text);
  border: 1px solid #454b57;
  border-radius: 14px;
  padding: 0;
  width: min(720px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  box-shadow: 0 30px 100px #0009;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog[data-layout="case"] {
  width: min(1040px, calc(100vw - 32px));
}
#dialog-content {
  display: contents;
}
body:has(dialog[open]) {
  overflow: hidden;
}
dialog::backdrop {
  background: #000a;
  backdrop-filter: blur(5px);
}
.dialog-head {
  flex-shrink: 0;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 15px;
}
.dialog-head > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.dialog-head p {
  font-size: 11px;
  color: var(--muted);
}
.dialog-body {
  padding: 24px;
  display: grid;
  gap: 20px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  overflow-wrap: anywhere;
}
.dialog-body > * {
  min-width: 0;
  margin-block: 0;
}
.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.case-layout > * {
  min-width: 0;
}
.case-context {
  display: grid;
  gap: 16px;
}
.case-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.case-badges .badge {
  white-space: normal;
}
.case-context > .dialog-section + .dialog-section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.evidence {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid #343a45;
  border-radius: 8px;
  padding: 16px;
  background: #0b0d11;
  font-size: 13px;
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
}
.evidence-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
  min-width: 0;
}
.evidence-media a {
  display: block;
  min-width: 0;
}
.evidence-media img,
.evidence-media video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #0b0d11;
  border-radius: 8px;
}
.dialog-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
}
.dialog-section > p {
  margin: 0;
}
.dialog-section > .button {
  justify-self: start;
}
.history-list {
  display: grid;
  gap: 14px;
}
.history-list > p {
  margin: 0;
}
.history-item {
  border-left: 2px solid #424b5d;
  margin: 0;
  padding: 0 0 0 12px;
  font-size: 12px;
}
.history-item small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.history-item p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  color: #c1c6d1;
}
.decision-form {
  display: grid;
  align-content: start;
  gap: 15px;
  padding: 20px;
  background: #191c23;
  border: 1px solid #363e4c;
  border-radius: 10px;
}
.decision-form label {
  font-size: 11px;
}
.decision-form .warning {
  font-size: 11px;
  color: var(--amber);
  margin: 0;
}
.confirm-label {
  flex-direction: row;
  align-items: start !important;
}
.confirm-label input {
  width: 16px !important;
  flex-shrink: 0;
  margin: 2px 0 0;
}
.form-error {
  margin: 0;
  font-size: 11px;
  color: var(--red);
}
.form-error:empty {
  display: none;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  background: #dadfe8;
  border: 1px solid white;
  border-radius: 9px;
  color: #101217;
  font-size: 12px;
  z-index: 100;
  box-shadow: 0 10px 40px #0008;
}
@media (min-width: 1450px) {
  main {
    padding: 32px;
  }
  .stat-value {
    font-size: 38px;
  }
  .chart {
    height: 240px;
  }
}
@media (max-width: 1150px) {
  .app-shell {
    grid-template-columns: 196px minmax(0, 1fr);
  }
  main {
    padding: 25px;
  }
  .sidebar {
    padding: 25px 12px;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
    gap: 18px;
  }
  .columns {
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr);
  }
  .stat {
    padding: 16px;
  }
  .stat-value {
    font-size: 28px;
  }
  .stat-label {
    font-size: 10px;
  }
  .topbar {
    padding: 0 25px;
  }
  td,
  th {
    padding-left: 16px;
    padding-right: 16px;
  }
}
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .columns,
  .columns.equal {
    grid-template-columns: minmax(0, 1fr);
  }
  .gate-story {
    padding: 35px;
  }
  .sidebar > .brand {
    font-size: 25px;
  }
  .panel-head {
    padding: 18px;
  }
  .panel-body {
    padding: 0 18px 18px;
  }
}
@media (max-width: 650px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 16px;
  }
  .sidebar > .brand {
    margin: 0 0 17px;
    padding: 0;
  }
  .sidebar nav {
    flex-direction: row;
    overflow: auto;
    gap: 4px;
  }
  .sidebar nav a {
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 11px;
  }
  .sidebar nav a svg {
    width: 14px;
    height: 14px;
  }
  .sidebar .nav-label,
  .sidebar-bottom .environment {
    display: none;
  }
  .sidebar-bottom {
    padding: 0;
    position: absolute;
    top: 13px;
    right: 16px;
  }
  .operator {
    padding: 0;
    border: 0;
  }
  .operator > div,
  .operator .avatar {
    display: none;
  }
  .topbar {
    height: 54px;
    padding: 0 18px;
  }
  .topbar #updated {
    display: none;
  }
  main {
    padding: 25px 18px;
  }
  .page-heading {
    margin-bottom: 23px;
  }
  h1 {
    font-size: 29px;
  }
  .stats-grid {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .stat-value {
    font-size: 27px;
  }
  .stat-note {
    font-size: 9px;
  }
  .stat-label svg {
    display: none;
  }
  .columns {
    gap: 15px;
  }
  .panel-head {
    padding: 17px;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .workspace-footer {
    font-size: 8px;
  }
  .range-form .custom-range {
    flex-wrap: wrap;
  }
  .range-form input[type="date"] {
    width: 130px;
  }
  .gate {
    display: block;
  }
  .gate-story {
    min-height: initial;
    height: 130px;
    padding: 30px;
  }
  .gate-story > div,
  .gate-caption {
    display: none;
  }
  .gate-form {
    padding: 40px 26px;
  }
  .log-line {
    grid-template-columns: 54px 40px 1fr;
    padding: 12px;
    font-size: 9px;
  }
  .dialog-body {
    padding: 18px;
  }
  dialog,
  dialog[data-layout="case"] {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }
  .bulk-bar {
    flex-wrap: wrap;
  }
  .toolbar {
    gap: 8px;
  }
  .filter-bar label {
    min-width: min(120px, 100%);
  }
  .chart {
    height: 180px;
  }
}
@media (max-width: 760px) {
  .case-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}
@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.settings-grid { padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 16px; align-items: end; }
.settings-grid > .confirm-label, .settings-grid > .form-error { grid-column: 1 / -1; }
.settings-grid > button { justify-self: start; }

/* Inline icons have explicit dimensions; flex/grid children may shrink to fit. */
.text-link { max-width: 100%; flex-shrink: 0; }
.attention-icon { flex: 0 0 33px; }
.attention > div, .panel-head > div, .page-heading > div, .workspace,
.columns > *, .log-line > *, .metric-row > * { min-width: 0; }
.attention > div, .metric-row, .service, .panel-head { overflow-wrap: anywhere; }
.attention > b { flex-shrink: 0; }
.panel-head { flex-wrap: wrap; }
#page-tools { min-width: 0; max-width: 100%; flex-wrap: wrap; }
.panel > .legend { margin: 0 20px; }
.panel > .chart { width: calc(100% - 40px); margin-inline: 20px; }
.panel > .chart-details { margin: 8px 20px 16px; min-width: 0; }
.panel > .metric-list { padding: 0 20px 16px; }
.panel > .settings-grid { margin: 0 16px 16px; }
.chart { height: auto; max-height: 240px; overflow: hidden; }
.warning { color: var(--amber); font-size: 12px; margin-bottom: 16px; }
.filter-bar + .muted { margin-bottom: 16px; }
@media (max-width: 650px) {
  .sidebar { overflow: visible; height: auto; }
  .panel-head { gap: 10px; }
  .panel-head > .text-link { font-size: 11px; }
  .text-link svg, .attention > svg { width: 16px; height: 16px; }
  .metric-row { gap: 12px; font-size: 11px; }
  .metric-row strong { text-align: right; }
  .page-heading, .filter-bar, .pagination { gap: 12px; }
  .pagination { flex-wrap: wrap; padding: 12px 16px; }
  .topbar { gap: 10px; }
  .topbar > span { min-width: 0; }
  .toolbar { flex-shrink: 0; }
  .dialog-head { padding: 18px; }
  .dialog-head > div { min-width: 0; overflow-wrap: anywhere; }
  .dialog-head .icon-button { flex-shrink: 0; }
  .decision-form { padding: 16px; }
  .chart { max-height: none; }
}

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); gap: 18px; align-items: start; }
.overview-grid > div { min-width: 0; display: grid; gap: 20px; }
.overview-grid .panel { margin: 0; }
.stress-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 4px 20px 20px; }
.stress-form .span-all { grid-column: 1 / -1; }
.stress-form p { margin: 0; font-size: 11px; }
.stress-form label { min-width: 0; }
.stress-form select { text-overflow: ellipsis; }
.stress-form button { justify-self: start; }
.stress-environment { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.stress-environment .mono { flex: 1; min-width: 180px; }
.stress-report-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.stress-report-heading > div { min-width: 0; overflow-wrap: anywhere; }
.stress-report-heading p { font-size: 11px; }
#stress-report { display: grid; gap: 20px; scroll-margin-top: 24px; }
#stress-report > *, #stress-datasets > *, #stress-runs > * { margin-block: 0; min-width: 0; }
.stress-coverage { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; margin-bottom: 24px; }
.stress-coverage ul { padding-left: 18px; }
@media (max-width: 380px) { .stress-form { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .overview-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
