/* Taro Enterprise console: the shared look of the administration pages (relay setup, relay status,
   the package builder). A management console in the manner of the AWS console and OpenStack
   Horizon: a dark top bar, side navigation, page headers, containers, tables, status indicators,
   form fields with descriptions and wizard footers.

   The provider's colour comes from /brand/tokens.css (loaded after this file); the values below are
   only Taro's defaults. Every accent uses --primary* so a provider's colour carries through and an
   update of this file never resets it. */

:root {
  --primary: #7C4AE8; --primary-hover: #7043D1; --primary-active: #633BBA; --primary-border: #5935A7;
  --primary-soft: #EFE9FC; --on-primary: #FFFFFF;
  --primary-tint: var(--primary-soft);

  --page: #f2f3f5;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --hover: #f1f3f6;
  --text: #0f141a;
  --text-2: #4b5563;
  --text-3: #6b7280;
  --divider: #e5e7eb;
  --border: #d1d5db;
  --field-border: #8c939e;
  --field-bg: #ffffff;
  --disabled: #9ca3af;
  --link: var(--primary-active);

  --topnav: #121820;
  --topnav-2: #1c2430;
  --topnav-text: #e8ebf0;
  --topnav-muted: #9aa5b4;

  --ok: #0a7d32; --ok-bg: #effaf2; --ok-line: #6cc28a;
  --warn: #8a5a00; --warn-icon: #d38c00; --warn-bg: #fff8e6; --warn-line: #f0c565;
  --err: #c62828; --err-bg: #fdf0ef; --err-line: #ef9a9a;
  --info: #0b63ce; --info-bg: #f0f6ff; --info-line: #8ab8f0;
  --neutral: #6b7280;

  --shadow: 0 1px 1px rgba(0, 7, 22, .06), 0 1px 4px rgba(0, 7, 22, .08);
  --shadow-pop: 0 8px 28px rgba(0, 7, 22, .2), 0 2px 6px rgba(0, 7, 22, .12);
  --r: 8px;
  --r-s: 6px;

  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-tint: color-mix(in srgb, var(--primary) 16%, var(--surface));
    --page: #0b0f14;
    --surface: #151b23;
    --surface-2: #1a212b;
    --hover: #1f2732;
    --text: #e6e9ee;
    --text-2: #b2bccb;
    --text-3: #8a95a5;
    --divider: #262e3a;
    --border: #364152;
    --field-border: #5b6779;
    --field-bg: #0f141b;
    --disabled: #5b6472;
    --link: var(--primary);
    --topnav: #070a0e;
    --topnav-2: #121821;
    --ok: #4cc77a; --ok-bg: #102419; --ok-line: #2f6b45;
    --warn: #f3bd4f; --warn-icon: #f3bd4f; --warn-bg: #2a2110; --warn-line: #6b5520;
    --err: #ff7b72; --err-bg: #2c1515; --err-line: #7a2e2e;
    --info: #6cb0ff; --info-bg: #10203a; --info-line: #2b4f80;
    --neutral: #8a95a5;
    --shadow: 0 1px 1px rgba(0, 0, 0, .4), 0 1px 4px rgba(0, 0, 0, .35);
    --shadow-pop: 0 10px 30px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--page); color: var(--text); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }
