@font-face {
  font-family: "Geist";
  src: url("/static/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/static/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f6f6f7;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --hover: #f4f4f5;
  --line: #e6e6e9;
  --line-strong: #d4d4d8;
  --text: #09090b;
  --text-2: #52525b;
  --text-3: #a1a1aa;
  --accent: #4f46e5;
  --accent-2: #4338ca;
  --accent-soft: #eef0ff;
  --accent-ring: rgba(79, 70, 229, .22);
  --primary: #4f46e5;
  --primary-2: #4338ca;
  --ok: #059669;
  --ok-soft: #e7f7f0;
  --warn: #c2410c;
  --warn-soft: #fff1e6;
  --bad: #dc2626;
  --bad-soft: #fdecec;
  --k-static: #64748b;
  --k-php: #7c3aed;
  --k-python: #2563eb;
  --k-node: #16a34a;
  --k-proxy: #ea580c;
  --side-bg: #0b0b0f;
  --side-line: #1d1d24;
  --side-text: #9898a6;
  --side-strong: #f4f4f6;
  --side-hover: #16161c;
  --shadow-sm: 0 1px 2px rgba(9, 9, 11, .05);
  --shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 8px 24px -12px rgba(9, 9, 11, .12);
  --shadow-lg: 0 24px 64px -16px rgba(9, 9, 11, .35);
  --r: 12px;
  --r-sm: 8px;
  --side: 248px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --surface: #111114;
    --surface-2: #16161a;
    --hover: #1b1b20;
    --line: #232329;
    --line-strong: #31313a;
    --text: #fafafa;
    --text-2: #a1a1aa;
    --text-3: #6b6b76;
    --accent: #8b8cf8;
    --accent-2: #a5a6fb;
    --accent-soft: #1d1c3d;
    --accent-ring: rgba(139, 140, 248, .3);
    --primary: #5b55f0;
    --primary-2: #6a64f5;
    --ok: #34d399;
    --ok-soft: #0f2a21;
    --warn: #fb923c;
    --warn-soft: #2e1d0f;
    --bad: #f87171;
    --bad-soft: #321516;
    --k-static: #94a3b8;
    --k-php: #a78bfa;
    --k-python: #60a5fa;
    --k-node: #4ade80;
    --k-proxy: #fb923c;
    --side-bg: #050507;
    --side-line: #18181e;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .02) inset;
    --shadow-lg: 0 24px 64px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.loading > * { visibility: hidden; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--text-2); }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
svg.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--accent-ring); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; letter-spacing: -.02em; }
.mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px;
  font-weight: 750; font-size: 17px; line-height: 1; background: linear-gradient(145deg, #6d64ff, #4338ca); color: #fff; padding-bottom: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 4px 12px -2px rgba(79, 70, 229, .5); }
.mark b { color: #c7c4ff; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); cursor: pointer;
  font-weight: 550; font-size: 13.5px; white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.wide { width: 100%; height: 40px; }
.btn svg.ic { width: 16px; height: 16px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); cursor: pointer; flex: none;
  transition: background .12s, color .12s; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn.danger:hover { color: var(--bad); background: var(--bad-soft); }
.icon-btn svg.ic { width: 17px; height: 17px; }

/* ---------- forms ---------- */
label { display: grid; gap: 6px; font-weight: 550; font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); outline: none; font-weight: 400; font-size: 14px; box-shadow: var(--shadow-sm);
  transition: border-color .12s, box-shadow .12s; }
select { padding-right: 30px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 15px; }
textarea { height: auto; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
.hint { font-weight: 400; color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.form-error { color: var(--bad); font-size: 13px; white-space: pre-wrap; }
.form-error:empty { display: none; }
.check { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.segmented { display: flex; gap: 2px; padding: 3px; background: var(--hover); border: 1px solid var(--line); border-radius: 10px; }
.segmented button { flex: 1; min-height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  color: var(--text-2); font-weight: 550; font-size: 13px; transition: background .12s, color .12s; }
.segmented button:hover:not(:disabled) { color: var(--text); }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.segmented.wrap { flex-wrap: wrap; }
.segmented button:disabled { opacity: .4; cursor: not-allowed; }
.segmented.muted-seg { opacity: .45; pointer-events: none; }
details.advanced { border: 1px dashed var(--line-strong); border-radius: var(--r-sm); padding: 10px 12px; }
details.advanced summary { cursor: pointer; color: var(--text-2); font-size: 13px; font-weight: 550; }
details.advanced[open] summary { margin-bottom: 12px; }
details.advanced label + label { margin-top: 10px; }

.switch { position: relative; width: 36px; height: 20px; flex: none; cursor: pointer; display: inline-block; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong); transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:disabled + span { opacity: .45; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-label { display: inline-flex; flex-direction: row; align-items: center; gap: 9px; color: var(--text-2); font-size: 13px; font-weight: 550; }

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-art { background: var(--side-bg); color: var(--side-text); display: grid; place-items: center; padding: 48px;
  background-image: radial-gradient(600px 400px at 20% 10%, rgba(99, 91, 255, .28), transparent 60%),
                    radial-gradient(500px 400px at 90% 90%, rgba(56, 189, 248, .12), transparent 60%); }
.login-art-inner { max-width: 380px; display: grid; gap: 20px; }
.brand-lg { color: var(--side-strong); font-size: 22px; }
.brand-lg .mark { width: 40px; height: 40px; font-size: 22px; border-radius: 11px; }
.login-art p { font-size: 22px; line-height: 1.35; color: var(--side-strong); letter-spacing: -.02em; font-weight: 500; }
.login-art ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.login-art li { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.login-art li svg.ic { color: #a5a3ff; }
.login-card { align-self: center; justify-self: center; width: 100%; max-width: 380px; display: grid; gap: 18px; padding: 32px 24px; }
.login-card h1 { font-size: 24px; }
.login-card .muted { margin-top: 4px; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100%; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); display: flex; flex-direction: column;
  background: var(--side-bg); border-right: 1px solid var(--side-line); padding: 18px 12px 12px; z-index: 30;
  color: var(--side-text); }
.side .brand { color: var(--side-strong); }
.side-top { display: grid; gap: 14px; padding: 2px 8px 10px; }
.host-chip { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--side-hover);
  border: 1px solid var(--side-line); font-family: var(--mono); font-size: 12px; color: var(--side-strong);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.host-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); flex: none; }
.nav { display: grid; gap: 1px; overflow-y: auto; align-content: start; scrollbar-width: thin; scrollbar-color: var(--side-line) transparent; }
.nav-group { padding: 16px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5d5d6a; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 8px;
  color: var(--side-text); font-weight: 500; transition: background .12s, color .12s; }
.nav a:hover { background: var(--side-hover); color: var(--side-strong); }
.nav a.on { background: var(--side-hover); color: var(--side-strong); }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #7b74ff; }
.nav a.on svg.ic { color: #a5a3ff; }
.side-bottom { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 2px; border-top: 1px solid var(--side-line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, #6d64ff, #4338ca); color: #fff; font-weight: 650; font-size: 13px; }
.me-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.me-text b { color: var(--side-strong); font-weight: 550; font-size: 13px; }
.me-text b, .me-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { font-size: 12px; }
.side .icon-btn { color: var(--side-text); }
.side .icon-btn:hover { background: var(--side-hover); color: var(--side-strong); }
.scrim { display: none; }

.main { flex: 1; min-width: 0; margin-left: var(--side); display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; min-height: 64px;
  padding: 10px 32px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line); }
.top-title { flex: 1; min-width: 0; display: grid; }
.top h2 { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-2); font-weight: 500; width: fit-content; }
.crumb:hover { color: var(--text); }
.crumb svg.ic { width: 14px; height: 14px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; }
.view { padding: 28px 32px 56px; max-width: 1240px; width: 100%; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.section { padding: 18px 20px; }
.section h3, .panel-head h3 { font-size: 14px; font-weight: 600; }
.section h3 { margin-bottom: 6px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3 { flex: 1; }
.panel-head a { font-size: 13px; font-weight: 550; }
.intro { margin: 0 0 18px; max-width: 760px; color: var(--text-2); }
code { font-family: var(--mono); font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--hover); border: 1px solid var(--line); }
.empty { padding: 48px 16px; text-align: center; color: var(--text-2); }
.empty-state { padding: 56px 24px; display: grid; justify-items: center; gap: 10px; text-align: center; }
.empty-state .empty-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.empty-state h3 { font-size: 16px; }
.empty-state p { color: var(--text-2); max-width: 380px; margin-bottom: 8px; }
.skeleton { height: 140px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface), var(--hover), var(--surface));
  background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border: 1px solid var(--line); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- badges, chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 550; white-space: nowrap; background: var(--hover); color: var(--text-2);
  border: 1px solid var(--line); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.plain::before { display: none; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; background: var(--hover);
  color: var(--text-2); font-size: 11.5px; font-weight: 550; border: 1px solid var(--line); font-family: var(--mono); }
.kind { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px;
  font-weight: 600; color: var(--kc); background: color-mix(in srgb, var(--kc) 12%, transparent); white-space: nowrap; }
.kind::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--kc); }
.k-static { --kc: var(--k-static); }
.k-php { --kc: var(--k-php); }
.k-python { --kc: var(--k-python); }
.k-node { --kc: var(--k-node); }
.k-proxy, .k-other { --kc: var(--k-proxy); }
.site-avatar { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; font-weight: 650;
  font-size: 14px; text-transform: uppercase; color: var(--kc); background: color-mix(in srgb, var(--kc) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--kc) 22%, transparent); }
.site-avatar.lg { width: 52px; height: 52px; border-radius: 13px; font-size: 21px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 16px 18px 14px; display: grid; gap: 8px; align-content: start; }
.stat-head { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 550; font-size: 13px; }
.stat-head svg.ic { width: 15px; height: 15px; }
.stat-head .pct { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--text-3); font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 4px; letter-spacing: 0; }
.stat-sub { color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .5s ease; }
.bar.warn > span { background: var(--warn); }
.bar.bad > span { background: var(--bad); }
.spark { width: 100%; height: 36px; display: block; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.75; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark polygon { fill: color-mix(in srgb, var(--accent) 12%, transparent); }
.spark.green polyline { stroke: var(--ok); }
.spark.green polygon { fill: color-mix(in srgb, var(--ok) 12%, transparent); }
.spark.blue polyline { stroke: var(--k-python); }
.spark.blue polygon { fill: color-mix(in srgb, var(--k-python) 12%, transparent); }
.spark-empty { height: 36px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
.dash-col { display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.quick a, .quick button { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; transition: border-color .12s, background .12s; }
.quick a:hover, .quick button:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--surface); color: var(--text); }
.quick .q-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.quick span { display: grid; gap: 1px; }
.quick b { font-weight: 600; font-size: 13.5px; }
.quick small { color: var(--text-2); font-size: 12px; }
.svc-row { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 13px; }
.svc-row:first-child { border-top: 0; }
.svc-row .mono { flex: 1; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); color: var(--text); }
.list-row:first-child { border-top: 0; }
.list-row:hover { background: var(--surface-2); color: var(--text); }
.list-row .site-cell { flex: 1; min-width: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; margin: 0; }
.kv dt, .kv dd { padding: 10px 0; border-top: 1px solid var(--line); margin: 0; font-size: 13.5px; }
.kv dt { color: var(--text-2); }
.kv dd { text-align: right; padding-left: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kv dt:first-of-type, .kv dd:first-of-type { border-top: 0; }
.disk { display: grid; gap: 7px; padding: 10px 0; border-top: 1px solid var(--line); }
.disk:first-of-type { border-top: 0; }
.disk-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.disk-head span:last-child { color: var(--text-2); }

/* ---------- toolbar, tables ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 200px; max-width: 340px; position: relative; }
.toolbar .search svg.ic { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; color: var(--text-3); }
.toolbar .search input { padding-left: 33px; height: 34px; }
.toolbar .count { color: var(--text-3); font-size: 12.5px; margin-left: auto; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 550; color: var(--text-3); font-size: 12px; padding: 10px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child { border-top-left-radius: var(--r); }
th:last-child { border-top-right-radius: var(--r); }
td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13.5px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
tr.click { cursor: pointer; }
td.actions { text-align: right; white-space: nowrap; width: 1%; }
td.actions .icon-btn { width: 30px; height: 30px; }
td.chev { width: 1%; color: var(--text-3); padding-left: 0; }
.name-cell { display: grid; line-height: 1.35; min-width: 180px; }
.name-cell b { font-weight: 550; overflow-wrap: anywhere; }
.name-cell small { color: var(--text-2); font-size: 12.5px; }
.site-cell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.site-cell > div { display: grid; line-height: 1.35; min-width: 0; }
.site-cell b { font-weight: 600; overflow-wrap: anywhere; }
.site-cell small { color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.muted td { color: var(--text-2); }
tr.sub td:first-child { padding-left: 40px; position: relative; }
tr.sub td:first-child::before { content: ""; position: absolute; left: 24px; top: 0; height: 50%; width: 10px;
  border-left: 1.5px solid var(--line-strong); border-bottom: 1.5px solid var(--line-strong); border-bottom-left-radius: 6px; }
.form-card h3 { font-size: 14px; }
.ssl-list { display: grid; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.ssl-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); }
.ssl-row:first-child { border-top: 0; }
.ssl-row .site-cell { flex: 1; min-width: 0; }
.ssl-row .site-avatar { width: 28px; height: 28px; font-size: 12px; border-radius: 7px; }
.ssl-err { margin: 0 12px 10px; max-height: 160px; font-size: 11.5px; }
.list-row > svg.ic { color: var(--text-3); }

/* ---------- site detail ---------- */
.detail-head { display: flex; align-items: center; gap: 16px; padding: 20px; }
.detail-title { flex: 1; min-width: 0; display: grid; gap: 3px; }
.detail-title h2 { font-size: 20px; overflow-wrap: anywhere; }
.detail-title a { font-size: 13px; display: inline-flex; align-items: center; gap: 5px; width: fit-content; }
.detail-title a svg.ic { width: 14px; height: 14px; }
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tabs { display: flex; gap: 2px; margin: 20px 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { position: relative; padding: 10px 12px; border: 0; background: none; cursor: pointer; color: var(--text-2);
  font-weight: 550; font-size: 13.5px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); }
.tabs button.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info { padding: 16px 20px; border-top: 1px solid var(--line); display: grid; gap: 6px; min-width: 0; align-content: start; }
.info:nth-child(-n+2) { border-top: 0; }
.info:nth-child(2n) { border-left: 1px solid var(--line); }
.info > span { color: var(--text-3); font-size: 12px; font-weight: 550; }
.info > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; min-width: 0; }
.info .mono { overflow-wrap: anywhere; }
.stack { display: grid; gap: 14px; }
.form-card { padding: 20px; display: grid; gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.danger-zone { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.danger-zone > div { flex: 1; display: grid; gap: 2px; }
.danger-zone span { color: var(--text-2); font-size: 13px; }
.app-status { display: flex; align-items: center; gap: 10px; padding: 16px 20px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.app-status .spacer { flex: 1; }
.log-box { margin: 0; padding: 14px 16px; background: var(--side-bg); color: #d4d4d8; border-radius: 0 0 var(--r) var(--r);
  font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 420px; overflow: auto; min-height: 140px; }

/* ---------- domains ---------- */
.domains, .domain-list { display: grid; gap: 6px; }
.domain-row { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; }
.domain-row .mono { overflow-wrap: anywhere; min-width: 0; }
.domain-row .spacer { flex: 1; }
.domain-row .badge { height: 20px; font-size: 11px; padding: 0 7px; }
.domain-list .domain-row { padding: 7px 7px 7px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); min-height: 44px; }
.domain-list:empty { display: none; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; }
.catchall { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 18px; }
.catchall-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.catchall-text .muted { font-size: 13px; }
.catchall select { width: 280px; height: 34px; }
.catchall select:disabled { opacity: .5; }

/* ---------- pages ---------- */
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.page { overflow: hidden; display: grid; }
.page-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0;
  border-bottom: 1px solid var(--line); background: var(--surface-2); overflow: hidden; cursor: pointer; }
.page-thumb iframe { position: absolute; left: 0; top: 0; width: 250%; height: 250%; border: 0;
  transform: scale(.4); transform-origin: 0 0; pointer-events: none; background: #fff; }
.page-info { display: flex; align-items: center; gap: 2px; padding: 12px 8px 4px 16px; }
.page-title { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.page-title b, .page-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-title b { font-weight: 600; }
.page-title small { color: var(--text-2); }
.page-used { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 16px 14px; font-size: 12.5px; }
.page-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.page-editor .editor { min-height: 60vh; }
.page-preview { width: 100%; min-height: 60vh; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }

/* ---------- dns ---------- */
.ns-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 18px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 65%); }
.ns-text { flex: 1; min-width: 240px; display: grid; gap: 2px; }
.ns-text .muted { font-size: 13px; }
.ns-list { display: flex; gap: 8px; flex-wrap: wrap; }
.ns-item { display: flex; align-items: center; gap: 2px; padding: 3px 3px 3px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: var(--surface); font-size: 13px; }
.ns-item .icon-btn { width: 28px; height: 28px; }
.deleg-note { font-size: 13px; margin-left: 6px; }
.rec-value { overflow-wrap: anywhere; max-width: 520px; }
.rec-grid { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 12px; }
.suffix-input { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); overflow: hidden; }
.suffix-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.suffix-input input { border: 0; border-radius: 0; box-shadow: none !important; min-width: 0; }
.suffix-input span { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); color: var(--text-2);
  border-left: 1px solid var(--line); font-family: var(--mono); font-size: 12px; font-weight: 400; white-space: nowrap;
  max-width: 55%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- modules ---------- */
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.module { padding: 18px; display: grid; gap: 16px; }
.module-head { display: flex; gap: 12px; align-items: flex-start; }
.module-head .site-title { display: grid; gap: 2px; }
.module-head .site-title b { font-weight: 600; }
.module-head .site-title .muted { font-size: 13px; line-height: 1.45; }
.module-foot { display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.module-foot .spacer { flex: 1; }
.site-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); }
.module[data-id="php"] { --kc: var(--k-php); }
.module[data-id="python"] { --kc: var(--k-python); }
.module[data-id="node"] { --kc: var(--k-node); }
.module .site-icon { color: var(--kc); background: color-mix(in srgb, var(--kc) 13%, transparent); }
.ext-card { margin-top: 14px; padding-bottom: 18px; }
.ext-card h3 { margin-bottom: 12px; }
.exts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ext { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r-sm); font-weight: 400; cursor: pointer; background: var(--surface-2); }
.ext:hover { border-color: var(--line-strong); }
.ext-text { display: grid; line-height: 1.3; min-width: 0; flex: 1; }
.ext-text b { font-weight: 550; font-size: 13px; }
.ext-text small { color: var(--text-3); font-size: 11.5px; font-family: var(--mono); }
.job { padding: 14px 16px; margin-bottom: 14px; display: grid; gap: 10px; border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.job.bad { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.job .code { max-height: 220px; font-size: 11.5px; }

/* ---------- files ---------- */
.crumbs { display: flex; align-items: center; gap: 1px; flex-wrap: wrap; flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px;
  padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.crumbs button { border: 0; background: transparent; padding: 4px 7px; border-radius: 6px; cursor: pointer; color: var(--text-2); }
.crumbs button:hover { background: var(--hover); color: var(--text); }
.crumbs button:last-child { color: var(--text); font-weight: 600; }
.crumbs .sep { color: var(--text-3); }
.file-name { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; cursor: pointer;
  text-align: left; min-width: 0; color: var(--text); font-weight: 500; }
.file-name svg.ic { color: var(--text-3); }
.file-name.dir svg.ic { color: var(--accent); }
.file-name span { overflow-wrap: anywhere; }
.file-name:hover span { color: var(--accent); }
.drop { outline: 2px dashed var(--accent); outline-offset: -2px; }

/* ---------- code, editors ---------- */
.code { margin: 0; padding: 14px; background: var(--side-bg); color: #d4d4d8; border: 1px solid var(--side-line); border-radius: var(--r-sm);
  font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow: auto; }
textarea.editor { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; min-height: 55vh; resize: vertical; tab-size: 4;
  white-space: pre; background: var(--side-bg); color: #e4e4e7; border-color: var(--side-line); }
textarea.editor:focus { border-color: var(--accent); }

.app-bar { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.app-bar .spacer { flex: 1; }
.app-meta { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(9, 9, 11, .55); backdrop-filter: blur(3px); animation: fade .15s ease; }
.modal-card { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
.modal-card.wide { max-width: 1100px; }
.modal-card header { display: flex; align-items: center; gap: 12px; padding: 18px 16px 10px 22px; }
.modal-card header h3 { flex: 1; font-size: 16px; overflow-wrap: anywhere; }
.modal-body { padding: 6px 22px 20px; overflow: auto; display: grid; gap: 16px; }
.modal-card footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line);
  background: var(--surface-2); border-radius: 0 0 16px 16px; }
.modal-card footer:empty { display: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(6px) scale(.985); opacity: 0; } }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 11px 14px; border-radius: 10px; background: #18181b; color: #fafafa; box-shadow: var(--shadow-lg);
  font-weight: 500; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; animation: pop .2s ease; border: 1px solid #27272a; }
.toast.bad { background: var(--bad); border-color: transparent; color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 860px) {
  .side { transform: translateX(-100%); transition: transform .2s ease; }
  body.side-open .side { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .4); }
  body.side-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(9, 9, 11, .5); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .top { padding: 8px 12px; min-height: 56px; }
  .view { padding: 16px 16px 40px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 22px; }
  .hide-sm { display: none; }
  td, th { padding: 10px 12px; }
  .name-cell, .site-cell { min-width: 0; }
  .toolbar .search { max-width: none; }
  .top-actions .btn .label { display: none; }
  .top-actions .btn { padding: 0 9px; }
  .modal { padding: 0; place-items: end stretch; }
  .modal-card, .modal-card.wide { max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal-card footer { border-radius: 0; }
  .page-editor { grid-template-columns: 1fr; }
  .page-editor .editor, .page-preview { min-height: 40vh; }
  .catchall { flex-wrap: wrap; }
  .catchall-text { flex-basis: 100%; }
  .catchall select { flex: 1; width: auto; }
  .rec-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .info:nth-child(2) { border-top: 1px solid var(--line); }
  .info:nth-child(2n) { border-left: 0; }
  .detail-head { flex-wrap: wrap; padding: 16px; }
  .danger-zone { flex-wrap: wrap; }
  .list-row .kind { display: none; }
  .list-row { padding: 11px 14px; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
}

/* ---------- accounts, packages (admin) ---------- */
.acting-bar { display: flex; align-items: center; gap: 10px; padding: 9px 32px; background: var(--warn-soft); color: var(--warn);
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); font-size: 13px; font-weight: 500; }
.acting-bar span { flex: 1; color: var(--text); }
.acting-bar svg.ic { width: 16px; height: 16px; }
.nav-search { position: relative; margin: 2px 0 6px; }
.nav-search svg.ic { position: absolute; left: 10px; top: 9px; width: 15px; height: 15px; color: #5d5d6a; }
.nav-search input { height: 34px; padding-left: 32px; background: var(--side-hover); border-color: var(--side-line); color: var(--side-strong);
  font-size: 13px; box-shadow: none; }
.nav-search input::placeholder { color: #5d5d6a; }
.nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
.plain-tag { font-family: var(--sans); font-size: 12px; height: 22px; padding: 0 8px; }
.use { display: grid; gap: 5px; min-width: 120px; }
.use-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.use-head span:first-child { color: var(--text-2); font-weight: 550; }
.mini-use .use-head span:first-child { display: none; }
.mini-use .use-head { font-size: 12px; color: var(--text-2); }
.uses { display: grid; gap: 14px; margin-top: 8px; }
.limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-sm); overflow: hidden; }
.limits span { display: grid; gap: 1px; padding: 8px 10px; background: var(--surface-2); }
.limits small { color: var(--text-3); font-size: 11.5px; }
.limits b { font-size: 13px; font-weight: 600; }
.limit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kind-checks { display: flex; gap: 16px; flex-wrap: wrap; padding: 4px 0; }
.acc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.acc-stats div { display: grid; gap: 2px; padding: 14px 18px; border-left: 1px solid var(--line); }
.acc-stats div:first-child { border-left: 0; }
.acc-stats b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.acc-stats small { color: var(--text-2); font-size: 12px; }

/* ---------- account owner home (tool tiles + stats) ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.home-main { display: grid; gap: 14px; }
.home-side { display: grid; gap: 14px; position: sticky; top: 84px; }
.tool-search { position: relative; }
.tool-search svg.ic { position: absolute; left: 12px; top: 12px; width: 17px; height: 17px; color: var(--text-3); }
.tool-search input { height: 42px; padding-left: 38px; font-size: 14.5px; border-radius: 10px; }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px; padding: 8px; }
.tool { display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; border-radius: 10px; background: transparent;
  text-align: left; cursor: pointer; color: var(--text); }
.tool:hover { background: var(--hover); }
.tool .q-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); }
.tool span:last-child { display: grid; gap: 1px; min-width: 0; }
.tool b { font-weight: 600; font-size: 13.5px; }
.tool small { color: var(--text-2); font-size: 12px; }
.narrow { max-width: 760px; }
@media (max-width: 1100px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-side { position: static; }
}
@media (max-width: 860px) {
  .acting-bar { padding: 8px 12px; flex-wrap: wrap; }
  .limits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acc-stats div:nth-child(3) { border-left: 0; }
  .limit-grid { grid-template-columns: 1fr; }
}

/* ---------- databases and mail ---------- */
.section-title { font-size: 14px; font-weight: 600; margin: 22px 0 10px; }
.suffix-input.prefix span { border-left: 0; border-right: 1px solid var(--line); max-width: 45%; }
.tag.grant { gap: 2px; padding-right: 2px; }
.tag-x { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 0; border-radius: 4px; padding: 0;
  background: none; color: var(--text-3); cursor: pointer; }
.tag-x:hover { background: var(--bad-soft); color: var(--bad); }
.tag-x svg.ic { width: 11px; height: 11px; }
.use.mini { min-width: 150px; max-width: 220px; }
.use.mini .use-head { font-size: 12px; }
.mail-addr { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); overflow: hidden; }
.mail-addr:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.mail-addr input, .mail-addr select { border: 0; border-radius: 0; box-shadow: none !important; min-width: 0; }
.mail-addr input { flex: 1; }
.mail-addr select { flex: 1.2; border-left: 1px solid var(--line); }
.mail-addr span { display: flex; align-items: center; padding: 0 10px; background: var(--surface-2); color: var(--text-2);
  border-left: 1px solid var(--line); font-family: var(--mono); }
.notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 4px; font-size: 13.5px; }
.notice > svg.ic { flex: none; width: 18px; height: 18px; }
.notice > span { flex: 1; }
.warn-notice { background: var(--warn-soft); border-color: transparent; color: var(--text); }
.warn-notice > svg.ic { color: var(--warn); }
.rec-value .clip { display: inline-block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.tag-btn { display: inline-flex; align-items: baseline; gap: 6px; border: 0; background: none; padding: 0; cursor: pointer;
  color: inherit; font: inherit; }
.tag-btn small { color: var(--text-3); font-family: var(--sans, inherit); font-size: 11px; font-weight: 500; }
.tag-btn:hover { color: var(--accent); }
.priv-all { margin-top: 4px; }
.priv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.priv-grid .check { font-size: 12.5px; }

/* ---------- database manager ---------- */
.dbm { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.dbm-main, .dbm-side { min-width: 0; }
.dbm-side { display: grid; gap: 8px; padding: 12px; position: sticky; top: 76px; max-height: calc(100vh - 100px); grid-template-rows: auto auto minmax(0, 1fr) auto; }
.dbm-side input[type=search] { height: 32px; }
#dbmTables { overflow-y: auto; display: grid; align-content: start; gap: 1px; margin: 0 -4px; }
#dbmTables a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--text-2); min-width: 0; }
#dbmTables a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dbmTables a svg.ic { width: 15px; height: 15px; flex: none; color: var(--text-3); }
#dbmTables a:hover { background: var(--hover); color: var(--text); }
#dbmTables a.on { background: var(--accent-soft); color: var(--accent); }
#dbmTables a.on svg.ic { color: var(--accent); }
.dbm-none { padding: 6px 8px; font-size: 13px; }
.dbm-side .btn.ghost { justify-content: flex-start; }
.dbm-main .tabs { margin-top: 0; }
.dbm-main .notice { margin-bottom: 12px; }
.dbm-grid td, .dbm-grid th { padding: 7px 12px; font-size: 12.5px; white-space: nowrap; }
.dbm-grid td { font-family: var(--mono); max-width: 320px; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.dbm-grid th svg.ic { width: 12px; height: 12px; vertical-align: -1px; color: var(--warn); }
.dbm-grid th.sortable { cursor: pointer; user-select: none; }
.dbm-grid th.sortable:hover, .dbm-grid th.sorted { color: var(--text); }
.dbm-grid tr.editable { cursor: pointer; }
.dbm-grid tr.editable:hover td { background: var(--hover); }
.dbm-grid .pick { width: 1%; padding-right: 0; }
.dbm-grid .pick input { accent-color: var(--accent); margin: 0; }
.null { color: var(--text-3); font-style: italic; font-family: var(--mono); font-size: 12px; }
.mini-select { height: 30px; width: auto; padding: 0 28px 0 10px; font-size: 13px; }
.pager { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.toolbar .count + .mini-select { margin-left: 0; }
.col-head, .col-row { display: grid; grid-template-columns: minmax(110px, 1.4fr) 130px 90px minmax(100px, 1fr) 62px 52px 80px 32px; gap: 8px; align-items: center; }
#ntMore { justify-self: start; }
.col-head { font-size: 12px; color: var(--text-3); font-weight: 550; margin-top: 4px; }
#ntCols, #colOne { display: grid; gap: 8px; }
.col-row input[type=text], .col-row select { height: 32px; font-size: 13px; }
.col-row .check { font-size: 12.5px; white-space: nowrap; }
#colOne .col-row { grid-template-columns: minmax(110px, 1.4fr) 130px 90px minmax(100px, 1fr) 62px 52px; }
.row-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.row-form label:has(textarea) { grid-column: 1 / -1; }
.col-label { display: flex; align-items: baseline; gap: 8px; }
.col-label small { font-weight: 400; }
.col-label .check { margin-left: auto; font-size: 12px; }
.row-form textarea { font-family: var(--mono); font-size: 12.5px; resize: vertical; }
.sql-card { padding: 0; overflow: hidden; }
textarea.sql-editor { min-height: 180px; border: 0; border-radius: 0; box-shadow: none; display: block; width: 100%; }
textarea.sql-editor:focus { box-shadow: none; }
.sql-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; font-size: 12.5px; }
.sql-bar .mini-select { max-width: 320px; }
.sql-db { margin-left: auto; }
.sql-time { margin: 14px 0 6px; font-size: 12.5px; }
.sql-meta { margin: 12px 0 6px; font-size: 12.5px; }
#sqlOut .notice { margin-top: 10px; white-space: pre-wrap; }
.create-sql { position: relative; padding: 0; overflow: hidden; }
.create-sql .code { border: 0; border-radius: 0; white-space: pre; overflow-x: auto; }
.create-sql .copy-btn, .create-sql > button { position: absolute; top: 8px; right: 8px; }
.io-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.io-card { padding: 18px; display: grid; gap: 12px; }
.io-card h3 { font-size: 15px; }
.ex-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; max-height: 260px; overflow-y: auto; padding: 2px; }
@media (max-width: 860px) {
  .dbm { grid-template-columns: minmax(0, 1fr); }
  .dbm-side { position: static; max-height: none; grid-template-rows: none; }
  #dbmTables { max-height: 180px; }
  .io-grid, .row-form { grid-template-columns: 1fr; }
  .col-head { display: none; }
  .col-row, #colOne .col-row { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
}
a.btn:not(.primary) { color: var(--text); }
.io-card input[type=file] { font-size: 13px; color: var(--text-2); }

/* ---------- security and settings ---------- */
.sec-summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 14px; }
.sec-summary > div { display: grid; gap: 2px; }
.sec-summary b { font-size: 15px; }
.sec-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.sec-icon svg.ic { width: 20px; height: 20px; }
.sec-summary.ok .sec-icon { background: var(--ok-soft); color: var(--ok); }
.sec-summary.warn .sec-icon { background: var(--warn-soft); color: var(--warn); }
.sec-summary.bad .sec-icon { background: var(--bad-soft); color: var(--bad); }
.check-row { display: grid; grid-template-columns: 76px minmax(140px, 220px) minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13.5px; }
.check-row:first-child { border-top: 0; }
.check-row .badge { justify-self: start; }
.check-row b { font-weight: 550; }
.check-row .btn svg.ic { width: 14px; height: 14px; }
.sec-head { display: flex; align-items: center; gap: 16px; padding: 14px 18px; margin-bottom: 14px; }
.sec-head > div { flex: 1; display: grid; gap: 4px; min-width: 0; }
.sec-head > div > b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sec-head .muted { font-size: 13px; line-height: 1.5; }
.sec-note { margin-top: 14px; font-size: 13px; color: var(--text-2); }
.sec-note > svg.ic { color: var(--text-3); }
.f2b-stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 4px; }
.upd-stats { grid-template-columns: 1fr 1fr 1.4fr; margin-bottom: 4px; }
.sec-grid { margin-top: 18px; }
.sec-form { padding: 18px; display: grid; gap: 14px; align-content: start; }
.sec-form h3 { font-size: 14px; font-weight: 600; }
.sec-form h3:not(:first-child) { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.sec-form .grid-2 { margin-top: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.section-title.inline { margin: 0; }
.upd-log { max-height: 320px; overflow: auto; white-space: pre-wrap; font-size: 12px; }
.center { text-align: center; margin-top: 10px; }
.settings { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.set-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 1000px) {
  .settings { grid-template-columns: minmax(0, 1fr); }
  .upd-stats { grid-template-columns: 1fr 1fr; }
  .upd-stats .upd-run { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .check-row { grid-template-columns: 76px minmax(0, 1fr) auto; }
  .check-row > .muted { grid-column: 2 / -1; grid-row: 2; }
  .sec-head { flex-wrap: wrap; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .sec-grid { grid-template-columns: minmax(0, 1fr); }
}
.ssh-info { margin-bottom: 18px; }
.sec-tools { margin-left: auto; }
.more-row td { text-align: center; }

/* =====================================================================
   Hosting-panel layout: two-row navy masthead, grey command bar with menu
   search and breadcrumb, grouped side menu of plain links, light page
   titles, framed form sections with label | field rows. Loaded last; it
   overrides the base styles above.
   ===================================================================== */
@font-face { font-family: "Open Sans"; src: url("/static/OpenSans-latin.woff2") format("woff2"); font-weight: 300 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Open Sans"; src: url("/static/OpenSans-latin-ext.woff2") format("woff2"); font-weight: 300 800; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --hover: #f0f4f8;
  --line: #dddddd;
  --line-strong: #c4c4c4;
  --text: #333333;
  --text-2: #666666;
  --text-3: #999999;
  --accent: #1c87c9;
  --accent-2: #136ba1;
  --accent-soft: #e8f3fa;
  --accent-ring: rgba(28, 135, 201, .25);
  --primary: #179bd7;
  --primary-2: #1283b8;
  --ok: #3c9a32;
  --ok-soft: #e6f4e3;
  --warn: #c07800;
  --warn-soft: #fdf3dd;
  --bad: #d0312d;
  --bad-soft: #fbe6e5;
  --mast: #293a4a;
  --side-bg: #ffffff;
  --side-line: #dddddd;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 6px 30px rgba(0, 0, 0, .3);
  --r: 0;
  --r-sm: 3px;
  --side: 218px;
  --mast-h: 77px;
  --cmd-h: 42px;
  --sans: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: Menlo, Consolas, "DejaVu Sans Mono", monospace;
  color-scheme: light;
}
body { font-size: 13px; line-height: 1.5; color: var(--text); -webkit-font-smoothing: auto; }
h1, h2, h3 { letter-spacing: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-2); text-decoration: underline; }
.mono { letter-spacing: 0; font-size: 12px; }
svg.ic { stroke-width: 1.8; }

/* ---------- masthead ---------- */
.masthead { position: fixed; inset: 0 0 auto 0; height: var(--mast-h); z-index: 40; background: var(--mast); color: #fff; padding: 0 16px; }
.mast-info { position: absolute; top: 6px; right: 16px; display: flex; gap: 16px; font-size: 13.5px; color: #fff; white-space: nowrap; }
.mast-row { position: absolute; left: 16px; right: 16px; bottom: 10px; display: flex; align-items: center; gap: 22px; }
.masthead .brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.masthead .wordmark { font-size: 30px; font-weight: 800; font-style: italic; letter-spacing: -.04em; line-height: 1; }
.mark { width: 30px; height: 30px; border-radius: 4px; font-size: 17px; background: #ff6c2c; box-shadow: none; }
.mark b { color: #ffd2bd; }
.mast-links { display: flex; align-items: center; gap: 24px; font-size: 14.5px; }
.mast-links a, .mast-link { color: #fff; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.mast-links a:hover, .mast-link:hover { color: #fff; text-decoration: underline; }
#mastLinks { display: contents; }
.masthead .menu-btn { color: #fff; }
.masthead .menu-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- command bar ---------- */
.cmdbar { position: fixed; top: var(--mast-h); left: 0; right: 0; height: var(--cmd-h); z-index: 35; display: flex; align-items: center; gap: 8px;
  background: #f0f0f0; border-bottom: 1px solid #dcdcdc; padding-right: 16px; }
.cmd-search { position: relative; width: var(--side); flex: none; padding: 4px 3px; }
.cmd-search input { height: 34px; padding: 0 40px 0 8px; border: 1px solid #c4c4c4; border-radius: 3px; box-shadow: none; font-size: 13px; background: #fff; }
.cmd-search input:focus { border-color: #ff6c2c; box-shadow: none; }
.cmd-search-btn { position: absolute; right: 6px; top: 7px; width: 28px; height: 28px; border-radius: 3px; background: #ff6c2c; color: #fff;
  display: grid; place-items: center; pointer-events: none; }
.cmd-search-btn svg.ic { width: 16px; height: 16px; stroke-width: 2.4; }
.cmd-toggle { width: 30px; height: 30px; border: 0; background: none; color: #555; cursor: pointer; display: grid; place-items: center; }
.cmd-toggle:hover { color: #000; }
.trail { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: nowrap; gap: 5px; font-size: 14px; color: #555; overflow: hidden; white-space: nowrap; }
.trail a { display: inline-flex; align-items: center; gap: 5px; color: #888; }
.trail a:hover { color: var(--accent); }
.trail a svg.ic { width: 14px; height: 14px; }
.trail b { font-weight: 400; color: #333; overflow: hidden; text-overflow: ellipsis; }
.trail .sep { font-style: normal; color: #888; }
.cmd-host { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid #c4c4c4; border-radius: 3px;
  background: #fff; font-family: var(--mono); font-size: 12px; color: #555; white-space: nowrap; }
.cmd-host .dot { width: 7px; height: 7px; border-radius: 50%; background: #3c9a32; }

/* ---------- side menu ---------- */
.side { top: calc(var(--mast-h) + var(--cmd-h)); padding: 0; width: var(--side); background: #fff; border-right: 1px solid #ccc; color: #333; display: flex; flex-direction: column; }
.side-tools { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #ccc; flex: none; }
.side-tools button { height: 26px; border: 0; border-right: 1px solid #ccc; background: linear-gradient(#fafafa, #e6e6e6); color: #888; cursor: pointer; display: grid; place-items: center; }
.side-tools button:last-child { border-right: 0; }
.side-tools button:hover { color: #333; }
.side-tools svg.ic { width: 18px; height: 18px; fill: #9a9a9a; stroke: #fff; stroke-width: 2; }
.nav { flex: 1; display: block; overflow-y: auto; padding: 0; scrollbar-width: thin; scrollbar-color: #bbb #f0f0f0; }
.nav-sec { border-bottom: 1px solid #d5d5d5; }
.nav-group { width: 100%; display: flex; align-items: center; gap: 8px; height: 29px; padding: 0 0 0 4px; border: 0; cursor: pointer; text-align: left;
  background: #ececec; color: #444; font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; border-bottom: 1px solid #d5d5d5; }
.nav-group:hover { background: #e2e2e2; }
.nav-group .g-icon { width: 20px; height: 20px; display: grid; place-items: center; color: #4a6f96; }
.nav-group .g-icon svg.ic { width: 16px; height: 16px; }
.nav-group .g-name { flex: 1; }
.nav-group .g-chev { width: 34px; height: 100%; display: grid; place-items: center; border-left: 1px solid #ccc; color: #aaa; }
.nav-group .g-chev svg.ic { width: 13px; height: 13px; stroke-width: 2; }
.nav-sec.shut .g-chev svg.ic { transform: rotate(-90deg); }
.nav-sec.shut .nav-items, .nav-sec.shut .nav-group { border-bottom: 0; }
.nav-sec.shut .nav-items { display: none; }
.nav.searching .nav-sec .nav-items { display: block; }
.nav-items { padding: 0; background: #fff; }
.nav-items a { display: block; height: auto; padding: 4px 10px; border: 0; border-radius: 0; color: #333; font-size: 12.5px; font-weight: 400; line-height: 19px; }
.nav-items a:hover { background: #f2f2f2; color: #333; text-decoration: none; }
.nav-items a.on { background: var(--mast); color: #fff; font-weight: 400; }
.nav a.on::before { display: none; }
.scrim { display: none; }
body.side-hidden .side { display: none; }
body.side-hidden .main { margin-left: 0; }

/* ---------- page ---------- */
.main { margin-left: var(--side); padding-top: calc(var(--mast-h) + var(--cmd-h)); min-height: 100vh; display: flex; flex-direction: column; }
.top { position: static; min-height: 0; padding: 18px 20px 6px; background: none; backdrop-filter: none; border: 0; align-items: center; }
.title-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.title-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: none; color: #4a6f96; background: none; }
.title-icon svg.ic { width: 38px; height: 38px; stroke-width: 1.5; }
.top h2 { font-size: 24px; font-weight: 400; color: #333; }
.view { flex: 1; padding: 12px 20px 40px; max-width: 1400px; }
.acting-bar { padding: 8px 20px; border-radius: 0; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid #ddd;
  background: #f5f5f5; font-size: 12px; color: #888; }
.foot nav { display: flex; flex-wrap: wrap; }
.foot nav a { padding: 0 10px; border-left: 1px solid #ccc; line-height: 1.1; }
.foot nav a:first-child { padding-left: 0; border-left: 0; }

/* ---------- boxes, tables ---------- */
.card { border: 1px solid #ddd; border-radius: 0; box-shadow: none; }
.panel-head { padding: 10px 14px; background: #f5f5f5; border-bottom: 1px solid #ddd; }
.panel-head h3, .section h3 { font-size: 15px; font-weight: 400; color: #333; }
.section-title { font-size: 18px; font-weight: 400; color: #333; margin: 22px 0 10px; }
th { color: #333; font-size: 12.5px; font-weight: 700; padding: 8px 10px; background: #f5f5f5; border-bottom: 1px solid #ccc; }
th:first-child, th:last-child { border-radius: 0; }
td { padding: 8px 10px; font-size: 13px; border-bottom: 1px solid #e5e5e5; }
tbody tr:nth-child(even) td { background: #fafafa; }
tbody tr:hover td { background: #f0f6fb; }
.badge { height: 20px; padding: 0 7px; border-radius: 3px; font-size: 11.5px; font-weight: 600; }
.tag, .kind { border-radius: 3px; }
.site-avatar, .avatar, .avatar.sm { border-radius: 3px; }
.empty-state .empty-icon { border-radius: 4px; }
.skeleton { border-radius: 0; }
.stat-value { font-weight: 400; letter-spacing: 0; }

/* ---------- buttons, inputs ---------- */
.btn { height: 32px; padding: 0 14px; border-radius: 4px; font-weight: 400; font-size: 13.5px; color: #333; background: #fff; border-color: #ccc; box-shadow: none; }
.btn:hover { background: #ebebeb; border-color: #adadad; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: #1585b8; color: #fff; }
.btn.primary:hover { background: var(--primary-2); border-color: #0f6f9c; color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: #fdf0f0; border-color: #e0a3a1; }
.btn.danger.solid { background: #d9534f; border-color: #c9302c; color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.wide { height: 38px; font-size: 14px; }
.icon-btn { border-radius: 3px; color: #666; }
.icon-btn:hover { background: #eee; color: var(--accent); }
label { font-weight: 700; font-size: 13px; color: #333; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  height: 30px; border-radius: 0; font-size: 13.5px; border-color: #aaa; box-shadow: none; padding: 0 6px; }
select { padding-right: 26px; border-radius: 2px; }
textarea { height: auto; padding: 6px; }
input:focus, select:focus, textarea:focus { border-color: #66afe9; box-shadow: 0 0 6px rgba(102, 175, 233, .5); }
.check { font-weight: 400; }
.segmented { border-radius: 3px; padding: 2px; }
.segmented button { border-radius: 2px; }

/* ---------- tabs ---------- */
.tabs { gap: 2px; margin: 4px 0 16px; border-bottom: 1px solid #ddd; padding: 0; }
.tabs button { padding: 8px 15px; margin-bottom: -1px; border: 1px solid transparent; border-radius: 4px 4px 0 0; background: none; color: var(--accent); font-size: 13.5px; font-weight: 400; }
.tabs button:hover { background: #eee; border-color: #eee #eee #ddd; color: var(--accent-2); }
.tabs button.on { background: #fff; color: #555; border-color: #ddd #ddd #fff; }
.tabs button.on::after { display: none; }

/* ---------- framed form sections (one row per field) ---------- */
.whm-form { max-width: 620px; display: grid; gap: 18px; }
.frame { background: #e6e6e6; padding: 8px; }
.frame-in { background: #fff; border: 1px solid #c8c8c8; padding: 14px 16px 6px; }
.frame-in h3 { font-size: 19px; font-weight: 400; color: #333; margin: 0 0 8px; }
.form-rows { width: 100%; border-collapse: collapse; }
.form-rows th, .form-rows td { background: none !important; border: 0; border-top: 1px solid #ddd; padding: 12px 8px; font-size: 13.5px; vertical-align: middle; }
.form-rows tr:first-child th, .form-rows tr:first-child td { border-top: 0; }
.form-rows th { width: 200px; text-align: left; font-weight: 700; color: #333; white-space: normal; }
.form-rows th label { font-size: 13.5px; }
.form-rows td input[type=text], .form-rows td input[type=email], .form-rows td select { width: 100%; max-width: 230px; }
.form-rows td.ok-cell { width: 24px; padding-left: 0; }
.v-ok, .v-bad { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.v-ok { background: #3c9a32; }
.v-bad { background: #d0312d; }
.v-ok svg.ic, .v-bad svg.ic { width: 12px; height: 12px; stroke-width: 3; }
.strength { display: inline-block; padding: 2px 6px; border: 1px solid #333; font-size: 13px; margin-right: 8px; }
.strength.s1 { background: #ff6b6b; }
.strength.s2 { background: #ffc24b; }
.strength.s3 { background: #c4f14d; }
.strength.s4 { background: #7cfc00; }
.form-submit { padding: 4px 0; }
.form-rows .limits { max-width: 360px; }

/* ---------- admin home: icon list in four columns ---------- */
.home-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 20px; padding: 10px 0; }
.home-item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; color: #333; font-size: 14.5px; border-radius: 3px; }
.home-item:hover { background: #f2f6fa; color: var(--accent); text-decoration: none; }
.hi-icon { width: 40px; height: 40px; border-radius: 6px; display: grid; place-items: center; flex: none; color: #fff; }
.hi-icon svg.ic { width: 22px; height: 22px; }

/* ---------- account owner home (grouped icon boxes, stats column) ---------- */
.home-grid { grid-template-columns: 270px minmax(0, 1fr); gap: 16px; }
.home-main, .home-side { gap: 14px; }
/* The account facts and usage stay in view while the tools scroll */
.home-side { position: sticky; top: calc(var(--mast-h) + var(--cmd-h) + 16px); }
.tool-group { overflow: hidden; }
.group-head { width: 100%; display: flex; align-items: center; gap: 7px; padding: 8px 12px; border: 0; border-bottom: 1px solid #ddd;
  background: #f5f5f5; cursor: pointer; text-align: left; color: #333; }
.group-head h3 { font-size: 15px; font-weight: 400; }
.group-head svg.ic { width: 14px; height: 14px; color: #999; transform: rotate(90deg); }
.group-head.static { cursor: default; }
.tool-group.shut .group-head { border-bottom: 0; }
.tool-group.shut .group-head svg.ic { transform: none; }
.tool-group.shut .icon-grid { display: none; }
.tool-group.found .icon-grid { display: grid; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 10px; padding: 10px 12px; }
.icon-item { display: flex; align-items: center; gap: 10px; padding: 6px; color: var(--accent); font-size: 13.5px; border-radius: 3px; }
.icon-item:hover { background: #f2f6fa; text-decoration: none; }
.icon-item:hover .icon-label { text-decoration: underline; }
.icon-item .q-icon { width: 36px; height: 36px; border-radius: 5px; display: grid; place-items: center; flex: none; color: #fff; background: #2f7fc1; }
.icon-item .q-icon svg.ic { width: 20px; height: 20px; }
.tool-search input { height: 34px; border-radius: 0; padding-left: 34px; }
.tool-search svg.ic { top: 9px; left: 10px; }
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { padding: 7px 10px; font-size: 12.5px; border-bottom: 1px solid #e5e5e5; text-align: left; }
.facts th { width: 1%; white-space: nowrap; background: #fafafa; font-weight: 700; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts td { overflow-wrap: anywhere; }
.facts tbody tr:nth-child(even) td, .facts tbody tr:hover td { background: transparent; }
.pad { padding: 12px 14px; }
body.role-account .side, body.role-account .side-tools, body.role-account .cmd-search, body.role-account .cmd-toggle,
body.role-account .menu-btn { display: none !important; }
body.role-account .main { margin-left: 0; }
body.role-account .trail { padding-left: 16px; }

/* ---------- modal forms: label left, field right ---------- */
.modal-card { border-radius: 4px; }
.modal-card header { padding: 12px 14px 12px 18px; border-bottom: 1px solid #e5e5e5; }
.modal-card header h3 { font-size: 18px; font-weight: 400; }
.modal-card footer { border-radius: 0 0 4px 4px; background: #f5f5f5; }
.modal-body > label:not(.check), .form-card > label:not(.check), #setForm label[data-key] {
  grid-template-columns: 180px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: center; padding: 8px 0; border-bottom: 1px solid #e5e5e5; }
.modal-body > label:not(.check) > .hint, .form-card > label:not(.check) > .hint, #setForm label[data-key] > .hint { grid-column: 2; }
.modal-body { gap: 6px; }
#setForm .grid-2 { display: block; }
#setForm h3 { font-size: 19px; font-weight: 400; }
#setForm { gap: 4px; }
.toast { border-radius: 4px; background: #333; border-color: #222; }

/* ---------- login ---------- */
.login { display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: #f5f5f5; }
.login-art { display: none; }
.login-card { max-width: 380px; padding: 28px; background: #fff; border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.login-card .mark { width: 36px; height: 36px; font-size: 20px; }
.login-card h1 { font-size: 22px; font-weight: 400; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .home-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-side { order: 2; position: static; }
  .mast-info { font-size: 12px; gap: 10px; }
}
@media (max-width: 860px) {
  :root { --mast-h: 56px; }
  .mast-info { display: none; }
  .mast-row { bottom: 10px; left: 8px; right: 8px; gap: 14px; }
  .masthead .wordmark { font-size: 24px; }
  .mast-links { gap: 14px; font-size: 13px; margin-left: auto; }
  .mast-links a:not(:first-child) { display: none; }
  .cmd-search, .cmd-toggle, .cmd-host { display: none; }
  .trail { padding-left: 12px; font-size: 13px; }
  .side { transform: translateX(-100%); transition: transform .2s ease; z-index: 30; }
  body.side-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  body.side-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .4); }
  body.side-hidden .side { display: flex; }
  .main { margin-left: 0; }
  .top { padding: 14px 14px 4px; }
  .view { padding: 10px 14px 40px; }
  .home-list { grid-template-columns: minmax(0, 1fr); }
  .form-rows th { width: 120px; }
  .modal-body > label:not(.check), .form-card > label:not(.check), #setForm label[data-key] { grid-template-columns: minmax(0, 1fr); }
  .modal-body > label:not(.check) > .hint, .form-card > label:not(.check) > .hint, #setForm label[data-key] > .hint { grid-column: 1; }
  .foot { padding: 12px 14px; }
}

/* Page content centred in the space next to the side menu */
.top, .view { width: 100%; max-width: 1400px; margin-left: auto; margin-right: auto; }
.acting-bar { width: 100%; }

/* ---------- consistency pass ---------- */
/* The page keeps its width whether or not it scrolls, so content never jumps sideways */
html { scrollbar-gutter: stable; }
/* Underline only plain text links, never whole rows, cards or badges */
a:hover { text-decoration: none; }
.trail a:hover, .foot a:hover, .mast-links a:hover, .hint a:hover, p a:hover, td > a:hover, .panel-head a:hover, .icon-item:hover .icon-label { text-decoration: underline; }
.list-row:hover, .list-row:hover * { text-decoration: none; }
/* Every page starts at the same height under the title */
.view > :first-child { margin-top: 0; }
/* The code editor page: its frame (editor.html) stays here while other pages are open */
.editor-holder { padding: 12px 20px 12px; min-height: 360px; }
.editor-frame { display: block; width: 100%; height: 100%; border: 1px solid var(--line); background: #fff; }
body.editor-view .view, body.editor-view .foot { display: none; }
/* the file manager uses the whole width, so its header does too: same edges as the frame below */
body.editor-view .top { max-width: none; padding-left: 20px; padding-right: 20px; padding-bottom: 0; }
body.editor-view .top-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .editor-holder { padding: 8px 0 0; }
  .editor-frame { border-width: 1px 0 0; }
  body.editor-view .top { flex-wrap: wrap; }
  body.editor-view .top-actions { width: 100%; }
}
.cmdbar { padding-right: 20px; }
/* One shape language: square-ish corners, flat surfaces, the same blue */
.quick { gap: 8px; padding: 12px; }
.quick a, .quick button { border-radius: 3px; border-color: #ddd; padding: 12px; box-shadow: none; background: #fff; }
.quick a:hover, .quick button:hover { border-color: #b9d6ec; background: #f2f7fb; }
.quick .q-icon { border-radius: 4px; background: var(--primary); color: #fff; }
.quick b { font-weight: 600; color: var(--accent); }
.site-avatar { border-radius: 3px; background: #eef2f6; border-color: #d8e0e8; color: #4a6f96; }
.avatar, .avatar.sm { background: #4a6f96; }
.list-row { padding: 10px 14px; }
.stat { border-radius: 0; }
.notice, .card.notice { border-radius: 0; }
.limits { border-radius: 0; }
.code { border-radius: 0; }
.segmented, .segmented button { border-radius: 0; }
.empty-state .empty-icon { background: #eef2f6; color: #4a6f96; }
.tool-search, .toolbar .search input, .nav-search input { border-radius: 0; }
/* One-row masthead now that the info line is gone */
:root { --mast-h: 58px; }
.mast-row { top: 0; bottom: 0; }

/* ---------- database manager: summary, filters, selection, editors ---------- */
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 12.5px; }
.link-btn:hover { color: var(--accent-2); text-decoration: underline; }
label.link-btn { display: inline; font-weight: 400; }
.small-note { font-size: 11.5px; font-weight: 400; margin-top: 1px; white-space: normal; }
.warn-text { color: var(--warn); }
.bad-text { color: var(--bad); }
.btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.form-rows-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.field-title { font-size: 12.5px; color: var(--text-2); font-weight: 600; margin-top: 4px; }
.dbm-summary { display: grid; grid-template-columns: repeat(7, minmax(0, auto)); justify-content: start; margin-bottom: 14px; }
.dbm-summary > div { padding: 10px 16px; border-left: 1px solid var(--line); min-width: 0; }
.dbm-summary > div:first-child { border-left: 0; }
.dbm-summary small { display: block; color: var(--text-3); font-size: 11.5px; }
.dbm-summary b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dbm-summary b.small-b { font-size: 12px; font-weight: 500; }
.flt-panel { padding: 12px; margin-bottom: 12px; display: grid; gap: 8px; }
#fltRows { display: grid; gap: 6px; }
.flt-row { display: grid; grid-template-columns: minmax(120px, 1fr) 150px minmax(140px, 2fr) 32px; gap: 8px; align-items: center; }
.flt-row select, .flt-row input { height: 32px; font-size: 13px; }
.flt-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.flt-bar .muted { margin-right: auto; }
.sel-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.sel-bar b { font-size: 13px; margin-right: 6px; }
.sel-bar[hidden] { display: none; }
.pg-num { width: 64px; height: 30px; padding: 0 6px; text-align: center; font-size: 13px; }
.dbm-grid .row-acts { width: 1%; padding: 2px 4px; white-space: nowrap; }
.dbm-grid .row-acts .icon-btn { width: 26px; height: 26px; }
.dbm-grid .row-acts svg.ic { width: 14px; height: 14px; color: var(--text-3); vertical-align: middle; }
.dbm-grid .row-acts .icon-btn:hover svg.ic { color: var(--text); }
.dbm-grid .row-acts .danger:hover svg.ic { color: var(--bad); }
.dbm-grid td.cell-edit { cursor: text; }
.dbm-grid tbody tr:hover td { background: var(--hover); }
.dbm-grid td.saved { background: var(--ok-soft) !important; transition: background .6s; }
.dbm-grid td:has(.cell-input) { padding: 2px 4px; overflow: visible; }
.cell-input { height: 28px; min-width: 140px; width: 100%; font-family: var(--mono); font-size: 12.5px; padding: 0 6px; }
.dbm-grid .link-btn { font-family: var(--sans); font-size: 11.5px; }
.fk-link svg.ic { width: 12px; height: 12px; vertical-align: -1px; color: var(--text-3); }
.fk-link:hover svg.ic { color: var(--accent); }
.dbm-grid th svg.ic { margin-left: 2px; }
.full-cell { max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.row-form label.wide-field { grid-column: 1 / -1; }
.col-label .fn-pick { height: 24px; width: auto; padding: 0 22px 0 6px; font-size: 11.5px; margin-left: auto; }
.col-label .fn-pick + .check, .col-label .fn-pick ~ .check { margin-left: 0; }
.set-field { display: flex; flex-wrap: wrap; gap: 4px 14px; min-height: 34px; align-items: center; }
.bin-field { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; min-height: 34px; font-size: 12.5px; }
.col-head, .col-row { grid-template-columns: minmax(110px, 1.4fr) 130px 90px minmax(100px, 1fr) 62px 80px 52px 92px 80px 32px; }
#colOne .col-row { grid-template-columns: minmax(110px, 1.4fr) 130px 110px minmax(100px, 1fr) 62px 80px 52px 92px; }
.idx-row, .fk-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px 32px; gap: 8px; align-items: center; margin-bottom: 6px; }
.fk-row { grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr) 32px; }
.idx-row select, .idx-row input, .fk-row select { height: 32px; font-size: 13px; }
.refd-by { margin: 10px 2px 0; font-size: 12.5px; }
.ops-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.ops-grid h3:not(:first-child) { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.search-card { max-width: 620px; margin-bottom: 14px; }
.sql-meta { display: flex; align-items: center; gap: 14px; }

/* SQL editor: a transparent textarea over a highlighted copy of its text */
.sql-edit { position: relative; background: #fff; }
.sql-edit .sql-hl, .sql-edit textarea.sql-editor { margin: 0; padding: 12px 14px; border: 0; font-family: var(--mono); font-size: 13px;
  line-height: 20px; tab-size: 2; white-space: pre; overflow-wrap: normal; letter-spacing: 0; }
.sql-edit .sql-hl { position: absolute; inset: 0; overflow: hidden; pointer-events: none; color: var(--text); background: none; }
.sql-edit textarea.sql-editor { position: relative; display: block; width: 100%; min-height: 220px; resize: vertical; overflow: auto;
  color: transparent; caret-color: var(--text); background: transparent; border-radius: 0; box-shadow: none; outline: 0; }
.sql-edit textarea.sql-editor::placeholder { color: var(--text-3); }
.sql-edit textarea.sql-editor::selection { background: rgba(28, 135, 201, .25); color: transparent; }
.hl-k { color: #0b5cad; font-weight: 600; }
.hl-s { color: #a3410f; }
.hl-n { color: #098658; }
.hl-c { color: #8a8a8a; font-style: italic; }
.hl-i { color: #6f42c1; }
.sql-measure { position: absolute; visibility: hidden; white-space: pre; font-family: var(--mono); font-size: 13px; }
.sql-ac { position: absolute; z-index: 5; width: 260px; max-height: 240px; overflow-y: auto; background: #fff; border: 1px solid var(--line-strong);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15); font-size: 12.5px; }
.sql-ac > div { display: flex; align-items: baseline; gap: 8px; padding: 4px 8px; cursor: pointer; }
.sql-ac > div small { margin-left: auto; color: var(--text-3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.sql-ac > div.on, .sql-ac > div:hover { background: var(--accent-soft); }
.sql-ac[hidden] { display: none; }

@media (max-width: 900px) {
  .dbm-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dbm-summary > div { border-left: 0; border-top: 1px solid var(--line); }
  .flt-row { grid-template-columns: 1fr 1fr; }
  .flt-row input { grid-column: 1 / 2; }
  .form-rows-2, .ops-grid { grid-template-columns: minmax(0, 1fr); }
  .col-head, .col-row, #colOne .col-row { grid-template-columns: 1fr 1fr; }
}
.sql-edit .sql-hl code { padding: 0; border: 0; border-radius: 0; background: none; font: inherit; color: inherit; }
.dbm-main td.empty { padding: 18px 16px; }
.dbm-main > .hint, #dbmBody > .hint { margin-top: 8px; }
.dbm-main .tag { white-space: nowrap; }
.create-sql .code, .full-cell.code, .modal-body pre.code { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.dbm-summary b.small-b { word-break: break-all; }
@media (max-width: 900px) { .dbm-summary > div { padding: 8px 12px; } }

/* toast with an action (database manager: undo) */
.toast-act { margin-left: 12px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 650;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
@media (max-width: 600px) {
  .pt-who, .pt-size, .pt-label, .pt-scope { display: none; }
}

/* database manager: what a column takes part in (Structure tab) */
.col-flags { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; margin-left: 4px; }
.col-flag { gap: 3px; font-family: var(--sans, inherit); font-weight: 600; }
.col-flag svg.ic { width: 12px; height: 12px; stroke-width: 2.2; }
.flag-pk { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.flag-uni { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.flag-auto { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.flag-fk { color: var(--primary); }
.th-flag { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 3px; border-radius: 4px; vertical-align: -3px; color: var(--text-3); }
.th-flag svg.ic { width: 12px; height: 12px; stroke-width: 2.2; }
.th-flag.flag-pk, .th-flag.flag-uni, .th-flag.flag-auto { background: none; }
.dbm-grid th .th-flag svg.ic { margin: 0; color: inherit; vertical-align: 0; }
.th-flag.flag-pk { color: var(--warn); }
.th-flag.flag-uni { color: var(--accent); }
.th-flag.flag-auto { color: var(--ok); }
.th-flag.flag-fk { color: var(--primary); }

/* database type tags (Databases page, packages) */
.tag.kind-mariadb { color: var(--warn); }
.tag.kind-postgresql { color: var(--primary); }
.invisible { visibility: hidden; }
.tag.warn-tag { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
/* API usage chart: one series of daily requests (apiChart) */
.api-chart { padding: 16px 18px; margin-top: 14px; }
.api-chart-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 10px; flex-wrap: wrap; }
.api-plot { position: relative; padding-top: 18px; }
.api-max { position: absolute; top: 0; left: 0; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.api-bars { display: flex; align-items: stretch; gap: 2px; height: 140px; border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--line), var(--line)) 0 0 / 100% 1px no-repeat; }
.api-bars > i { flex: 1; min-width: 0; position: relative; cursor: default; }
.api-bars > i > b { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); border-radius: 4px 4px 0 0; }
.api-bars > i:hover > b { opacity: .75; }
.api-bars > i:hover { background: var(--surface-2); }
.api-axis { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; }
.api-table { margin-top: 10px; font-size: 13px; }
.api-table summary { cursor: pointer; color: var(--text-2); }
.api-table .table-wrap { max-height: 260px; overflow: auto; margin-top: 8px; }
.api-path { overflow-wrap: anywhere; }
.acct-main { min-width: 0; display: grid; gap: 14px; align-content: start; }

/* ---------- the info column at the left of every page, beside the menu (drawRail) ---------- */
:root { --rail: 330px; }
/* where the page starts: after the menu, unless there is none (accounts, menu hidden, small screens) */
body { --main-left: var(--side); }
body.role-account, body.side-hidden { --main-left: 0px; }
body .main, body.side-hidden .main, body.role-account .main { margin-left: calc(var(--main-left) + var(--rail)); }
.rail { position: fixed; top: calc(var(--mast-h) + var(--cmd-h)); left: var(--main-left); bottom: 0; width: var(--rail); overflow-y: auto;
  display: grid; gap: 12px; align-content: start; padding: 12px; background: #fafafa; border-right: 1px solid #ddd; }
.rail:empty { display: none; }
.rail .facts { table-layout: fixed; }
.rail .facts th { width: 122px; white-space: normal; }
.rail .facts td { font-size: 12px; }
@media (max-width: 1100px) { :root { --rail: 280px; } .rail .facts th { width: 100px; } }
@media (max-width: 860px) { body { --main-left: 0px; } }
/* admin panel: the info column sits at the right edge, the page right after the menu */
@media (min-width: 761px) {
  body:not(.role-account) .main, body.side-hidden:not(.role-account) .main { margin-left: var(--main-left); margin-right: var(--rail); }
  body:not(.role-account) .rail { left: auto; right: 0; border-right: 0; border-left: 1px solid #ddd; }
}
/* "Sunucu durumu" already shows the server facts itself, and the file manager needs the width: no info column there */
body[data-view="overview"] .rail, body:not(.role-account)[data-view="files"] .rail, body:not(.role-account)[data-view="apidesign"] .rail { display: none; }
@media (min-width: 761px) { body[data-view="overview"] .main, body.side-hidden[data-view="overview"] .main,
  body:not(.role-account)[data-view="files"] .main, body.side-hidden:not(.role-account)[data-view="files"] .main,
  body:not(.role-account)[data-view="apidesign"] .main, body.side-hidden:not(.role-account)[data-view="apidesign"] .main { margin-right: 0; } }
@media (max-width: 760px) {
  body .main, body.side-hidden .main, body.role-account .main { margin-left: 0; }
  .rail { position: static; width: auto; overflow: visible; border-right: 0; border-top: 1px solid #ddd; padding: 16px 20px; }
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  /* The server facts column repeats under every page on a phone: keep it on the start pages only */
  body:not([data-view="start"]):not([data-view="home"]) .rail { display: none; }
  .rail .facts th { width: 110px; }

  /* List tables with row buttons become stacked rows: the name gets the full width,
     status and buttons share the line below instead of squeezing the name column */
  .table-wrap:not(.dbm-grid) > table:has(td.actions) > thead { display: none; }
  .table-wrap:not(.dbm-grid) > table:has(td.actions) > tbody > tr { display: flex; flex-wrap: wrap; align-items: center;
    gap: 8px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .table-wrap:not(.dbm-grid) > table:has(td.actions) > tbody > tr:last-child { border-bottom: 0; }
  .table-wrap:not(.dbm-grid) > table:has(td.actions) > tbody > tr > td { display: block; padding: 0; border: 0; width: auto !important; min-width: 0; }
  .table-wrap:not(.dbm-grid) > table:has(td.actions) > tbody > tr > td:first-child { flex: 1 1 100%; }
  .table-wrap:not(.dbm-grid) > table:has(td.actions) > tbody > tr > td.hide-sm { display: none; }
  .table-wrap:not(.dbm-grid) > table:has(td.actions) > tbody > tr > td.actions { margin-left: auto; white-space: normal;
    display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
  .table-wrap:not(.dbm-grid) > table:has(td.actions) > tbody > tr > td.empty,
  .table-wrap:not(.dbm-grid) > table:has(td.actions) > tbody > tr > td[colspan] { flex-basis: 100%; padding: 6px 0; }
  .name-cell small, .site-cell small { overflow-wrap: anywhere; }
  /* stripes and hover colour the whole stacked row, not just its cells */
  .table-wrap:not(.dbm-grid) > table:has(td.actions) > tbody > tr > td { background: transparent !important; }
  .table-wrap:not(.dbm-grid) > table:has(td.actions) > tbody > tr:nth-child(even) { background: #fafafa; }
  td.actions .icon-btn { width: 36px; height: 36px; }

  /* Other tables scroll sideways inside their card instead of crushing columns */
  .table-wrap > table:not(:has(td.actions)) td { overflow-wrap: anywhere; }

  /* Footer links wrap as whole items, without a stray divider at the start of a line */
  .foot nav { gap: 6px 16px; }
  .foot nav a, .foot nav a:first-child { padding: 0; border-left: 0; white-space: nowrap; }

  /* Comfortable touch targets */
  .tabs a, .tabs button { white-space: nowrap; }
  input, select, textarea { font-size: 16px; } /* iOS zooms into smaller inputs */
}

/* ---------- package form (packageModal) ---------- */
.pkg-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.pkg-presets { display: grid; gap: 6px; font-size: 13px; font-weight: 500; }
.pkg-presets > div { display: flex; gap: 6px; flex-wrap: wrap; }
.pkg-sec { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 14px 10px; }
.pkg-sec h4 { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; font-size: 13.5px; font-weight: 600; }
.pkg-off { display: none; font-size: 11.5px; font-weight: 500; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; }
.pkg-sec.off .pkg-off { display: inline-block; }
.pkg-sec.off .lim-row, .pkg-sec.off .lim-types { opacity: .45; }
.lim-row { display: grid; grid-template-columns: minmax(0, 1fr) 210px auto; gap: 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.pkg-sec h4 + .lim-row { border-top: 0; }
.lim-label { display: grid; gap: 1px; min-width: 0; }
.lim-label b { font-weight: 550; font-size: 13.5px; }
.lim-label small { color: var(--text-3); font-size: 12px; }
.lim-input input { text-align: right; font-variant-numeric: tabular-nums; }
.lim-input input:disabled { background: var(--surface-2); }
.lim-input select { border: 0; border-left: 1px solid var(--line-strong); border-radius: 0; background: var(--surface-2); padding: 0 6px; width: auto; box-shadow: none; }
.lim-unl { white-space: nowrap; min-width: 86px; }
.lim-types { display: grid; gap: 6px; padding: 8px 0 2px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 500; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 4px 0 4px; }
.feat { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.feat:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.feat input { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; flex: none; }
.feat span { display: grid; gap: 1px; }
.feat b { font-weight: 550; font-size: 13.5px; }
.feat small { color: var(--text-2); font-size: 12px; }
@media (max-width: 600px) {
  .pkg-top { grid-template-columns: minmax(0, 1fr); }
  .lim-row { grid-template-columns: minmax(0, 1fr) auto; }
  .lim-row .lim-label { grid-column: 1 / -1; }
}
.lim-input > span { flex: none; white-space: nowrap; max-width: none; }

/* ---------- mail: overview and delivery log ---------- */
.mail-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); margin-bottom: 14px; }
.mail-stats > div { display: grid; gap: 2px; padding: 12px 16px; border-left: 1px solid var(--line); }
.mail-stats > div:first-child { border-left: 0; }
.mail-stats b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mail-stats small { color: var(--text-2); font-size: 12px; }
.mail-stats > .warn b { color: var(--bad); }
.mail-checks { margin-bottom: 14px; }
.mcheck { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.mcheck:first-child { border-top: 0; }
.mcheck > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.mcheck b { font-weight: 600; font-size: 13.5px; }
.mcheck small { color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.mc-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-3); }
.mc-icon svg.ic { width: 16px; height: 16px; }
.mcheck.ok .mc-icon { background: var(--ok-soft); color: var(--ok); }
.mcheck.warn .mc-icon { background: var(--warn-soft); color: var(--warn); }
.mcheck.bad .mc-icon { background: var(--bad-soft); color: var(--bad); }
.group-head.static a { margin-left: auto; font-size: 13px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 6px 12px; font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; border-left: 1px solid var(--line); }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--accent); color: #fff; }
.mail-log td { vertical-align: top; }
.mail-log .nowrap { white-space: nowrap; color: var(--text-2); font-size: 12.5px; }
.mail-log .addr { font-size: 12.5px; overflow-wrap: anywhere; }
.mail-log .addr .arrow { color: var(--text-3); margin: 0 6px; }
.mail-log .why { display: block; font-family: var(--sans); color: var(--text-2); margin-top: 3px; font-size: 12px; }
.mail-log .why-cell { font-size: 12.5px; color: var(--text-2); max-width: 420px; }
.mail-log .why-cell details { margin-top: 3px; }
.mail-log .why-cell summary { cursor: pointer; color: var(--text-3); font-size: 12px; }
.mail-log .why-cell code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.mail-log .dir { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.mail-log .dir svg.ic { width: 13px; height: 13px; }
.mail-log .dir.in { background: var(--ok-soft); color: var(--ok); }
.mail-log .dir.out { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 900px) { .mail-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mail-stats > div:nth-child(4) { border-left: 0; } .mail-stats > div:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 760px) { .mcheck { flex-wrap: wrap; } .mcheck .btn { margin-left: 42px; } }

/* ---------- mailbox state (boxStateModal) ---------- */
.state-opts { display: grid; gap: 8px; }
.state-opt { display: flex !important; flex-direction: row !important; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.state-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.state-opt input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.state-opt span { display: grid; gap: 2px; }
.state-opt b { font-weight: 600; }
.state-opt small { color: var(--text-2); font-size: 12.5px; font-weight: 400; }
.box-note { display: block; font-size: 12px; margin-top: 3px; }

/* ---------- API page: what you can do, the guide, the try box, system permissions ---------- */
.api-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.api-card { padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.api-card > b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.api-card > b svg.ic { width: 18px; height: 18px; color: var(--accent); }
.api-card span { color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.api-card small { color: var(--text-3); font-size: 12.5px; }
.api-guide { padding: 4px 0; }
.guide-group { border-bottom: 1px solid var(--line); }
.guide-group:last-child { border-bottom: 0; }
.guide-group > summary { cursor: pointer; padding: 10px 16px; font-weight: 600; list-style-position: inside; }
.guide-group[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ep { padding: 10px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.ep:last-child { border-bottom: 0; }
.ep-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ep-path { font-family: var(--mono); font-size: 12.5px; background: none; padding: 0; overflow-wrap: anywhere; flex: 1; min-width: 200px; }
.ep-line .btn { margin-left: auto; }
.ep-what { color: var(--text-2); font-size: 13px; }
.ep-ex summary { cursor: pointer; color: var(--accent); font-size: 12.5px; }
.ep-ex .card { margin-top: 6px; }
.method { display: inline-block; min-width: 58px; text-align: center; font-family: var(--mono); font-size: 11.5px; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.m-get { background: #e6f4e3; color: #2b7a22; }
.m-post { background: #e8f3fa; color: #136ba1; }
.m-patch { background: #fdf3dd; color: #9a6100; }
.m-del { background: #fbe6e5; color: #b0261f; }
.api-try { padding: 14px 16px; display: grid; gap: 10px; }
.try-row label, .try-body { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.try-req { display: flex; gap: 8px; }
.try-req select { width: auto; flex: none; }
.try-req input { flex: 1; min-width: 0; }
.try-body textarea { width: 100%; font-size: 12.5px; }
.try-status { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.try-json { max-height: 420px; overflow: auto; }
.perm-rows { display: grid; border: 1px solid var(--line); border-radius: var(--r-sm); }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); }
.perm-row:first-child { border-top: 0; }
.perm-row b { font-weight: 600; }
.perm-row .seg label { display: inline-flex; cursor: pointer; }
.perm-row .seg input { position: absolute; opacity: 0; pointer-events: none; }
.perm-row .seg span { padding: 5px 12px; font-size: 13px; color: var(--text-2); border-left: 1px solid var(--line); }
.perm-row .seg label:first-child span { border-left: 0; }
.perm-row .seg input:checked + span { background: var(--accent); color: #fff; }
.perm-row .seg input:focus-visible + span { outline: 2px solid var(--accent-ring); }
.perm-quick { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 600px) { .perm-row { flex-wrap: wrap; } .try-req { flex-wrap: wrap; } }

/* ---------- API designer (renderApiDesigner) ---------- */
.fd { display: grid; grid-template-columns: 230px minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.fd-list { position: sticky; top: 12px; max-height: calc(100vh - 160px); overflow: auto; padding: 6px; }
.fd-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; border: 0; background: none; text-align: left; border-radius: 4px; cursor: pointer; }
.fd-item:hover { background: var(--hover); }
.fd-item.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.fd-item .method { min-width: 50px; }
.fd-item-txt { display: grid; min-width: 0; flex: 1; }
.fd-item-txt b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-item-txt small { color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-main { display: grid; gap: 12px; min-width: 0; }
.fd-welcome { padding: 40px 28px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.fd-welcome p { max-width: 620px; color: var(--text-2); margin: 0; line-height: 1.6; }
.fd-tpls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.fd-head { padding: 14px 16px; display: grid; gap: 12px; }
.fd-head-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fd-name { flex: 1; min-width: 200px; font-size: 16px; font-weight: 600; border: 0 !important; border-bottom: 1px dashed var(--line-strong) !important; border-radius: 0 !important; box-shadow: none !important; padding: 4px 2px; }
.fd-head-acts { display: flex; gap: 6px; margin-left: auto; }
.fd-addr { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.fd-addr select { width: auto; border: 0; border-right: 1px solid var(--line-strong); border-radius: 0; font-weight: 700; font-family: var(--mono); }
.fd-base { display: flex; align-items: center; padding: 0 2px 0 10px; color: var(--text-3); font-size: 12.5px; white-space: nowrap; background: var(--surface-2); max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.fd-addr input { border: 0; border-radius: 0; box-shadow: none !important; flex: 1; min-width: 120px; background: var(--surface-2); padding-left: 0; }
.fd-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; }
.fd-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.fd-head label, .fd-step-body label:not(.check), .fd-test label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.fd-url { display: grid; gap: 4px; font-size: 12.5px; min-width: 0; }
.fd-url .mono { overflow-wrap: anywhere; font-size: 12px; color: var(--text); }
.warn-hint { display: flex; gap: 8px; align-items: center; color: var(--warn); margin: 0; }
.fd-inputs { padding: 12px 16px; display: grid; gap: 8px; }
.fd-sec-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fd-sec-head .muted { font-size: 12px; }
.fd-inp-rows { display: grid; gap: 6px; }
.fd-inp { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.fd-flow { display: grid; justify-items: stretch; }
.fd-node { justify-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.fd-node.start { background: var(--accent); color: #fff; }
.fd-node.end { background: var(--surface-2); color: var(--text-2); border: 1px dashed var(--line-strong); font-weight: 500; }
.fd-node svg.ic { width: 15px; height: 15px; }
.fd-steps { display: grid; }
.fd-dz { position: relative; height: 26px; display: grid; place-items: center; }
.fd-dz:before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--line-strong); transform: translateX(-1px); }
.fd-dz-add { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-3);
  display: grid; place-items: center; padding: 0; cursor: pointer; opacity: 0; transition: opacity .12s; }
.fd-dz-add svg.ic { width: 12px; height: 12px; }
.fd-dz:hover .fd-dz-add, .fd-dz-add:focus { opacity: 1; }

.fd-dragging .fd-dz:after { content: ""; position: absolute; left: 8%; right: 8%; top: 3px; bottom: 3px; border: 2px dashed var(--line-strong); border-radius: 6px; }
.fd-dz.over:after { border-color: var(--accent) !important; background: var(--accent-soft); }
.fd-empty-branch { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 6px; border: 1px dashed var(--line); border-radius: 6px; margin-top: -26px; margin-bottom: 4px; pointer-events: none; }
.fd-step { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--b, var(--accent)); border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.fd-step.ran { box-shadow: 0 0 0 2px #3c9a3266; }
.fd-step.failed { box-shadow: 0 0 0 2px #d0312d66; }
.b-check { --b: #c07800; --bs: #fdf3dd; } .b-if { --b: #7048e8; --bs: #efeafd; } .b-set { --b: #0c8599; --bs: #e3f5f7; }
.b-db { --b: #1c87c9; --bs: #e8f3fa; } .b-respond { --b: #2f9e44; --bs: #e6f4e3; }
.fd-step-head { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 6px; background: var(--bs); border-radius: 4px 4px 0 0; cursor: grab; border-bottom: 1px solid var(--line); }
.fd-step-head b { font-size: 13.5px; }
.fd-grip { color: var(--text-3); display: inline-grid; }
.fd-grip svg.ic { width: 14px; height: 14px; }
.fd-ic { width: 24px; height: 24px; border-radius: 5px; display: grid; place-items: center; background: var(--b); color: #fff; flex: none; }
.fd-ic svg.ic { width: 14px; height: 14px; }
.fd-ran { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fd-step.failed .fd-ran { color: var(--bad); }
.fd-step-acts { margin-left: auto; display: flex; gap: 0; }
.fd-step-acts .icon-btn { width: 26px; height: 26px; }
.fd-step-body { padding: 10px 12px 12px; display: grid; gap: 8px; }
.fd-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.fd-rules, .fd-pairs { display: grid; gap: 6px; }
.fd-rule { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(110px, .8fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.fd-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr) auto; gap: 6px; align-items: center; }
.fd-pairs .fd-pair select + select { min-width: 90px; }
.fd-step-body .fd-pairs .fd-pair:has(select + select) { grid-template-columns: minmax(0, 1fr) minmax(90px, .6fr) minmax(0, 1.2fr) auto; }
.fd-arrow { color: var(--text-3); }
.fd-rowbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fd-rowbar select { width: auto; }
.fd-inline { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.expr { font-size: 12.5px; }
.fd-branches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.fd-branch { border-radius: 6px; padding: 6px 8px 4px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.fd-branch-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.fd-branch.yes .fd-branch-head { color: #2b7a22; }
.fd-branch.no .fd-branch-head { color: #b0261f; }
.fd-branch-head svg.ic { width: 14px; height: 14px; }
.fd-side { display: grid; gap: 12px; position: sticky; top: 12px; max-height: calc(100vh - 140px); overflow: auto; }
.fd-side > .card { padding: 12px; display: grid; gap: 8px; }
.fd-pal { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-left: 4px solid var(--b); border-radius: 6px; background: var(--surface); cursor: grab; user-select: none; }
.fd-pal:hover { background: var(--bs); }
.fd-pal span:last-child { display: grid; }
.fd-pal b { font-size: 13px; }
.fd-pal small { color: var(--text-2); font-size: 11.5px; }
.fd-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.fd-chip { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 3px 9px; font-size: 12px; cursor: pointer; color: var(--text); }
.fd-chip:hover { border-color: var(--accent); color: var(--accent); }
.fd-test { display: grid; gap: 8px; }
.fd-test textarea { font-size: 12px; }
.fd-result { display: grid; gap: 6px; }
.fd-result pre { max-height: 220px; overflow: auto; font-size: 12px; margin: 0; }
.fd-trace { margin: 0; padding-left: 18px; font-size: 12.5px; display: grid; gap: 3px; }
.fd-trace li.bad { color: var(--bad); }
.fd-menu { position: fixed; z-index: 70; padding: 4px; display: grid; min-width: 200px; box-shadow: var(--shadow-lg); }
.fd-menu button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.fd-menu button:hover { background: var(--hover); }
@media (max-width: 1300px) { .fd { grid-template-columns: 200px minmax(0, 1fr) 260px; } }
@media (max-width: 1100px) {
  .fd { grid-template-columns: minmax(0, 1fr); }
  .fd-list, .fd-side { position: static; max-height: none; }
  .fd-list { max-height: 220px; }
  .fd-palette { display: none !important; }      /* touch: the + buttons in the flow add blocks */
  .fd-dz-add { opacity: 1; }
}
@media (max-width: 700px) {
  .fd-grid2, .fd-grid3, .fd-branches { grid-template-columns: minmax(0, 1fr); }
  .fd-rule, .fd-pair, .fd-step-body .fd-pairs .fd-pair:has(select + select) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .fd-rule > :nth-child(3), .fd-pair > :nth-child(3) { grid-column: 1 / 3; }
  .fd-arrow { display: none; }
  .fd-inp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fd-base { display: none; }
}

.fd .linkbtn { display: inline-flex; align-items: center; gap: 5px; justify-self: start; border: 0; background: none; color: var(--accent); padding: 2px 0; font-size: 13px; cursor: pointer; width: auto; height: auto; box-shadow: none; }
.fd .linkbtn:hover { text-decoration: underline; background: none; }
.fd .linkbtn svg.ic { width: 13px; height: 13px; }
.fd-steps, .fd-step, .fd-step-body, .fd-branch > .fd-steps { min-width: 0; }
.fd-branch .fd-grid2, .fd-branch .fd-grid3, .fd-branch .fd-branches { grid-template-columns: minmax(0, 1fr); }
.fd-branch .fd-rule, .fd-branch .fd-pair, .fd-branch .fd-step-body .fd-pairs .fd-pair:has(select + select) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.fd-branch .fd-rule > :nth-child(3), .fd-branch .fd-pair > :nth-child(3) { grid-column: 1 / 3; }
.fd-branch .fd-arrow { display: none; }
.fd-branch .fd-step-acts .icon-btn { width: 22px; }
.fd-branch .fd-step-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fd-result pre { color: var(--text) !important; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; }
.fd-welcome .empty-icon svg.ic { width: 44px; height: 44px; color: var(--accent); stroke-width: 1.4; }

/* designer: header and empty flow, cleaner */
.fd-addr-wrap { display: grid; gap: 6px; }
.fd-addr { background: var(--surface); }
.fd-addr .fd-method { font-weight: 700; min-width: 96px; color: #fff; border-right: 0 !important; }
.fd-m-get .fd-method { background: #2b7a22; } .fd-m-post .fd-method { background: #136ba1; }
.fd-m-put .fd-method, .fd-m-patch .fd-method { background: #9a6100; } .fd-m-delete .fd-method { background: #b0261f; }
.fd-addr .fd-method option { color: var(--text); background: var(--surface); }
.fd-base { background: var(--surface) !important; color: var(--text-3); padding: 0 0 0 12px !important; max-width: none !important; }
.fd-addr input { background: var(--surface) !important; padding-left: 1px !important; font-size: 14px; }
.fd-addr:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.fd-url { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-height: 24px; }
.fd-url .mono { color: var(--text-2); overflow-wrap: anywhere; }
.fd-dz-empty { height: auto !important; min-height: 64px; margin: 10px 0; border: 2px dashed var(--line-strong); border-radius: 8px; background: var(--surface);
  display: flex !important; align-items: center; justify-content: center; gap: 10px; padding: 12px; color: var(--text-3); font-size: 13px; text-align: center; }
.fd-dz-empty:before { display: none; }
.fd-dz-empty.root { min-height: 120px; }
.fd-dz-empty .fd-dz-add { opacity: 1; width: 30px; height: 30px; flex: none; }
.fd-dz-empty.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.fd-dragging .fd-dz-empty:after { display: none; }
.fd-branch .fd-dz-empty { min-height: 52px; margin: 6px 0; }

/* designer header: one aligned row (name | switch, state, buttons) */
.fd-head-row { align-items: center; gap: 12px; flex-wrap: nowrap; }
.fd-name { height: 36px; font-size: 16px; font-weight: 600; flex: 1; min-width: 0; border: 1px solid transparent !important; border-radius: var(--r-sm) !important;
  padding: 0 10px !important; background: var(--surface-2) !important; }
.fd-name:hover { border-color: var(--line) !important; }
.fd-name:focus { border-color: var(--accent) !important; background: var(--surface) !important; box-shadow: 0 0 0 3px var(--accent-ring) !important; }
.fd-head-acts { display: flex; align-items: center; gap: 8px; margin-left: 0; flex: none; }
.fd-head-acts .btn, .fd-head-acts .tag { height: 32px; display: inline-flex; align-items: center; }
.fd-head-acts .tag { padding: 0 10px; font-size: 12.5px; }
.fd-switch { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 8px; height: 32px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); user-select: none; }
.fd-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fd-knob { width: 34px; height: 20px; border-radius: 10px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.fd-knob:after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .15s; }
.fd-switch input:checked + .fd-knob { background: #2f9e44; }
.fd-switch input:checked + .fd-knob:after { left: 16px; }
.fd-switch input:focus-visible + .fd-knob { box-shadow: 0 0 0 3px var(--accent-ring); }
.fd-switch-txt { min-width: 40px; }
.fd-grid2 { align-items: start; }
@media (max-width: 760px) { .fd-head-row { flex-wrap: wrap; } .fd-head-acts { width: 100%; justify-content: flex-end; flex-wrap: wrap; } }

/* site types: closed ones say why (kindButtons) */
.segmented button .kind-why, .kind-checks .kind-why { display: block; font-size: 10.5px; font-weight: 400; color: var(--text-3); line-height: 1.1; }
.segmented button:disabled { opacity: .65; }
.kind-checks .kind-why { display: inline; margin-left: 2px; }
.kind-hint { display: block; margin-top: 4px; }
.api-pointer { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-top: 14px; font-size: 13.5px; }
.api-pointer > svg.ic { color: var(--accent); flex: none; }

/* ---- ready-made software (app services): installs, jobs, backups ---- */
.info-notice { background: var(--accent-soft); border-color: transparent; color: var(--text); }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.app-card { display: grid; gap: 14px; padding: 18px 20px; }
.app-card header { display: flex; align-items: flex-start; gap: 12px; }
.app-card header > div { flex: 1; min-width: 0; }
.app-card h3 { margin: 0; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.app-card header small { color: var(--text-2); }
.app-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.app-links, .app-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.app-facts { font-size: 13px; }
.app-job { display: flex; align-items: center; gap: 12px; margin: 0; }
.app-job.running { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); }
.app-job.running > div { flex: 1; min-width: 0; display: grid; }
.app-job.running small { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-job.ok-job { background: var(--ok-soft); border-color: transparent; }
.app-job.ok-job > svg.ic { color: var(--ok); }
.app-log { max-height: 260px; overflow: auto; margin: 0; font-size: 12px; white-space: pre-wrap; }
.spinner { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  color: var(--warn); animation: app-spin .8s linear infinite; }
@keyframes app-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.app-backups { display: grid; gap: 10px; }
.app-bk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.app-bk-head h4 { margin: 0; font-size: 14px; }
.app-bk-head small { color: var(--text-2); }
.app-bk-head > span { display: flex; gap: 8px; }
.app-bk td small, .app-bk td:first-child { white-space: nowrap; }
.app-none { margin: 0; font-size: 13px; }
.app-count { margin: 0 0 10px; font-size: 13px; }
.app-form { display: grid; gap: 12px; }
.app-pw { display: flex; gap: 8px; }
.app-pw input { flex: 1; min-width: 0; }
@media (max-width: 560px) { .app-grid { grid-template-columns: minmax(0, 1fr); } }
/* data-only database manager: no structure changes (the server refuses them too) */
.dbm.data-only [data-bulk="empty"], .dbm.data-only [data-bulk="drop"],
.dbm.data-only td.actions [data-act="structure"], .dbm.data-only td.actions [data-act="ops"],
.dbm.data-only td.actions [data-act="empty"], .dbm.data-only td.actions [data-act="drop"] { display: none; }
