/* EasyDeploy admin – self-contained (no CDN, the server may be offline). */
:root {
  /* light-dark(<ljust>, <mörkt>) – väljs via color-scheme nedan. */
  --bg: light-dark(#f4f6fa, #0b111b);
  --surface: light-dark(#ffffff, #131b27);
  --surface-2: light-dark(#f8fafc, #18212f);
  --border: light-dark(#e3e8ef, #253043);
  --border-strong: light-dark(#cfd6e0, #34415a);
  --divider: light-dark(#eef1f5, #1e2836);
  --text: light-dark(#182230, #e6ebf2);
  --text-2: light-dark(#5b6779, #a3aec0);
  --text-3: light-dark(#8a94a6, #6f7b8f);
  --primary: light-dark(#2563eb, #4c8dff);
  --primary-hover: light-dark(#1d4ed8, #3b7bf0);
  --primary-solid: light-dark(#2563eb, #2f6fe4);
  --primary-soft: light-dark(#e8f0fe, rgba(76, 141, 255, .15));
  --primary-border: light-dark(#bcd0f7, rgba(76, 141, 255, .45));
  --focus-ring: light-dark(#dbe7fe, rgba(76, 141, 255, .35));
  --ok: light-dark(#15803d, #4ade80); --ok-bg: light-dark(#e7f6ec, rgba(34, 197, 94, .14));
  --fail: light-dark(#c62828, #f87171); --fail-bg: light-dark(#fdecec, rgba(239, 68, 68, .15));
  --warn: light-dark(#b45309, #fbbf24); --warn-bg: light-dark(#fdf3e2, rgba(245, 158, 11, .15));
  --run: light-dark(#1d4ed8, #7aa7ff); --run-bg: light-dark(#e6efff, rgba(76, 141, 255, .16));
  --queued: light-dark(#6d28d9, #b49cff); --queued-bg: light-dark(#f1eafe, rgba(139, 92, 246, .18));
  --ok-strong: light-dark(#14532d, #bbf7d0); --ok-border: light-dark(#c4e8d0, rgba(34, 197, 94, .3));
  --fail-strong: light-dark(#7f1d1d, #fecaca); --fail-border: light-dark(#f5c6c6, rgba(239, 68, 68, .35));
  --warn-strong: light-dark(#7c3a0a, #fde68a); --warn-border: light-dark(#f3dbb2, rgba(245, 158, 11, .3));
  --info-strong: light-dark(#1e3a8a, #c7dbff); --info-border: light-dark(#cddcfb, rgba(76, 141, 255, .35));
  --danger-solid: light-dark(#c62828, #dc2626);
  --ok-ring: light-dark(#dcfce7, rgba(34, 197, 94, .22));
  --fail-ring: light-dark(#fee2e2, rgba(239, 68, 68, .22));
  --env-bg: light-dark(#e9eef6, #1f2a3a); --env-text: light-dark(#3c4a5f, #a9b6ca);
  --prod-bg: light-dark(#fde8e8, rgba(239, 68, 68, .16)); --prod-text: light-dark(#b42318, #fca5a5);
  --highlight: light-dark(#fbfdf9, rgba(34, 197, 94, .05));
  --editor-bg: light-dark(#fbfcfe, #0f1621);
  --muted-bg: light-dark(#eef1f5, #1f2938);
  --side: light-dark(#0f1b2d, #070c14);
  --side-text: light-dark(#b9c4d6, #a3aec0);
  --side-active: light-dark(#1c2c46, #16223a);
  --side-border: light-dark(#1d2a40, #18223a);
  --log-bg: light-dark(#0d1420, #070b12);
  --radius: 10px;
  --shadow: 0 1px 2px light-dark(rgba(16, 24, 40, .05), rgba(0, 0, 0, .35)), 0 1px 3px light-dark(rgba(16, 24, 40, .06), rgba(0, 0, 0, .25));
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: light dark; /* "auto" – följer operativsystemet */
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 650; margin: 0; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 15px; font-weight: 650; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 13px; font-weight: 650; margin: 18px 0 8px; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
h1 .mono { font-size: 20px; font-weight: 600; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 228px; flex: none; background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; color: #fff; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand.big { font-size: 22px; justify-content: center; padding: 0 0 22px; color: var(--text); }
.sidebar nav { display: flex; flex-direction: column; padding: 4px 10px; gap: 2px; }
.sidebar nav a {
  color: var(--side-text); padding: 8px 12px; border-radius: 8px; display: flex; align-items: center; gap: 10px; font-weight: 500;
}
.sidebar nav a:hover { background: var(--side-active); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 #3b82f6; }
.sidebar .ico { width: 18px; text-align: center; opacity: .8; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6b7a92; padding: 16px 12px 6px; }
.sidebar-foot { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--side-border); }
.sidebar-foot .user { color: #fff; font-weight: 600; margin-bottom: 2px; }
.sidebar-foot .link { color: var(--side-text); padding: 0; }
.content { flex: 1; min-width: 0; padding: 26px 32px 60px; max-width: 1400px; }

/* ---------- page ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 4px; }
.crumbs a { color: var(--text-2); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; display: block;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
details.card > summary { cursor: pointer; font-weight: 600; }
details.card[open] > summary { margin-bottom: 12px; }
.loading, .empty { color: var(--text-2); padding: 18px 4px; }
.empty { text-align: center; }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.split > .card { margin-bottom: 18px; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.stat-num { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.stat-num .of { font-size: 15px; color: var(--text-3); font-weight: 600; }
.stat-label { color: var(--text-2); font-size: 13px; }
.warn-text { color: var(--warn); }
.fail-text { color: var(--fail); font-size: 15px; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--divider); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table.compact td { padding: 6px 10px; }
.table.clickable tbody tr { cursor: pointer; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.disabled td { opacity: .55; }
.table tr.selected { background: var(--primary-soft) !important; }
.table tr.highlight td { background: var(--highlight); }
.table .right { text-align: right; }
.table .nowrap { white-space: nowrap; }
.table .wrap { word-break: break-all; }
.table td.err { color: var(--fail); font-size: 13px; }
.sub { font-size: 12px; color: var(--text-3); }
.muted-text { color: var(--text-3); }
.small { font-size: 12.5px; }
.table.targets tbody tr { cursor: pointer; }

/* ---------- pills, tags, chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.fail { background: var(--fail-bg); color: var(--fail); }
.pill.running { background: var(--run-bg); color: var(--run); }
.pill.queued { background: var(--queued-bg); color: var(--queued); }
.pill.muted { background: var(--muted-bg); color: var(--text-2); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--muted-bg); color: var(--text-2); white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.fail { background: var(--fail-bg); color: var(--fail); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.running { background: var(--run-bg); color: var(--run); }
.env { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--env-bg); color: var(--env-text); font-family: var(--mono); }
.env.prod { background: var(--prod-bg); color: var(--prod-text); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: var(--muted-bg); color: var(--text); margin: 2px 4px 2px 0; white-space: nowrap; }
.chip.prod { background: var(--prod-bg); color: var(--prod-text); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
a.chip:hover { text-decoration: none; background: var(--primary-soft); }
.dots { display: inline-flex; align-items: center; gap: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.dot.ok { background: #22c55e; box-shadow: 0 0 0 3px var(--ok-ring); }
.dot.fail { background: #ef4444; box-shadow: 0 0 0 3px var(--fail-ring); }
.dots-text { font-size: 12px; color: var(--text-2); margin-left: 4px; }
.spinner { width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.live { font-size: 11px; font-weight: 700; color: #fff; background: #ef4444; border-radius: 4px; padding: 1px 6px; text-transform: uppercase; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary-solid); border-color: var(--primary-solid); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn.danger { background: var(--danger-solid); border-color: var(--danger-solid); color: #fff; }
.btn.danger-outline { color: var(--fail); border-color: var(--fail-border); }
.btn.danger-outline:hover { background: var(--fail-bg); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.wide { width: 100%; height: 40px; margin-top: 8px; }
.btn.link, button.link { background: none; border: none; color: var(--primary); padding: 0 4px; font: inherit; font-weight: 500; cursor: pointer; height: auto; }
.btn.link:hover, button.link:hover { text-decoration: underline; }
.icon-btn { background: none; border: none; font-size: 16px; color: var(--text-2); cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--muted-bg); }
input:not([type=checkbox]):not([type=file]), select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 10px; min-height: 34px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); vertical-align: middle; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field.narrow { max-width: 460px; }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.field-row .field { flex: 1; min-width: 220px; }
.label, label > .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hint { font-weight: 400; color: var(--text-3); }
label.check { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-weight: 500; }
label.toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.actions .spacer { flex: 1; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.inline-form { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.quick { display: flex; gap: 6px; font-size: 13px; }
.code-editor {
  width: 100%; font-family: var(--mono) !important; font-size: 12.5px !important; line-height: 1.55;
  background: var(--editor-bg) !important; resize: vertical; tab-size: 2; white-space: pre; overflow-wrap: normal; overflow-x: auto;
}
.release-meta { display: flex; gap: 14px; color: var(--text-2); font-size: 12.5px; padding-bottom: 24px; flex-wrap: wrap; }
.validation-message { color: var(--fail); font-size: 12.5px; margin: -2px 0 8px; }

/* ---------- alerts ---------- */
.alert { border-radius: 8px; padding: 10px 14px; margin: 12px 0 0; font-size: 13.5px; border: 1px solid transparent; }
.alert.ok { background: var(--ok-bg); color: var(--ok-strong); border-color: var(--ok-border); }
.alert.fail { background: var(--fail-bg); color: var(--fail-strong); border-color: var(--fail-border); }
.alert.warn { background: var(--warn-bg); color: var(--warn-strong); border-color: var(--warn-border); }
.alert.info { background: var(--primary-soft); color: var(--info-strong); border-color: var(--info-border); margin: 0 0 16px; }
.alert.pre { white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; }
.missing { margin-top: 8px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: none; font: inherit; font-weight: 600; color: var(--text-2); padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- deployment detail ---------- */
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 20px; }
.meta-grid > div { display: flex; flex-direction: column; gap: 2px; }
.log {
  background: var(--log-bg); color: #d6deeb; border-radius: 8px; padding: 12px 0; max-height: 560px; min-height: 120px; overflow: auto;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
}
.log-line { display: flex; gap: 12px; padding: 0 14px; white-space: pre-wrap; word-break: break-word; }
.log-line:hover { background: #162132; }
.log-line .ts { color: #6c7b93; flex: none; }
.log-line .lvl { flex: none; width: 44px; color: #7f8ea6; }
.log-line.warn .lvl, .log-line.warning .lvl { color: #fbbf24; }
.log-line.warn .msg, .log-line.warning .msg { color: #fde68a; }
.log-line.error .lvl, .log-line.err .lvl { color: #f87171; }
.log-line.error .msg, .log-line.err .msg { color: #fecaca; }
.log-line.step .msg, .log-line.success .msg { color: #86efac; }
.log-empty { color: #6c7b93; padding: 0 14px; }
pre.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; overflow: auto; font-family: var(--mono); font-size: 12.5px; margin: 0; }

/* ---------- tenants ---------- */
.tenant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tenant-card { color: var(--text); margin: 0; transition: border-color .15s, box-shadow .15s; }
.tenant-card:hover { text-decoration: none; border-color: var(--primary-border); box-shadow: 0 4px 14px rgba(37, 99, 235, .08); }
.tenant-name { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.tenant-env { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--divider); }
.tenant-apps { width: 100%; }
.env-section h2 { gap: 10px; }

/* ---------- upload & token ---------- */
.upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.file-drop { position: relative; display: inline-flex; align-items: center; min-width: 280px; height: 34px; padding: 0 12px; border: 1px dashed var(--border-strong); border-radius: 8px; background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.file-drop:hover { border-color: var(--primary); color: var(--primary); }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.version-input { width: 190px; }
.progress { width: 180px; height: 8px; background: var(--muted-bg); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); transition: width .2s; }
.token-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.token-result .label { margin-top: 14px; display: block; }
.copy-row { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; }
.copy-row code.token { font-size: 15px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; user-select: all; word-break: break-all; }
pre.cmd { flex: 1; margin: 0; background: var(--log-bg); color: #d6deeb; border-radius: 8px; padding: 10px 14px; font-family: var(--mono); font-size: 12.5px; overflow-x: auto; user-select: all; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 100; }
.modal {
  position: fixed; z-index: 101; top: 6vh; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px));
  max-height: 88vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 12px; box-shadow: 0 20px 50px rgba(15, 23, 42, .3);
}
.modal.wide { width: min(980px, calc(100vw - 32px)); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { min-width: 260px; max-width: 420px; padding: 11px 16px; border-radius: 8px; background: #1f2937; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.2); cursor: pointer; font-size: 13.5px; animation: slidein .2s ease-out; }
.toast.success { background: #166534; }
.toast.error { background: #991b1b; }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(160deg, #0f1b2d 0%, #1e3a5f 100%); }
.login-card { width: min(400px, 100%); background: var(--surface); border-radius: 14px; padding: 30px 30px 26px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 14px; }

/* ---------- blazor ---------- */
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 20px; background: var(--warn-bg); color: var(--warn-strong); backdrop-filter: blur(6px); z-index: 300; box-shadow: 0 -2px 8px rgba(0,0,0,.1); }
#blazor-error-ui .reload { margin-left: 10px; font-weight: 600; }
.components-reconnect-show { opacity: .7; }

@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .nav-section, .sidebar-foot .user { display: none; }
  .sidebar-foot { display: flex; align-items: center; gap: 12px; padding: 8px 20px 12px; border-top: none; }
  .sidebar-foot .theme-switch { margin: 0; }
  .content { padding: 16px; }
  .table { display: block; overflow-x: auto; }
}
h1:focus, h1:focus-visible { outline: none; }
.table td .tag, .table td .pill + .sub { margin-left: 6px; }
.table tr.group-row td { background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; padding-top: 10px; }
.table.compact th:first-child, .table.compact td:first-child { width: 40%; }

/* ---------- tema-väljare ---------- */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 12px; border-radius: 8px; background: var(--side-active); }
.theme-switch button { background: none; border: none; color: var(--side-text); font: inherit; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; cursor: pointer; }
.theme-switch button:hover { color: #fff; }
:root:not([data-theme]) .theme-switch [data-v="auto"],
:root[data-theme="auto"] .theme-switch [data-v="auto"],
:root[data-theme="light"] .theme-switch [data-v="light"],
:root[data-theme="dark"] .theme-switch [data-v="dark"] { background: var(--primary-solid); color: #fff; }

/* ---------- drift (monitoring) ---------- */
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.run { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.run a:hover { text-decoration: none; }
.op-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13.5px; }
.kv > dt { color: var(--text-2); font-weight: 600; }
.kv > dd { margin: 0; min-width: 0; word-break: break-word; }
.agent-block + .agent-block { border-top: 1px solid var(--divider); margin-top: 16px; padding-top: 16px; }
.log.plain { padding: 12px 14px; white-space: pre; overflow: auto; }
.log.plain.wrap { white-space: pre-wrap; word-break: break-word; }
.event-detail { margin-top: 6px; }
.event-detail summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.event-detail pre { margin-top: 6px; max-height: 320px; }
.changes { max-height: 280px; overflow: auto; }
.sev { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; background: var(--text-3); }
.sev.error { background: #ef4444; }
.sev.warn { background: #f59e0b; }
.sev.info { background: #3b82f6; }