code { padding: 1px 5px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--divider); overflow-wrap: anywhere; }
pre { margin: 0; padding: 12px 14px; border-radius: var(--r-s); background: var(--surface-2); border: 1px solid var(--divider); overflow: auto; line-height: 1.6; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- icons (CSS masks, so they take the text colour) ---------- */
.i { display: inline-block; width: 16px; height: 16px; flex: none; background: currentColor; vertical-align: -3px;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.i-ok { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M4.8 8.2l2.2 2.2 4.2-4.6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.i-err { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M5.6 5.6l4.8 4.8M10.4 5.6l-4.8 4.8' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.i-warn { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.6L15 14H1z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M8 6v3.6' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.8' r='1.1'/%3E%3C/svg%3E"); }
.i-info { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 7.2v4.3' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='4.7' r='1.2'/%3E%3C/svg%3E"); }
.i-pending { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 4.5V8l2.4 1.6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.i-stop { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M4.5 8h7' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.i-close { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 3.5l9 9M12.5 3.5l-9 9' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.i-ext { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M9 2h5v5M14 2L7.5 8.5M12 9.5V14H2V4h4.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.i-download { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2v8M4.5 6.8L8 10.3l3.5-3.5M2.5 13.5h11' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.i-refresh { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13.5 8A5.5 5.5 0 1 1 11.8 4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M9.2 3.6h3.4V.4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' transform='translate(0 0.6)'/%3E%3C/svg%3E"); }
.i-server { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='2' y='2' width='12' height='5' rx='1.2' fill='none' stroke='black' stroke-width='1.6'/%3E%3Crect x='2' y='9' width='12' height='5' rx='1.2' fill='none' stroke='black' stroke-width='1.6'/%3E%3Ccircle cx='5' cy='4.5' r='1'/%3E%3Ccircle cx='5' cy='11.5' r='1'/%3E%3C/svg%3E"); }
.i-help { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='M6 6.2a2 2 0 1 1 2.8 1.8c-.6.3-.8.7-.8 1.3v.3' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.9' r='1.1'/%3E%3C/svg%3E"); }
.i-angle { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3.5L10.5 8 6 12.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* ---------- top navigation ---------- */
.topnav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 16px;
  background: var(--topnav); color: var(--topnav-text); border-bottom: 1px solid #000; }
.topnav .brand { display: flex; align-items: center; gap: 10px; color: inherit; font-weight: 700; font-size: 15px; padding-right: 14px; margin-right: 6px;
  border-right: 1px solid rgba(255, 255, 255, .14); height: 28px; }
.topnav .brand:hover { text-decoration: none; }
.topnav .brand img { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; }
.topnav .service { color: var(--topnav-text); font-weight: 600; padding: 0 8px; }
.topnav .spacer { flex: 1; }
.topnav .item { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border-radius: 6px; color: var(--topnav-muted); font-size: 13px; white-space: nowrap; }
.topnav a.item:hover { background: var(--topnav-2); color: var(--topnav-text); text-decoration: none; }
.topnav .item strong { color: var(--topnav-text); font-weight: 600; }
.topnav .divider { width: 1px; height: 22px; background: rgba(255, 255, 255, .14); margin: 0 6px; }

/* ---------- layout: side navigation + content ---------- */
.layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: calc(100vh - 52px); }
.layout.no-nav { grid-template-columns: minmax(0, 1fr); }
.sidenav { background: var(--surface); border-right: 1px solid var(--divider); padding: 20px 0 24px; position: sticky; top: 52px;
  height: calc(100vh - 52px); overflow: auto; }
.sidenav .head { padding: 0 24px 14px; margin-bottom: 10px; border-bottom: 1px solid var(--divider); }
.sidenav .head .title { font-size: 16px; font-weight: 700; margin: 0; }
.sidenav .head .sub { color: var(--text-3); font-size: 12.5px; margin: 2px 0 0; }
.sidenav .section { padding: 14px 24px 4px; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); }
.sidenav .links { list-style: none; margin: 0; padding: 0; }
.sidenav .links a { display: block; padding: 6px 24px; color: var(--text-2); border-left: 3px solid transparent; }
.sidenav .links a:hover { color: var(--text); background: var(--hover); text-decoration: none; }
.sidenav .links a[aria-current] { color: var(--link); font-weight: 700; border-left-color: var(--primary); background: var(--primary-tint); }
.sidenav .foot { margin: 18px 24px 0; padding-top: 14px; border-top: 1px solid var(--divider); color: var(--text-3); font-size: 12.5px; }
.sidenav .foot dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; margin: 0; }
.sidenav .foot dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }

.content { padding: 20px 40px 48px; min-width: 0; }
.content:focus { outline: none; }
.content > .inner { max-width: 1120px; }

/* ---------- wizard steps (side navigation of a wizard) ---------- */
.wizard-steps { list-style: none; margin: 0; padding: 4px 24px; counter-reset: s; }
.wizard-steps li { position: relative; padding: 0 0 14px 30px; }
.wizard-steps li::before { content: ""; position: absolute; left: 9px; top: 24px; bottom: 2px; width: 2px; background: var(--divider); }
.wizard-steps li:last-child::before { display: none; }
.wizard-steps li.done::before { background: var(--primary); }
.wizard-steps .marker { position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: var(--text-3); font-size: 11px; font-weight: 700; }
.wizard-steps .marker .i { width: 12px; height: 12px; }
.wizard-steps li.done .marker { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.wizard-steps li.bad .marker { background: var(--err); border-color: var(--err); color: #fff; }
.wizard-steps li.warn .marker { background: var(--warn-icon); border-color: var(--warn-icon); color: #fff; }
.wizard-steps li.current .marker { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.wizard-steps button { all: unset; display: block; width: 100%; cursor: pointer; border-radius: 4px; }
.wizard-steps button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wizard-steps .n { display: block; font-size: 12px; color: var(--text-3); }
.wizard-steps .name { display: block; color: var(--link); font-weight: 500; }
.wizard-steps li.current .name { color: var(--text); font-weight: 700; }
.wizard-steps li.locked .name { color: var(--disabled); }
.wizard-steps li.locked button { cursor: default; }
.wizard-steps button:hover .name { text-decoration: underline; }
.wizard-steps li.current button:hover .name, .wizard-steps li.locked button:hover .name { text-decoration: none; }

/* ---------- breadcrumbs & page header ---------- */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 13px; color: var(--text-3); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: ""; display: inline-block; width: 12px; height: 12px; background: currentColor; opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3.5L10.5 8 6 12.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3.5L10.5 8 6 12.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.breadcrumbs li:last-child { color: var(--text-2); }

.page-header { display: flex; align-items: flex-end; gap: 16px; margin: 0 0 20px; }
.page-header .text { flex: 1; min-width: 0; }
.page-header .step { font-size: 13px; color: var(--text-3); margin: 0 0 2px; }
.page-header h1 { font-size: 26px; line-height: 1.25; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.page-header .desc { margin: 6px 0 0; color: var(--text-2); max-width: 820px; }
.page-header .actions { display: flex; gap: 8px; flex: none; }

/* ---------- containers ---------- */
.container { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r); box-shadow: var(--shadow); margin: 0 0 20px; }
.container > .c-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--divider); }
.container > .c-head .text { flex: 1; min-width: 0; }
.container > .c-head h2 { font-size: 17px; line-height: 1.35; margin: 0; font-weight: 700; }
.container > .c-head h2 .count { color: var(--text-3); font-weight: 400; }
.container > .c-head .desc { margin: 2px 0 0; color: var(--text-3); font-size: 13px; }
.container > .c-head .actions { display: flex; gap: 8px; flex: none; }
.container > .c-body { padding: 18px 20px; }
.container > .c-body.flush { padding: 0; }
.container > .c-foot { padding: 12px 20px; border-top: 1px solid var(--divider); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); color: var(--text-3); font-size: 13px; }
.container h3 { font-size: 14px; font-weight: 700; margin: 18px 0 8px; }
.container h3:first-child { margin-top: 0; }
.container p { margin: 0 0 10px; }
.container p:last-child { margin-bottom: 0; }

/* ---------- key-value pairs ---------- */
.kv { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 18px 28px; margin: 0; }
.kv > div { min-width: 0; }
.kv dt { font-weight: 700; color: var(--text-2); font-size: 13px; margin: 0 0 3px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv.cols-2 { --cols: 2; } .kv.cols-4 { --cols: 4; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 7px; background: var(--primary); border: 1px solid rgba(0, 0, 0, .15); }

/* ---------- status indicators & badges ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.status.ok { color: var(--ok); } .status.err, .status.fail { color: var(--err); } .status.warn { color: var(--warn); }
.status.warn .i { color: var(--warn-icon); } .status.info { color: var(--info); } .status.pending, .status.skip, .status.stopped { color: var(--neutral); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 700; letter-spacing: .01em;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.badge.blue { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge.green { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge.amber { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge.red { background: var(--err-bg); color: var(--err); border-color: var(--err-line); }
.topnav .badge { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: var(--topnav-text); }

/* ---------- alerts (in the page) & flash bar (notifications) ---------- */
.alert { display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--r-s); border: 1px solid var(--info-line); background: var(--info-bg); margin: 0 0 16px; }
.alert > .i { margin-top: 2px; color: var(--info); }
.alert .body { flex: 1; min-width: 0; }
.alert .body > strong:first-child { display: block; margin-bottom: 2px; }
.alert ul, .alert ol { margin: 6px 0 0; padding-left: 20px; }
.alert.ok { border-color: var(--ok-line); background: var(--ok-bg); } .alert.ok > .i { color: var(--ok); }
.alert.warn { border-color: var(--warn-line); background: var(--warn-bg); } .alert.warn > .i { color: var(--warn-icon); }
.alert.err { border-color: var(--err-line); background: var(--err-bg); } .alert.err > .i { color: var(--err); }
.container .alert:last-child { margin-bottom: 0; }

.flashbar { position: fixed; z-index: 50; top: 64px; right: 20px; width: min(440px, calc(100vw - 40px)); display: grid; gap: 8px; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-s); color: #fff; background: #0b63ce; box-shadow: var(--shadow-pop);
  animation: flash-in .18s ease-out; }
.flash.ok { background: #0a7d32; } .flash.err { background: #c62828; } .flash.warn { background: #8a5a00; }
.flash .msg { flex: 1; min-width: 0; padding-top: 1px; }
.flash .i { margin-top: 2px; }
.flash button { all: unset; cursor: pointer; opacity: .8; padding: 2px; border-radius: 4px; line-height: 0; }
.flash button:hover { opacity: 1; } .flash button:focus-visible { outline: 2px solid #fff; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 18px; border-radius: 17px; cursor: pointer;
  font: inherit; font-weight: 700; letter-spacing: .01em; white-space: nowrap; border: 2px solid var(--primary); background: var(--surface); color: var(--link); }
.btn:hover { background: var(--primary-tint); text-decoration: none; }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.primary:active { background: var(--primary-active); }
.btn.link { border-color: transparent; background: transparent; padding: 0 10px; }
.btn.link:hover { background: var(--hover); }
.btn.danger { border-color: var(--err); color: var(--err); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: default; background: var(--surface); border-color: var(--border); color: var(--disabled); }
.btn.primary:disabled { background: var(--divider); border-color: var(--divider); color: var(--disabled); }
.btn.sm { height: 28px; padding: 0 12px; font-size: 13px; border-radius: 14px; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 4px 0 0; padding-top: 4px; }
.form-actions .left { margin-right: auto; display: flex; gap: 10px; }

/* ---------- forms ---------- */
.field { margin: 0 0 18px; max-width: 640px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field > .label { display: block; font-weight: 700; margin: 0 0 2px; }
.field > .label-row { display: flex; align-items: baseline; gap: 8px; margin: 0 0 2px; }
.field > .label-row label { font-weight: 700; }
.field .opt { color: var(--text-3); font-style: italic; font-weight: 400; }
.field .desc { color: var(--text-3); font-size: 13px; margin: 0 0 6px; }
.field .hint { color: var(--text-3); font-size: 12.5px; margin: 5px 0 0; }
.field .error { color: var(--err); font-size: 13px; margin: 5px 0 0; display: flex; gap: 6px; align-items: center; }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=password], input[type=search], select, textarea {
  width: 100%; height: 34px; padding: 0 10px; border-radius: var(--r-s); border: 1px solid var(--field-border); background: var(--field-bg); color: var(--text); font: inherit; }
textarea { height: auto; min-height: 90px; padding: 8px 10px; line-height: 1.45; }
input.mono, textarea.mono { font-family: var(--mono); font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-tint), 0 0 0 1px var(--primary); }
input[aria-invalid=true], textarea[aria-invalid=true], select[aria-invalid=true] { border-color: var(--err); border-left-width: 4px; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--disabled); border-color: var(--border); }
::placeholder { color: var(--text-3); opacity: .8; }

.check { display: flex; gap: 9px; align-items: flex-start; margin: 10px 0 0; cursor: pointer; }
.check input { margin: 3px 0 0; width: 15px; height: 15px; accent-color: var(--primary); flex: none; }
.check .d { display: block; color: var(--text-3); font-size: 13px; }

/* tiles: radio choices laid out as cards */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 0 0 18px; border: 0; padding: 0; }
.tile { position: relative; display: block; padding: 14px 16px 14px 42px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.tile:hover { border-color: var(--field-border); }
.tile input { position: absolute; left: 15px; top: 17px; margin: 0; width: 16px; height: 16px; accent-color: var(--primary); }
.tile .t { display: block; font-weight: 700; }
.tile .d { display: block; color: var(--text-3); font-size: 13px; margin-top: 2px; }
.tile:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-tint); }
.tile:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--surface-2); padding: 9px 16px; border-bottom: 1px solid var(--divider);
  white-space: nowrap; position: relative; }
.table th + th::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: var(--border); }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--hover); }
.table .muted { color: var(--text-3); }
.table .action { margin-top: 6px; display: flex; gap: 6px; color: var(--text-2); font-size: 13px; }
.table .action .i { margin-top: 2px; color: var(--warn-icon); }
.table tr.fail .action .i { color: var(--err); }
.table td.st { width: 1%; white-space: nowrap; }
.table td.name { font-weight: 600; width: 26%; }
.table-empty { padding: 26px 20px; text-align: center; color: var(--text-3); }
.table-empty strong { display: block; color: var(--text-2); margin-bottom: 2px; }
.table-empty .btn { margin-top: 12px; }

/* ---------- lists of steps (what an action will do / did) ---------- */
.steps-list { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.steps-list li { counter-increment: st; display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--divider); }
.steps-list li:first-child { border-top: 0; }
.steps-list li::before { content: counter(st); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.steps-list.done li::before { content: ""; background: var(--ok); border-color: var(--ok); }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(9, 13, 20, .55); display: grid; place-items: center; padding: 20px; animation: fade .12s ease-out; }
.modal { width: min(560px, 100%); background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-pop); border: 1px solid var(--divider); }
.modal .m-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--divider); }
.modal .m-head h2 { flex: 1; margin: 0; font-size: 17px; }
.modal .m-body { padding: 18px 20px; }
.modal .m-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--divider); }
@keyframes fade { from { opacity: 0; } }

/* ---------- misc ---------- */
.muted { color: var(--text-3); }
.lead { color: var(--text-2); }
.loading { display: flex; align-items: center; gap: 10px; color: var(--text-3); padding: 40px 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.cols > * { min-width: 0; }

@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidenav { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--divider); padding-bottom: 8px; }
  .sidenav .foot { display: none; }
  .wizard-steps { display: flex; overflow-x: auto; gap: 18px; padding-bottom: 6px; }
  .wizard-steps li { flex: none; padding-bottom: 6px; }
  .wizard-steps li::before { display: none; }
  .content { padding: 18px 16px 40px; }
  .kv, .kv.cols-4 { --cols: 2; }
  .cols, .split { grid-template-columns: minmax(0, 1fr); }
  .topnav .item.hide-sm { display: none; }
}
@media (max-width: 560px) {
  .kv, .kv.cols-2, .kv.cols-4 { --cols: 1; }
  .container > .c-head { flex-wrap: wrap; }
  .container > .c-head .actions, .page-header .actions { flex-wrap: wrap; flex: 1 1 100%; }
  .page-header { flex-direction: column; align-items: stretch; }
  .form-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; } }
.btn.primary.danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn.primary.danger:hover { background: color-mix(in srgb, var(--err) 85%, #000); border-color: color-mix(in srgb, var(--err) 85%, #000); }
.path { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); word-break: break-all; }
.counts { display: inline-flex; flex-wrap: wrap; gap: 4px 16px; }
.wizard-steps li.current.bad .marker, .wizard-steps li.current.warn .marker { color: #fff; }
.wizard-steps li.current.done .marker { color: var(--on-primary); }
