/* Deploy Panel — design system: JetBrains Mono (OFL, self-hosted), neutral surfaces, one accent, compact density */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(fonts/jetbrains-mono-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #f0f2f5;
  --border: #e4e7ec;
  --border-strong: #cfd4dc;
  --text: #0f1520;
  --text-2: #2f3a4a;
  --muted: #5d6879;
  --subtle: #8a94a3;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-border: #c7d2fe;
  --ring: 0 0 0 4px rgba(79, 70, 229, .14);

  --ok: #067647;     --ok-bg: #ecfdf3;   --ok-border: #abefc6;   --ok-dot: #17b26a;
  --warn: #b54708;   --warn-bg: #fffaeb; --warn-border: #fedf89; --warn-dot: #f79009;
  --err: #b42318;    --err-bg: #fef3f2;  --err-border: #fecdca;  --err-dot: #f04438;
  --info: #175cd3;   --info-bg: #eff8ff; --info-border: #b2ddff; --info-dot: #2e90fa;
  --gray-bg: #f2f4f7; --gray-border: #eaecf0; --gray-dot: #98a2b3;

  --term-bg: #0c0e14;
  --term-head: #151821;
  --term-text: #d0d5dd;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, .08), 0 4px 6px -2px rgba(16, 24, 40, .03);
  --shadow-xl: 0 24px 48px -12px rgba(16, 24, 40, .18);
  --r-sm: 4px;
  --r: 6px;
  --r-lg: 8px;
  --ctl: 34px;          /* height of every input, select and button */
  --ctl-sm: 28px;
  --sidebar: 248px;
  --font: 'JetBrains Mono', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --mono: var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.6 var(--font);
  font-variant-ligatures: none;   /* no => / != ligatures in prose */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.mono { font-family: var(--mono); font-size: 12px; }
b, strong { font-weight: 650; }
.center { text-align: center; padding: 60px 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic.sm { width: 14px; height: 14px; vertical-align: -2px; }
.ic.lg { width: 20px; height: 20px; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 30;
  display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border);
}
.sb-brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; color: var(--text); }
.sb-brand:hover { color: var(--text); }
.logo {
  width: 34px; height: 34px; border-radius: var(--r); flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  box-shadow: 0 1px 2px rgba(67, 56, 202, .3), inset 0 1px 0 rgba(255, 255, 255, .18);
  color: #fff;
}
.logo svg { width: 18px; height: 18px; }
.sb-title { font-weight: 650; font-size: 14px; }
.sb-sub { font-size: 11.5px; color: var(--muted); }
#nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.nav-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); padding: 16px 10px 6px; }
#nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; margin: 1px 0; border-radius: var(--r);
  color: var(--text-2); font-weight: 500;
}
#nav a .ic { color: var(--subtle); width: 18px; height: 18px; }
#nav a:hover { background: var(--surface-2); color: var(--text); }
#nav a:hover .ic { color: var(--muted); }
#nav a.active { background: var(--accent-soft); color: var(--accent); }
#nav a.active .ic { color: var(--accent); }
.sb-user { border-top: 1px solid var(--border); padding: 14px 14px 16px; display: flex; align-items: center; gap: 10px; }
.sb-user .who { flex: 1; min-width: 0; }
.sb-user .who b { display: block; font-weight: 600; font-size: 12.5px; }
.sb-user .who span { font-size: 11.5px; color: var(--muted); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 650;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border);
}
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r); flex: none;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

.main-wrap { flex: 1; min-width: 0; margin-left: var(--sidebar); }
.mobilebar { display: none; }
main { max-width: 1240px; margin: 0 auto; padding: 28px 32px 64px; }
.scrim { display: none; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.ph-main { flex: 1; min-width: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.back:hover { color: var(--text); }
h1 { font-size: 20px; line-height: 1.25; font-weight: 650; margin: 0; overflow-wrap: anywhere; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
h2 { font-size: 14px; font-weight: 600; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
h2 .ic { color: var(--muted); }

/* ---------- surfaces ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs); padding: 20px 22px; margin-bottom: 20px; min-width: 0;
}
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.panel-head h2 { margin: 0; flex: 1; }
.panel-body { padding: 18px 22px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.cols > * { min-width: 0; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs); padding: 18px 20px; display: flex; gap: 14px; align-items: center; min-width: 0;
}
.stat-ic { width: 42px; height: 42px; border-radius: var(--r); display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.stat-ic.ok { background: var(--ok-bg); color: var(--ok); }
.stat-ic.warn { background: var(--warn-bg); color: var(--warn); }
.stat-ic.info { background: var(--info-bg); color: var(--info); }
.stat-ic .ic { width: 20px; height: 20px; }
.stat-v { font-size: 20px; font-weight: 650; line-height: 1.15; }
.stat-l { font-size: 12px; color: var(--muted); }

/* project cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs); padding: 18px; color: var(--text); min-width: 0;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover { color: var(--text); border-color: var(--accent-border); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.card-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.card-title { font-weight: 600; font-size: 14px; }
.card-domain { font-size: 12px; color: var(--muted); }
.card-commit { display: flex; gap: 8px; align-items: center; min-width: 0; font-size: 12px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 7px 10px; }
.card-commit .ic { color: var(--subtle); }
.card-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }

.tile {
  width: 40px; height: 40px; border-radius: var(--r); flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  border: 1px solid transparent;
}
.tile.lg { width: 48px; height: 48px; font-size: 16px; border-radius: var(--r-lg); }
.tile.t-laravel { background: #fef3f2; color: #d92d20; border-color: #fee4e2; }
.tile.t-nuxt { background: #ecfdf3; color: #079455; border-color: #dcfae6; }
.tile.t-next { background: #f2f4f7; color: #101828; border-color: #eaecf0; }
.tile.t-vite { background: #f4f3ff; color: #6938ef; border-color: #ebe9fe; }
.tile.t-node, .tile.t-plain { background: var(--surface-3); color: var(--muted); }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 500; line-height: 18px;
  background: var(--gray-bg); color: var(--text-2); border: 1px solid var(--gray-border); white-space: nowrap;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.badge.err { background: var(--err-bg); color: var(--err); border-color: var(--err-border); }
.badge.info { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-dot); flex: none; }
.badge.ok .dot { background: var(--ok-dot); }
.badge.warn .dot { background: var(--warn-dot); }
.badge.err .dot { background: var(--err-dot); }
.badge.info .dot { background: var(--info-dot); }
.badge .ic { width: 12px; height: 12px; }
.badge .spinner { width: 10px; height: 10px; border-width: 1.5px; }
.tbadge { font-weight: 600; }
.tbadge.t-laravel { background: #fef3f2; color: #b42318; border-color: #fee4e2; }
.tbadge.t-nuxt { background: #ecfdf3; color: #067647; border-color: #dcfae6; }
.tbadge.t-next { background: #f2f4f7; color: #101828; border-color: #eaecf0; }
.tbadge.t-vite { background: #f4f3ff; color: #5925dc; border-color: #ebe9fe; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--ctl); padding: 0 13px; border-radius: var(--r);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  font: 600 12.5px/1 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none;
  box-shadow: var(--shadow-xs); transition: background .12s, border-color .12s, box-shadow .12s, color .12s;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(79, 70, 229, .3); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.primary:disabled:hover { background: var(--accent); }
.btn.danger { color: var(--err); border-color: var(--err-border); }
.btn.danger:hover { background: var(--err-bg); }
.btn.danger.solid { background: #d92d20; border-color: #d92d20; color: #fff; }
.btn.danger.solid:hover { background: #b42318; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { height: var(--ctl-sm); padding: 0 9px; font-size: 11.5px; gap: 5px; }
.btn.sm .ic { width: 14px; height: 14px; }
.btn.lg { height: 40px; padding: 0 18px; font-size: 13px; }
.btn .ic { width: 16px; height: 16px; }

/* every text-like control looks the same, typed or not */
input:not([type]), input[type=text], input[type=password], input[type=search], input[type=email], input[type=url], input[type=tel],
input[type=number], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  font: 13px/1.4 var(--font); color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r);
  height: var(--ctl); padding: 0 10px; width: 100%; box-shadow: none;
  transition: border-color .12s, box-shadow .12s, background-color .12s;
}
textarea { height: auto; padding: 8px 10px; font-size: 12px; line-height: 1.6; resize: vertical; min-height: 120px; }
input::placeholder, textarea::placeholder { color: var(--subtle); opacity: 1; }
input:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:focus) { border-color: #b3bac6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input:disabled, input[readonly], textarea:disabled { background: var(--surface-3); color: var(--muted); }
input.dirty { border-color: var(--warn-dot); background: var(--warn-bg); }
select { appearance: none; padding-right: 30px; cursor: pointer; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235d6879' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 9px center; }
select:disabled { background-color: var(--surface-3); color: var(--muted); cursor: not-allowed; }
input[type=checkbox], input[type=radio] { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; flex: none; cursor: pointer; }
input[type=file] { font: 12px var(--font); color: var(--muted); }
input[type=file]::file-selector-button { font: 600 12px var(--font); height: var(--ctl-sm); padding: 0 10px; margin-right: 10px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--text-2); cursor: pointer; }
.in-sm { height: var(--ctl-sm) !important; font-size: 12px !important; }
label { display: block; font-weight: 500; font-size: 12.5px; color: var(--text-2); margin: 16px 0 6px; }
label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--text-2); margin: 10px 0; cursor: pointer; line-height: 1.45; }
label.check input { margin-top: 2px; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.search { position: relative; }
.search > .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }
.search input { padding-left: 38px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--r) 0 0 8px; color: var(--muted); font-size: 12.5px; }
.input-prefix input { border-radius: 0 var(--r) var(--r) 0; }

/* ---------- auth ---------- */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
  background:
    radial-gradient(1100px 480px at 50% -12%, #e0e7ff 0%, rgba(224, 231, 255, 0) 62%),
    var(--bg);
}
.auth { width: 100%; max-width: 420px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 22px; text-align: center; }
.auth-brand .logo { width: 48px; height: 48px; border-radius: var(--r-lg); }
.auth-brand .logo svg { width: 24px; height: 24px; }
.auth-brand .sb-title { font-size: 16px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 30px 30px 26px; }
.auth-card h1 { font-size: 18px; justify-content: center; text-align: center; }
.auth-card .lead { text-align: center; color: var(--muted); margin: 6px 0 4px; }
.auth-card .btn.primary { width: 100%; margin-top: 22px; height: 42px; }
.auth-card .alt { text-align: center; margin: 16px 0 0; font-size: 12.5px; }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; font-size: 12px; color: var(--muted); }
.qr { display: flex; justify-content: center; margin: 18px 0 14px; }
.qr img { background: #fff; padding: 10px; border-radius: var(--r-lg); border: 1px solid var(--border); image-rendering: pixelated; width: 196px; height: 196px; }
.code-input { font: 600 20px/1 var(--mono) !important; letter-spacing: 10px; text-align: center; height: 52px !important; }
.error { color: var(--err); margin-top: 12px; font-size: 12.5px; }
.error:empty { display: none; }

/* ---------- lists & tables ---------- */
.commits { list-style: none; margin: 0; padding: 0; }
.commits li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); min-width: 0; }
.commits li:first-child { border-top: 0; }
.commits li > * { flex: none; }
.commits li > .grow { flex: 1 1 auto; min-width: 0; color: var(--text); }
.commits li > .who { flex: 0 1 auto; max-width: 35%; min-width: 0; font-size: 12px; }
.sha { font-family: var(--mono); font-size: 11.5px; color: var(--accent); background: var(--accent-soft); border-radius: var(--r-sm); padding: 1px 6px; }
.alert .commits li { border-color: rgba(0, 0, 0, .06); }
.alert .commits li > .grow { color: inherit; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
th { text-align: left; padding: 11px 16px; font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td.ellipsis { max-width: 280px; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-user b { display: block; font-weight: 600; }
.cell-user span { font-size: 12px; color: var(--muted); }

.alert {
  display: block; padding: 12px 14px; border-radius: var(--r); margin: 12px 0;
  border: 1px solid; overflow-wrap: anywhere; font-size: 12.5px;
}
.alert.warn { background: var(--warn-bg); border-color: var(--warn-border); color: #93370d; }
.alert.err { background: var(--err-bg); border-color: var(--err-border); color: #912018; }
.alert.ok { background: var(--ok-bg); border-color: var(--ok-border); color: #085d3a; }
.alert.info { background: var(--info-bg); border-color: var(--info-border); color: #194185; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert > .ic:first-child { margin-right: 6px; }
.alert:has(> .ic:first-child + div) { display: flex; gap: 10px; align-items: flex-start; }
.alert:has(> .ic:first-child + div) > .ic:first-child { margin: 2px 0 0; }
.alert-title { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 2px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; font-size: 12.5px; margin: 0; }
.kv dt { color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kv dt .ic { color: var(--subtle); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--text); }

.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.meta > div { padding: 16px 20px; border-right: 1px solid var(--border); min-width: 0; }
.meta > div:last-child { border-right: 0; }
.meta .ml { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.meta .mv { font-weight: 600; overflow-wrap: anywhere; }

ol.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
ol.steps > li { counter-increment: s; position: relative; padding: 0 0 14px 38px; color: var(--text-2); }
ol.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: -1px;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border);
}
ol.steps > li:not(:last-child)::after { content: ''; position: absolute; left: 11.5px; top: 26px; bottom: 2px; width: 1px; background: var(--border); }
ol.steps.compact > li { padding-bottom: 10px; font-size: 12.5px; }

.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty .empty-ic { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.empty .empty-ic .ic { width: 22px; height: 22px; }
.empty b { display: block; color: var(--text); margin-bottom: 4px; }

/* ---------- terminal (logs) ---------- */
.terminal { border-radius: var(--r-lg); overflow: hidden; border: 1px solid #1d2230; box-shadow: var(--shadow-lg); background: var(--term-bg); }
.term-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--term-head); border-bottom: 1px solid #1d2230; color: #98a2b3; font-size: 12px; }
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a2f3c; }
.term-live { display: inline-flex; align-items: center; gap: 6px; color: #6ce9a6; }
.term-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #17b26a; box-shadow: 0 0 0 3px rgba(23, 178, 106, .2); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.log { background: var(--term-bg); color: var(--term-text); font-family: var(--mono); font-size: 12px; line-height: 1.65; padding: 16px 18px; overflow: auto; max-height: 68vh; min-height: 240px; white-space: pre-wrap; overflow-wrap: anywhere; }
.log .l-step { color: #a4bcfd; font-weight: 700; }
.log .l-cmd { color: #7d8595; }
.log .l-err { color: #fda29b; font-weight: 700; }
.log .l-warn { color: #fec84b; }
.log .l-ok { color: #75e0a7; font-weight: 700; }
.log .l-res { display: none; }

.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -1px; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 6px 0; }

/* ---------- dialog & toast ---------- */
dialog { border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--text); padding: 0; width: min(540px, calc(100vw - 32px)); box-shadow: var(--shadow-xl); }
dialog::backdrop { background: rgba(16, 24, 40, .45); backdrop-filter: blur(3px); }
dialog form { padding: 24px; margin: 0; max-height: calc(100vh - 64px); overflow-y: auto; }
dialog h2 { font-size: 16px; margin-bottom: 8px; }
dialog p { color: var(--text-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.secret-box { display: inline-block; font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); padding: 7px 10px; border-radius: var(--r); user-select: all; overflow-wrap: anywhere; color: var(--text); }
div.secret-box { display: block; }
.check-list { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r); padding: 4px 12px; background: var(--surface-2); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100;
  display: flex; align-items: center; gap: 10px;
  background: #101828; color: #fff; padding: 11px 16px; border-radius: var(--r); box-shadow: var(--shadow-xl);
  max-width: calc(100vw - 32px); font-weight: 500;
}
.toast .ic { color: #75e0a7; }
.toast.err { background: #b42318; }
.toast.err .ic { color: #fff; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .search { width: 320px; max-width: 100%; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 3px; gap: 2px; box-shadow: var(--shadow-xs); flex-wrap: wrap; }
.chip { border: 0; background: transparent; color: var(--muted); padding: 5px 12px; border-radius: var(--r-sm); cursor: pointer; font: 500 12px/1.4 var(--font); }
.chip:hover { color: var(--text); }
.chip.on { background: var(--surface-3); color: var(--text); font-weight: 600; }
.chip .n { color: var(--subtle); font-weight: 500; margin-left: 4px; }

/* repo picker */
.repo-list { max-height: 440px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r); margin-top: 10px; }
.repo-item { display: block; width: 100%; text-align: left; background: var(--surface); color: var(--text); border: 0; border-top: 1px solid var(--border); padding: 11px 14px; font: inherit; cursor: pointer; min-width: 0; }
.repo-item:first-child { border-top: 0; }
.repo-item:hover { background: var(--surface-2); }
.repo-item.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.repo-item .row { flex-wrap: nowrap; min-width: 0; gap: 6px; }

.step-num { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 650; background: var(--accent); color: #fff; flex: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-xl); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(16, 24, 40, .4); }
  .main-wrap { margin-left: 0; }
  .mobilebar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 10; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); font-weight: 650; }
  .mobilebar .logo { width: 28px; height: 28px; border-radius: var(--r); }
  .mobilebar .logo svg { width: 15px; height: 15px; }
  main { padding: 20px 16px 56px; }
  h1 { font-size: 18px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; gap: 10px; }
  .stat-ic { width: 36px; height: 36px; }
  .stat-v { font-size: 18px; }
  .panel { padding: 16px; }
  .panel-head, .panel-body { padding-left: 16px; padding-right: 16px; }
  .commits li { flex-wrap: wrap; row-gap: 2px; }
  .commits li > .grow { flex-basis: calc(100% - 80px); }
  .commits li > .who { max-width: none; flex: 1 1 auto; }
  .meta > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .meta > div:last-child { border-bottom: 0; }
  .toolbar .search { width: 100%; }
  .auth-card { padding: 24px 20px; }
}

/* utilities (CSP forbids inline style attributes) */
.u-fw4 { font-weight: 400; }
.u-m0 { margin: 0 !important; }
.u-mt0 { margin-top: 0 !important; }
.u-mt4 { margin-top: 4px; }
.u-mt14 { margin-top: 14px; }
.u-mt16 { margin-top: 16px; }
.u-mb16 { margin-bottom: 16px; }
.u-pull8 { margin: -8px 0 8px; }
.u-pull12 { margin: -8px 0 12px; }
.u-right { text-align: right; }
.u-nowrap { white-space: nowrap; }

/* ---------- monitoring ---------- */
:root {
  --series-1: #2a78d6;   /* validated categorical pair on #fff (dataviz validator: all checks pass) */
  --series-2: #eb6834;
  --chart-grid: #eaecf0;
}
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-err { color: var(--err); }
.t-warn { color: var(--warn); }
.live-badge { height: 30px; padding: 0 12px; }
.live-badge .dot { animation: pulse 1.6s ease-in-out infinite; }

.stat.col { flex-direction: column; align-items: stretch; gap: 8px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--subtle); }
.stat-top .stat-l { color: var(--muted); font-weight: 500; }
.stat-v-sm { font-size: 16px; }
.stat-f { font-size: 12px; color: var(--muted); }
.stats:has(.stat.col) { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.meter { height: 6px; border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .4s ease; }
.meter.m-ok { background: #e0eaff; }
.meter.m-ok i { background: #2a78d6; }
.meter.m-warn { background: var(--warn-bg); }
.meter.m-warn i { background: var(--warn-dot); }
.meter.m-err { background: var(--err-bg); }
.meter.m-err i { background: var(--err-dot); }

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.chart-grid .panel { margin-bottom: 0; }
.chart-grid + .panel { margin-top: 20px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cols-2 > * { min-width: 0; }

.chart { position: relative; }
.chart.stale { opacity: .5; transition: opacity .2s; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin: -4px 0 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 14px; height: 2px; border-radius: 2px; flex: none; }
.key.s1 { background: var(--series-1); }
.key.s2 { background: var(--series-2); }
.chart-plot { position: relative; }
.chart-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-plot svg:focus { outline: none; }
.chart-plot svg:focus-visible { outline: 2px solid var(--accent-border); outline-offset: 4px; border-radius: var(--r-sm); }
.chart-plot .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-plot .ref { stroke: var(--border-strong); stroke-width: 1; }
.chart-plot .axis { fill: var(--muted); font: 10.5px var(--font); font-variant-numeric: tabular-nums; }
.chart-plot .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-plot .line.s1 { stroke: var(--series-1); }
.chart-plot .line.s2 { stroke: var(--series-2); }
.chart-plot .area.s1 { fill: var(--series-1); fill-opacity: .1; stroke: none; }
.chart-plot .dot { stroke: var(--surface); stroke-width: 2; }
.chart-plot .dot.s1 { fill: var(--series-1); }
.chart-plot .dot.s2 { fill: var(--series-2); }
.chart-plot .cross { stroke: var(--subtle); stroke-width: 1; }
.chart-plot .hit { fill: transparent; cursor: crosshair; }
.chart-plot .hidden { display: none; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 8px 10px; font-size: 12px;
}
.tip-time { color: var(--muted); margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row b { font-variant-numeric: tabular-nums; color: var(--text); }
.tip-row span { color: var(--muted); }
.chart-empty { display: grid; place-items: center; height: 210px; color: var(--muted); background: var(--surface-2); border-radius: var(--r); }
.chart-table { margin-top: 8px; font-size: 12px; }
.chart-table summary { cursor: pointer; color: var(--muted); width: max-content; }
.chart-table summary:hover { color: var(--text); }
.chart-table-body { max-height: 260px; overflow: auto; margin-top: 8px; border: 1px solid var(--border); border-radius: var(--r); }
.chart-table-body td, .chart-table-body th { padding: 6px 12px; font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .chart-grid, .cols-2 { grid-template-columns: minmax(0, 1fr); }
}

/* monitoring tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -8px 0 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px;
  color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a .ic { color: var(--subtle); }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabs a.on .ic { color: var(--accent); }
.tab-n { font-size: 11px; font-weight: 600; line-height: 18px; padding: 0 7px; border-radius: 99px; background: var(--surface-3); color: var(--muted); }
.tab-n.err { background: var(--err-bg); color: var(--err); }
.sum-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.sum-card { gap: 8px; }
.ic.subtle { color: var(--subtle); }
@media (max-width: 900px) { .sum-grid { grid-template-columns: minmax(0, 1fr); } }

/* security */
.t-ok { color: var(--ok); }
.sec-hero { display: flex; align-items: center; gap: 24px; }
.sec-hero .meter { margin-top: 12px; max-width: 520px; }
.score { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; align-content: center; flex: none; border: 6px solid; }
.score-ok { border-color: var(--ok-border); background: var(--ok-bg); color: var(--ok); }
.score-warn { border-color: var(--warn-border); background: var(--warn-bg); color: var(--warn); }
.score-err { border-color: var(--err-border); background: var(--err-bg); color: var(--err); }
.score-v { font-size: 28px; font-weight: 700; line-height: 1; }
.score-l { font-size: 11.5px; opacity: .8; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 22px; border-top: 1px solid var(--border); min-width: 0; }
.checks li:first-child { border-top: 0; }
.checks .chk-st { width: 104px; flex: none; }
.checks b { font-weight: 600; }
.chk-v { color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.chk-a { color: var(--text-2); margin-top: 6px; font-size: 12px; }
.chk-a .ic { color: var(--subtle); }
.chk-fail { background: linear-gradient(90deg, var(--err-bg), transparent 40%); }
.chart-plot .bar.s1 { fill: var(--series-1); }
.chart-plot .hit.on { fill: rgba(16, 24, 40, .04); }
@media (max-width: 900px) {
  .sec-hero { flex-direction: column; align-items: flex-start; }
  .checks li { flex-direction: column; gap: 6px; padding: 12px 16px; }
  .checks .chk-st { width: auto; }
}

/* projects page */
.stat-btn { cursor: pointer; font: inherit; color: inherit; text-align: left; transition: border-color .15s, box-shadow .15s; }
.stat-btn:hover { border-color: var(--accent-border); box-shadow: var(--shadow-sm); }
.stat-btn.on { border-color: var(--accent); box-shadow: var(--ring); }
.sel-sm { width: auto; font-size: 12px; }
.focus-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 14px; border-radius: var(--r); background: var(--accent-soft); border: 1px solid var(--accent-border); color: #3730a3; font-size: 12.5px; }
.focus-bar .btn { margin-left: auto; }
.issue-group { padding: 18px 22px; }
.ig-head { display: flex; align-items: center; gap: 10px; }
.ig-err .ig-head > .ic { color: var(--err-dot); }
.ig-warn .ig-head > .ic { color: var(--warn-dot); }
.ig-what { margin: 10px 0 4px; color: var(--text-2); }
.ig-todo { margin: 0 0 12px; color: var(--text-2); font-size: 12.5px; }
.ig-todo .ic { color: var(--accent); }
.ig-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.ig-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.ig-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.ig-list .tile { width: 32px; height: 32px; font-size: 12px; border-radius: var(--r); }
.ig-text { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.card-issue { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; padding: 7px 10px; border-radius: var(--r); border: 1px solid; }
.card-issue .ic { margin-top: 1px; }
.ci-err { background: var(--err-bg); border-color: var(--err-border); color: #912018; }
.ci-warn { background: var(--warn-bg); border-color: var(--warn-border); color: #93370d; }

.ptable td { vertical-align: middle; }
.ptable .cell-user span { display: block; max-width: 260px; }
.issue-cell { max-width: 280px; white-space: normal; font-size: 12px; }
@media (max-width: 900px) { .ig-list li { flex-wrap: wrap; } .focus-bar .btn { margin-left: 0; } }

/* project problems */
.fix-card { border-left: 3px solid var(--border-strong); }
.fix-card.fc-err { border-left-color: var(--err-dot); }
.fix-card.fc-warn { border-left-color: var(--warn-dot); }
.fix-card.fc-info { border-left-color: var(--info-dot); }
.fix-detail { margin: 10px 0; color: var(--text-2); }
.fix-plan { margin: 0 0 14px; }
.fix-plan summary { cursor: pointer; color: var(--accent); font-weight: 500; width: max-content; }
.fix-plan ol { margin: 8px 0 4px; padding-left: 22px; }
.fix-plan li { margin: 3px 0; overflow-wrap: anywhere; }
.pi-light li > .ic { color: var(--warn-dot); flex: none; }
dialog ol { padding-left: 22px; }
dialog ol li { overflow-wrap: anywhere; margin: 3px 0; }

/* phase 2: diffs, guides */
pre.diff { margin: 8px 0 0; padding: 12px 14px; max-height: 360px; overflow: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); font: 11.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
pre.diff .d-add { color: #067647; background: #ecfdf3; display: inline-block; width: 100%; }
pre.diff .d-del { color: #b42318; background: #fef3f2; display: inline-block; width: 100%; }
pre.diff .d-meta { color: var(--muted); }
.guide-box { background: var(--info-bg); border: 1px solid var(--info-border); color: #194185; border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; }
.guide-box ol { margin: 8px 0 0; padding-left: 22px; }
.guide-box li { margin: 3px 0; }
.analysis { border-left: 3px solid var(--warn-dot); }
.an-row { padding: 8px 0; border-top: 1px solid var(--border); color: var(--text-2); }
.an-row:first-of-type { border-top: 0; }
.an-row b { color: var(--text); }

/* ---------- phase 5: deep check, daily report, telegram ---------- */
.u-mt8 { margin-top: 8px; }
.stat-ic.err { background: var(--err-bg); color: var(--err); }
.deep-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.deep-head .grow { min-width: 220px; }
.deep-sum { display: flex; gap: 6px; flex-wrap: wrap; }
.deep .meter { margin-top: 14px; }
.deep-groups { margin-top: 16px; display: grid; gap: 8px; }
.dg { border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: var(--r); padding: 0 14px; background: var(--surface); }
.dg-err { border-left-color: var(--err-dot); }
.dg-warn { border-left-color: var(--warn-dot); }
.dg > summary { display: flex; align-items: center; gap: 10px; padding: 11px 0; cursor: pointer; list-style: none; min-width: 0; }
.dg > summary::-webkit-details-marker { display: none; }
.dg > summary b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.dg-err > summary > .ic { color: var(--err-dot); }
.dg-warn > summary > .ic { color: var(--warn-dot); }
.dg[open] > summary { border-bottom: 1px solid var(--border); }
.dg .ig-list { border-top: 0; padding-bottom: 12px; }
.r-head { align-items: center; }
.r-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 480px; overflow: auto; }
.r-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r); background: none; font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer; text-align: left; }
.r-item:hover { background: var(--surface-2); }
.r-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.r-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--gray-dot); }
.dot.d-ok { background: var(--ok-dot); }
.dot.d-warn { background: var(--warn-dot); }
.dot.d-err { background: var(--err-dot); }
.r-lines { list-style: none; margin: 0; padding: 0; }
.r-lines li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border); font-size: 12.5px; min-width: 0; }
.r-lines li:first-child { border-top: 0; padding-top: 0; }
.r-lines li > .ic { margin-top: 2px; }
.r-lines .grow { min-width: 0; overflow-wrap: anywhere; }
.tg-step { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--border); }
h2 + .tg-step, .alert + .tg-step { border-top: 0; }
.tg-step.done .step-num { background: var(--ok-bg); color: var(--ok); }
.tg-step .step-num .ic { width: 14px; height: 14px; }
.tg-step .grow { min-width: 0; }
.tg-prefs label:not(.check) { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 400; margin: 6px 0 10px; }
.tg-prefs select { width: auto; }
@media (max-width: 1100px) { .report-cols { grid-template-columns: minmax(0, 1fr); } .report-cols > :last-child { order: -1; } }
.right { text-align: right; }
td.right .btn + .btn { margin-left: 6px; }
.log-bar select:first-child { max-width: 360px; }
.log-bar .check { white-space: nowrap; }
td.q-err { font-family: var(--mono); font-size: 11.5px; color: var(--err); max-width: 420px; overflow-wrap: anywhere; }
.env-table td { padding: 6px 14px; }
.env-table th:first-child, .env-table td:first-child { width: 34%; overflow-wrap: anywhere; }
.env-table td:first-child b { font-weight: 600; font-size: 12px; }
.env-table td:first-child .ic { color: var(--subtle); margin-left: 4px; }
.env-table input { height: 30px; font-size: 12px; }
.env-table td:last-child { width: 1%; }
.env-table tr.env-ed td { background: var(--warn-bg); }
.env-table tr.env-del td { background: var(--err-bg); }
.env-table tr.env-del td:first-child b { text-decoration: line-through; }
.env-table tr.env-new td { background: var(--ok-bg); }
.dw-table input { width: 100%; }
.dw-table input.hm { width: 72px; font-family: var(--mono); }
.daychip { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; margin-right: 3px; padding: 0 6px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 11.5px; cursor: pointer; user-select: none; color: var(--muted); }
.daychip input { display: none; }
.daychip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.th-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-transform: inherit; letter-spacing: inherit; }
th.sorted .th-btn { color: var(--text); }
.res-table td.num, .res-table th { white-space: nowrap; }
.share { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.share .meter { flex: 1; }
td.sql { font-size: 11.5px; max-width: 520px; overflow-wrap: anywhere; white-space: normal; }

/* ---------- project card (fixed structure: head · 4 facts · one status line) ---------- */
.grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.card.pc { gap: 0; padding: 0; overflow: hidden; transform: none; }
.card.pc:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.pc .card-top { padding: 14px 16px 12px; }
.pc .tile { width: 34px; height: 34px; font-size: 13px; }
.pc-kv { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 7px 12px; margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--border); font-size: 12px; }
.pc-kv dt { color: var(--subtle); font-size: 11px; line-height: 18px; text-transform: uppercase; letter-spacing: .04em; }
.pc-kv dd { margin: 0; min-width: 0; display: flex; align-items: center; gap: 8px; line-height: 18px; color: var(--text-2); }
.pc-commit .sha { flex: none; }
.pc-commit .ellipsis { color: var(--text-2); }
.pc-auto { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; flex: none; font-size: 11px; color: var(--accent); }
.pc-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 9px 16px; border-top: 1px solid var(--border); font-size: 12px; min-width: 0; }
.pc-foot b { flex: none; font-weight: 650; }
.pf-ok { color: var(--ok); background: var(--surface-2); }
.pf-warn { color: #93370d; background: var(--warn-bg); border-top-color: var(--warn-border); }
.pf-err { color: #912018; background: var(--err-bg); border-top-color: var(--err-border); }
.pc-found { display: inline-flex; align-items: center; gap: 3px; flex: none; opacity: .8; }
/* status text: dot (or icon) + words */
.st { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); }
.st > i { width: 7px; height: 7px; border-radius: 50%; background: var(--gray-dot); flex: none; }
.st .ic { color: var(--subtle); }
.st.ok > i { background: var(--ok-dot); } .st.ok .ic { color: var(--ok-dot); }
.st.warn { color: var(--warn); } .st.warn > i { background: var(--warn-dot); } .st.warn .ic { color: var(--warn-dot); }
.st.err { color: var(--err); } .st.err > i { background: var(--err-dot); } .st.err .ic { color: var(--err-dot); }
.st.accent { color: var(--accent); } .st.accent > i { background: var(--accent); } .st.accent .ic { color: var(--accent); }

/* ---------- attack statistics ---------- */
:root { --series-3: #1baf7a; --seq-bg: #e3edf9; }
.key.s3 { background: var(--series-3); }
.key.sq { width: 10px; height: 10px; border-radius: 2px; }
.chart-plot .bar.s2 { fill: var(--series-2); }
.chart-plot .bar.s3 { fill: var(--series-3); }
.tip-row .key { flex: none; }
.tip-total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.meter.m-seq { background: var(--seq-bg); }
.meter.m-seq i { background: var(--series-1); }
.atk-runs { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin: -6px 0 18px; font-size: 12px; color: var(--muted); }
.atk-run { display: inline-flex; align-items: center; gap: 6px; }
.atk-run .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gray-dot); }
.atk-run .dot.d-ok { background: var(--ok-dot); }
.atk-run .dot.d-err { background: var(--err-dot); }
.atk-run b { color: var(--text-2); font-weight: 600; }
.atk-tiles { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important; }
.atk-table td { padding: 8px 16px; }
.atk-table td.atk-w { width: 44%; }
.atk-path { max-width: 0; width: 56%; }
.atk-path .ellipsis { display: block; }
.cc { display: inline-grid; place-items: center; min-width: 26px; height: 18px; padding: 0 4px; border-radius: var(--r-sm); background: var(--surface-3); border: 1px solid var(--border); font-size: 10.5px; font-weight: 650; color: var(--text-2); flex: none; }
.cc-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kchips { display: flex; gap: 4px; flex-wrap: wrap; }
.kchip { font-size: 10.5px; line-height: 16px; padding: 0 6px; border-radius: var(--r-sm); border: 1px solid var(--border); color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
.cols-2 > div > .panel:last-child { margin-bottom: 20px; }
.share .num { min-width: 56px; text-align: right; }

/* ---------- tables: denser rows for the monospace face; short meta cells never wrap ---------- */
th { padding: 10px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
td { padding: 10px 14px; font-size: 12.5px; }
td.muted, td.num { white-space: nowrap; }
.log-bar select { width: auto; max-width: 340px; }
.log-bar .search { flex: 1; width: auto; min-width: 200px; }
.log .l-err, .log .l-ok, .log .l-step { font-weight: 600; }
@media (max-width: 900px) {
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  h1 { font-size: 18px; overflow-wrap: break-word; }
  .atk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .atk-tiles .stat-v { font-size: 18px; }
  .pc-kv { grid-template-columns: 58px minmax(0, 1fr); }
}

/* ---------- pager (automatic for long tables) ---------- */
tr.pg-hide { display: none; }
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12px; position: sticky; left: 0; }
.panel:not(.flush) > .pager, .table-wrap + .pager { margin-top: 0; }
.pager .pg-q { width: 220px; max-width: 100%; }
.pager .pg-q input { height: var(--ctl-sm); font-size: 12px; padding-left: 30px; }
.pager .pg-q > .ic { left: 10px; }
.pg-info { color: var(--muted); white-space: nowrap; }
.pg-nav { display: flex; align-items: center; gap: 2px; }
.pg { min-width: 28px; height: var(--ctl-sm); padding: 0 7px; border: 1px solid transparent; border-radius: var(--r); background: none; color: var(--text-2); font: 500 12px var(--font); cursor: pointer; }
.pg:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.pg.on { background: var(--surface); border-color: var(--border-strong); color: var(--accent); font-weight: 650; box-shadow: var(--shadow-xs); }
.pg:disabled { opacity: .35; cursor: default; }
.pg-gap { color: var(--subtle); padding: 0 3px; }
.pager .pg-size { width: auto; height: var(--ctl-sm); font-size: 12px; padding-left: 8px; }
@media (max-width: 900px) {
  .pager { padding: 10px 12px; }
  .pager .pg-q { width: 100%; }
  .pager .spacer { display: none; }
}
.pager .pg-q { flex: 1 1 140px; width: auto; max-width: 240px; }
.pager .spacer { flex: 0 1 auto; margin-left: auto; }
.cols-2 { align-items: start; }
.audit-d { min-width: 280px; max-width: 560px; font-size: 12px; line-height: 1.55; color: var(--text-2); }
.audit-d .sha { font-size: 11px; }

/* ---------- team avatars ---------- */
.avs { display: inline-flex; align-items: center; padding-left: 6px; }
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; margin-left: -6px; font-size: 9.5px; font-weight: 700; letter-spacing: .02em; border: 2px solid var(--surface); cursor: default; position: relative; transition: transform .12s; }
.avs .av:hover { transform: translateY(-2px); z-index: 2; }
.av-c0 { background: #e0e7ff; color: #3730a3; } .av-c1 { background: #dcfae6; color: #067647; }
.av-c2 { background: #fef0c7; color: #93370d; } .av-c3 { background: #fce7f6; color: #9e165f; }
.av-c4 { background: #d1e9ff; color: #175cd3; } .av-c5 { background: #f4ebff; color: #6941c6; }
.av-more { background: var(--surface-3); color: var(--muted); }
.av-lg { width: 36px; height: 36px; margin: 0; font-size: 12.5px; border-width: 0; }
.ptable .cell-user .avs { margin-left: auto; }
.float-tip { position: fixed; z-index: 200; width: 300px; max-width: calc(100vw - 16px); padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xl); font-size: 12px; pointer-events: none; color: var(--text-2); }
.tip-u { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.tip-u b { color: var(--text); font-size: 13px; }
.tip-perms { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; }
.tip-perms li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.tip-perms li .ic { margin-top: 2px; }
.tip-perms li.ok .ic { color: var(--ok-dot); }
.tip-perms li.no { color: var(--subtle); }
.tip-perms li.no .ic { color: var(--subtle); }
.tip-f { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11.5px; }
.tip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tip-list li { display: flex; align-items: center; gap: 8px; }
.tip-list .av { margin: 0; }

/* ---------- account page ---------- */
.sb-me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--text); border-radius: var(--r); padding: 4px; margin: -4px; }
.sb-me:hover { background: var(--surface-2); color: var(--text); }
.sb-user.active .sb-me { background: var(--accent-soft); }
.avatar[class*="av-c"] { border: 0; }
.avatar.av-xl { width: 64px; height: 64px; font-size: 20px; }
.acc-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.acc-name { font-size: 18px; font-weight: 650; color: var(--text); }
.acc-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.acc-meta { display: flex; gap: 28px; margin: 0; flex-wrap: wrap; }
.acc-meta dt { font-size: 11px; color: var(--subtle); text-transform: uppercase; letter-spacing: .04em; }
.acc-meta dd { margin: 2px 0 0; font-weight: 600; color: var(--text); white-space: nowrap; }
.acc-form input[readonly] { color: var(--muted); }
.pw-field { position: relative; }
.pw-field input { padding-right: 40px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 26px; border: 0; background: none; color: var(--subtle); cursor: pointer; border-radius: var(--r-sm); display: grid; place-items: center; }
.pw-eye:hover, .pw-eye.on { color: var(--accent); background: var(--accent-soft); }
.pw-rules { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 14px; font-size: 12px; color: var(--subtle); }
.pw-rules li { display: flex; align-items: center; gap: 6px; }
.pw-rules li .ic { color: var(--border-strong); }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok .ic { color: var(--ok-dot); }
.acc-sessions { list-style: none; margin: 0; padding: 0; }
.acc-sessions li { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.acc-sessions .muted { font-size: 12px; margin-top: 2px; }
.acc-dev { width: 34px; height: 34px; border-radius: var(--r); background: var(--surface-3); color: var(--muted); display: grid; place-items: center; flex: none; }
.acc-perms { margin: 0; font-size: 12.5px; }
.acc-projects { display: flex; gap: 6px; flex-wrap: wrap; }
.acc-projects .badge:hover { border-color: var(--accent-border); color: var(--accent); }
@media (max-width: 900px) {
  .acc-meta { gap: 18px; width: 100%; }
  .acc-sessions li { padding: 12px 16px; flex-wrap: wrap; }
  .cols > div > .panel:last-child { margin-bottom: 20px; }
}
@media (max-width: 1100px) { .cols { row-gap: 0; } }

/* ---------- avatars (photo or coloured initials) ---------- */
.av-c6 { background: #ccfbef; color: #107569; } .av-c7 { background: #fee4e2; color: #b42318; }
.avatar { overflow: hidden; }
.avatar.has-img, .av.has-img { background: var(--surface-3); padding: 0; }
.avatar img, .av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar.av-lg2 { width: 56px; height: 56px; font-size: 17px; }
.acc-av { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; flex: none; }
.acc-av .acc-av-edit { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-2); box-shadow: var(--shadow-sm); transition: transform .12s; }
.acc-av:hover .acc-av-edit { transform: scale(1.1); color: var(--accent); border-color: var(--accent); }
.acc-av:focus-visible { outline: none; box-shadow: var(--ring); }
.acc-photo { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.acc-photo b { color: var(--text); }
.acc-colors { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 0 4px; font-size: 12px; }
.acc-colors .muted { margin-right: 4px; }
.acc-colors.dim .swatch { opacity: .55; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; font: 700 9.5px var(--font); cursor: pointer; display: grid; place-items: center; padding: 0; }
.swatch:hover { transform: scale(1.08); }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
/* crop editor */
dialog:has(.ave) { width: min(620px, calc(100vw - 32px)); }
.ave { display: flex; gap: 22px; align-items: flex-start; margin-top: 14px; }
.ave-main { flex: 1; min-width: 0; }
.ave-drop { aspect-ratio: 1; max-width: 320px; margin: 0 auto; border: 2px dashed var(--border-strong); border-radius: var(--r-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; background: var(--surface-2); transition: border-color .12s, background .12s; }
.ave-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.ave-drop .empty-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.ave-drop b { color: var(--text); }
.ave-src { justify-content: center; margin-top: 6px; }
kbd { font: 600 11px var(--font); padding: 1px 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); color: var(--text-2); }
.ave-stage { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1; margin: 0 auto; border-radius: var(--r-lg); overflow: hidden; background: repeating-conic-gradient(#eef0f3 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.ave-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.ave-stage canvas.grab { cursor: grabbing; }
.ave-stage canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ave-ring { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle closest-side at center, transparent 99.5%, rgba(15, 21, 32, .55) 100%); }
.ave-ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9); }
.ave-side { width: 128px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ave-label { font-size: 11px; color: var(--subtle); text-transform: uppercase; letter-spacing: .04em; align-self: flex-start; }
.ave-prev { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.ave-prev canvas { border-radius: 50%; background: var(--surface-3); box-shadow: 0 0 0 1px var(--border); }
.ave-prev-row { display: flex; gap: 16px; align-items: flex-end; }
.ave-tools { margin-top: 16px; display: grid; gap: 10px; }
.ave-zoom { display: flex; align-items: center; gap: 8px; }
.ave-zoom input[type=range] { flex: 1; accent-color: var(--accent); height: auto; padding: 0; border: 0; box-shadow: none; }
@media (max-width: 600px) {
  .ave { flex-direction: column; align-items: stretch; }
  .ave-side { width: auto; flex-direction: row; justify-content: center; }
  .ave-label { display: none; }
}

/* brand: Wanderer logo is a self-contained image (albatross over a server) */
img.logo { background: none; box-shadow: 0 1px 2px rgba(67, 56, 202, .25); padding: 0; object-fit: contain; }

/* project tile with the site's own favicon / logo */
.tile.has-icon { background: var(--surface); border-color: var(--border); padding: 5px; overflow: hidden; }
.tile.has-icon img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 3px; }
.tile.lg.has-icon { padding: 7px; }
.ptable .cell-user .avs { display: inline-flex; max-width: none; }
.ptable .cell-user .avs .av { display: inline-grid; max-width: none; }
.ptable .issue-cell { min-width: 180px; }
.ptable .cell-user .tile { display: grid; max-width: none; }

/* ---------- projects table: fixed layout, always fits the page ---------- */
.ptable { table-layout: fixed; width: 100%; }
.ptable col.pc-name { width: 24%; }
.ptable col.pc-state { width: 18%; }
.ptable col.pc-ver { width: 12%; }
.ptable col.pc-dep { width: 12%; }
.ptable col.pc-team { width: 76px; }
.ptable th, .ptable td { padding-left: 12px; padding-right: 12px; }
.ptable td { overflow: hidden; }
.ptable .cell-user { min-width: 0; }
.ptable .cell-user .grow { min-width: 0; }
.ptable .cell-user b, .ptable .cell-user span.ellipsis { display: block; max-width: 100%; }
.pt-stack { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 12px; }
.pt-stack > * { max-width: 100%; }
.pt-stack .sha { align-self: flex-start; }
.pt-stack .pc-auto { margin-left: 0; }
.ptable .issue-cell { min-width: 0; max-width: none; white-space: normal; }
.pt-issue { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; line-height: 1.45; }
.pt-issue .ic { margin-top: 2px; flex: none; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-more { font-size: 11px; margin: 2px 0 0 20px; }
@media (max-width: 900px) {
  .ptable { table-layout: auto; min-width: 640px; }
}

/* ---------- settings: section nav + forms ---------- */
.set-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-nav { position: sticky; top: 20px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 6px; }
.set-nav a { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: var(--r); color: var(--text-2); }
.set-nav a .ic { margin-top: 2px; color: var(--subtle); flex: none; }
.set-nav a b { display: block; font-weight: 600; font-size: 12.5px; }
.set-nav a small { display: block; font-size: 11px; color: var(--subtle); line-height: 1.4; margin-top: 1px; }
.set-nav a:hover { background: var(--surface-2); color: var(--text); }
.set-nav a.on { background: var(--accent-soft); color: var(--accent); }
.set-nav a.on .ic, .set-nav a.on small { color: var(--accent); }
.set-body { min-width: 0; }
.set-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.set-hero img.logo { width: 52px; height: 52px; border-radius: 12px; }
.set-ints { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.set-int { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--r); color: var(--text-2); font-size: 12.5px; min-width: 0; }
.set-int > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-int > i { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-dot); flex: none; }
.set-int.ok > i { background: var(--ok-dot); } .set-int.err > i { background: var(--err-dot); }
.set-int .ic { color: var(--subtle); }
.set-int:hover { border-color: var(--accent-border); background: var(--surface-2); color: var(--text); }
.set-howto summary { cursor: pointer; color: var(--accent); font-weight: 500; font-size: 12.5px; width: max-content; margin-top: 12px; }
.set-hook dd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.set-usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.set-u { border: 1px solid var(--border); border-radius: var(--r); padding: 12px; display: grid; gap: 2px; background: var(--surface-2); }
.set-u b { font-size: 16px; color: var(--text); }
.set-u span { font-size: 12px; color: var(--text-2); font-weight: 600; }
.set-u small { font-size: 11px; color: var(--muted); }
.cf-form { border-top: 1px solid var(--border); margin-top: 6px; }
.cf-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--border); align-items: start; }
.cf-row.dirty .cf-label b::after { content: ' • o‘zgargan'; color: var(--warn); font-weight: 500; font-size: 11px; }
.cf-row.dirty input, .cf-row.dirty textarea { border-color: var(--warn-dot); }
.cf-label b { color: var(--text); font-size: 13px; }
.cf-label .field-hint { margin-top: 4px; line-height: 1.55; }
.cf-num { display: flex; align-items: center; gap: 8px; }
.cf-num input { width: 120px; font-variant-numeric: tabular-nums; }
.cf-num span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.cf-ctl textarea { min-height: 96px; font-size: 12px; }
.cf-def { font-size: 11px; color: var(--subtle); margin-top: 6px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cf-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 14px 0 2px; background: var(--surface); font-size: 12.5px; }
@media (max-width: 1000px) {
  .set-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .set-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; }
  .set-nav a { flex: none; align-items: center; }
  .set-nav a small { display: none; }
  .set-ints { grid-template-columns: minmax(0, 1fr); }
  .cf-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 1000px) { .cf-bar { border-top: 1px solid var(--border); margin: 0 -16px; padding: 12px 16px; box-shadow: 0 -6px 12px -8px rgba(16, 24, 40, .15); } }

/* ---------- users ---------- */
.tile.xs { width: 22px; height: 22px; font-size: 10px; border-radius: 5px; }
.tile.xs.has-icon { padding: 2px; }
.tile.sm { width: 30px; height: 30px; font-size: 12px; border-radius: 7px; }
.tile.sm.has-icon { padding: 4px; }
.u-projs { display: flex; gap: 4px; align-items: center; }
.u-sec { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.utable td { vertical-align: middle; }
tr.u-off td { opacity: .6; }
.role-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role-card { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--r-lg); cursor: pointer; font-weight: 400; transition: border-color .12s, background .12s; }
.role-card input { position: absolute; opacity: 0; pointer-events: none; }
.role-card .rc-ic { width: 34px; height: 34px; border-radius: var(--r); display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.role-card b { display: block; color: var(--text); font-size: 13px; }
.role-card small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.5; margin-top: 2px; }
.role-card:hover { border-color: var(--accent-border); }
.role-card.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--ring); }
.role-card.on .rc-ic { background: var(--accent); color: #fff; }
.role-card.locked { cursor: not-allowed; opacity: .75; }
.perm-presets { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 18px 0 6px; font-size: 12px; }
.perm-presets .chip { border: 1px solid var(--border); background: var(--surface); }
.perm-presets .chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.perm-group { margin-top: 14px; }
.perm-group .ave-label { margin-bottom: 6px; }
.perm-row { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 6px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; font-weight: 400; }
.perm-row input { margin-top: 3px; }
.perm-row b { display: block; color: var(--text); font-size: 12.5px; }
.perm-row small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; line-height: 1.5; }
.perm-row:hover { background: var(--surface-2); }
.perm-row.on { border-color: var(--accent-border); background: var(--accent-soft); }
.pp-bar { margin-bottom: 10px; }
.pp-bar .search { width: 220px; }
.pp-count { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.pp-count b { color: var(--text); }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; max-height: 460px; overflow: auto; padding: 2px; }
.pp-item { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; font-weight: 400; min-width: 0; }
.pp-item input { flex: none; }
.pp-item b { display: block; font-size: 12px; color: var(--text); }
.pp-item small { display: block; font-size: 11px; color: var(--muted); }
.pp-item:hover { background: var(--surface-2); }
.pp-item.on { border-color: var(--accent-border); background: var(--accent-soft); }
.uf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.uf-grid > div > label { margin-top: 16px; }
.uf-grid > div:nth-child(-n+2) > label { margin-top: 0; }
.nu-side { position: sticky; top: 20px; }
.nu-summary .nu-go { width: 100%; margin-top: 16px; }
.danger-zone { border-color: var(--err-border); }
.danger-zone h2 { color: var(--err); }
.dz-row { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.dz-row:first-of-type { border-top: 0; padding-top: 0; }
.t-ok .ic, .t-err .ic { vertical-align: -2px; }
@media (max-width: 900px) {
  .role-cards, .uf-grid { grid-template-columns: minmax(0, 1fr); }
  .uf-grid > div:nth-child(2) > label { margin-top: 16px; }
  .nu-side { position: static; }
  .dz-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}
.cf-bar { border-top: 1px solid var(--border); margin-top: 8px; }
.panel > .cf-bar { box-shadow: 0 -8px 12px -10px rgba(16, 24, 40, .12); }
.danger-zone .dz-row .btn { flex: none; }

/* =====================================================================================================
   DARK THEME (default). Colour logic:
   · background — deep blue-ink, never pure black: calm, trustworthy, easy on the eyes during long monitoring
   · surfaces step up in lightness (bg → surface → surface-2/3) instead of drop shadows, so depth stays readable
   · text — soft off-white (not #fff) to avoid glare; secondary text is cool grey
   · accent — the brand indigo (technology, focus); used only for actions, selection and links
   · status colours keep their meaning and nothing else: green = safe, amber = attention, red = danger, blue = info
   Light theme stays available (Hisobim → Ko‘rinish) via <html data-theme="light">.
   ===================================================================================================== */
:root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #0b1019;
  --surface: #121926;
  --surface-2: #161e2d;
  --surface-3: #1c2536;
  --border: #243044;
  --border-strong: #33415a;
  --text: #e6eaf1;
  --text-2: #c5ccd8;
  --muted: #8e99ab;
  --subtle: #66738a;

  --accent: #6d6ff5;
  --accent-hover: #8385f8;
  --accent-soft: rgba(109, 111, 245, .14);
  --accent-border: rgba(131, 133, 248, .38);
  --ring: 0 0 0 3px rgba(131, 133, 248, .3);

  --ok: #4cd18c;     --ok-bg: rgba(34, 197, 94, .1);    --ok-border: rgba(34, 197, 94, .3);    --ok-dot: #22c55e;
  --warn: #f6b54a;   --warn-bg: rgba(247, 144, 9, .11);  --warn-border: rgba(247, 144, 9, .32); --warn-dot: #f79009;
  --err: #ff7b72;    --err-bg: rgba(240, 68, 56, .11);   --err-border: rgba(240, 68, 56, .34);  --err-dot: #f04438;
  --info: #6cb0ff;   --info-bg: rgba(46, 144, 250, .11); --info-border: rgba(46, 144, 250, .32); --info-dot: #2e90fa;
  --gray-bg: #1c2536; --gray-border: #2a3549; --gray-dot: #66738a;

  --term-bg: #070a11;
  --term-head: #0e131d;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-lg: 0 14px 28px -8px rgba(0, 0, 0, .55);
  --shadow-xl: 0 28px 56px -12px rgba(0, 0, 0, .7);

  /* charts: dark steps of the validated palette (dataviz validator, surface #121926: all checks pass) */
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --chart-grid: #222c3e;
  --seq-bg: #1b2940;
  --link: #a3a5fc;
  --link-hover: #c6c7ff;
}
:root:not([data-theme="light"]) body { background: var(--bg); }

/* hard-coded light tints → dark equivalents */
:root:not([data-theme="light"]) .auth-wrap { background: radial-gradient(1100px 480px at 50% -12%, rgba(109, 111, 245, .18) 0%, rgba(109, 111, 245, 0) 62%), var(--bg); }
:root:not([data-theme="light"]) .toast { background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong); }
:root:not([data-theme="light"]) .toast.err { background: #3a1413; border-color: var(--err-border); color: #ffd5d1; }
:root:not([data-theme="light"]) dialog::backdrop { background: rgba(3, 6, 12, .72); }
:root:not([data-theme="light"]) .btn.primary { box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 0 0 1px rgba(131, 133, 248, .2) inset; }
:root:not([data-theme="light"]) .btn.danger.solid { background: #c92a1e; border-color: #c92a1e; }
:root:not([data-theme="light"]) input:hover:not(:disabled):not(:focus), :root:not([data-theme="light"]) select:hover:not(:disabled):not(:focus), :root:not([data-theme="light"]) textarea:hover:not(:disabled):not(:focus) { border-color: #45546f; }
:root:not([data-theme="light"]) select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238e99ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); }
:root:not([data-theme="light"]) pre.diff .d-add { color: #86efac; background: rgba(34, 197, 94, .1); }
:root:not([data-theme="light"]) pre.diff .d-del { color: #fca5a5; background: rgba(240, 68, 56, .1); }
:root:not([data-theme="light"]) .meter.m-ok { background: #1b2940; }
:root:not([data-theme="light"]) .meter.m-ok i { background: #3987e5; }
:root:not([data-theme="light"]) .ave-stage { background: repeating-conic-gradient(#1a2233 0 25%, #121926 0 50%) 0 0 / 16px 16px; }
:root:not([data-theme="light"]) .chart-plot .hit.on { fill: rgba(255, 255, 255, .04); }
:root:not([data-theme="light"]) .chk-fail { background: linear-gradient(90deg, rgba(240, 68, 56, .1), transparent 40%); }
/* project-type tiles & badges: deep tints of the same hues */
:root:not([data-theme="light"]) .tile.t-laravel, :root:not([data-theme="light"]) .tbadge.t-laravel { background: rgba(240, 68, 56, .13); color: #ff8b82; border-color: rgba(240, 68, 56, .28); }
:root:not([data-theme="light"]) .tile.t-nuxt, :root:not([data-theme="light"]) .tbadge.t-nuxt { background: rgba(34, 197, 94, .12); color: #5fdc98; border-color: rgba(34, 197, 94, .28); }
:root:not([data-theme="light"]) .tile.t-next, :root:not([data-theme="light"]) .tbadge.t-next { background: #1f2838; color: #e6eaf1; border-color: #33415a; }
:root:not([data-theme="light"]) .tile.t-vite, :root:not([data-theme="light"]) .tbadge.t-vite { background: rgba(139, 92, 246, .15); color: #b79cff; border-color: rgba(139, 92, 246, .32); }
/* site icons are drawn for white pages: keep a light plate behind them so dark logos stay visible */
:root:not([data-theme="light"]) .tile.has-icon { background: #e9edf3; border-color: #33415a; }
/* avatar initials: same eight hues, deep background + light letters */
:root:not([data-theme="light"]) .av-c0 { background: #2a2d6b; color: #c7c9ff; }
:root:not([data-theme="light"]) .av-c1 { background: #14432e; color: #9ff0c4; }
:root:not([data-theme="light"]) .av-c2 { background: #4a3210; color: #fdd690; }
:root:not([data-theme="light"]) .av-c3 { background: #4d1d3c; color: #f9b4df; }
:root:not([data-theme="light"]) .av-c4 { background: #133a63; color: #a9d2ff; }
:root:not([data-theme="light"]) .av-c5 { background: #37215f; color: #d6bfff; }
:root:not([data-theme="light"]) .av-c6 { background: #0f3f3a; color: #93ecdc; }
:root:not([data-theme="light"]) .av-c7 { background: #4a1916; color: #ffb2aa; }
:root:not([data-theme="light"]) .avatar:not([class*="av-c"]):not(.has-img) { background: var(--accent-soft); color: #c7c8ff; border-color: var(--accent-border); }
:root:not([data-theme="light"]) .av { border-color: var(--surface); }
:root:not([data-theme="light"]) .swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
/* sidebar & tabs: a touch deeper than the content surface */
:root:not([data-theme="light"]) .sidebar { background: #0e1420; }
:root:not([data-theme="light"]) .mobilebar { background: #0e1420; }
:root:not([data-theme="light"]) #nav a.active { background: var(--accent-soft); color: #b9bbff; }
:root:not([data-theme="light"]) #nav a.active .ic { color: #9fa1fb; }
:root:not([data-theme="light"]) .tabs a.on { color: #b9bbff; border-bottom-color: var(--accent); }
:root:not([data-theme="light"]) .tabs a.on .ic { color: #9fa1fb; }
:root:not([data-theme="light"]) .sha { color: #b3b5ff; background: rgba(109, 111, 245, .16); }
:root:not([data-theme="light"]) .badge.accent { color: #b9bbff; }
:root:not([data-theme="light"]) .st.accent, :root:not([data-theme="light"]) .pc-auto { color: #a5a7fb; }
:root:not([data-theme="light"]) .set-nav a.on, :root:not([data-theme="light"]) .set-nav a.on small, :root:not([data-theme="light"]) .set-nav a.on .ic { color: #b9bbff; }
:root:not([data-theme="light"]) .kchip, :root:not([data-theme="light"]) .cc { background: var(--surface-3); }
:root:not([data-theme="light"]) .pager { background: var(--surface-2); }
:root:not([data-theme="light"]) th { background: var(--surface-2); }
:root:not([data-theme="light"]) img.logo { box-shadow: 0 0 0 1px rgba(131, 133, 248, .25), 0 4px 14px rgba(67, 56, 202, .35); }
:root:not([data-theme="light"]) ::selection { background: rgba(109, 111, 245, .45); color: #fff; }
:root:not([data-theme="light"]) * { scrollbar-color: #33415a transparent; }

/* theme picker (Hisobim) */
.theme-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-opt { margin: 0; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--r-lg); cursor: pointer; overflow: hidden; font-weight: 400; background: var(--surface); }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt .tp { display: block; height: 64px; border-bottom: 1px solid var(--border); position: relative; }
.theme-opt .tp.dark { background: linear-gradient(90deg, #0e1420 0 28%, #121926 28%); }
.theme-opt .tp.light { background: linear-gradient(90deg, #ffffff 0 28%, #f4f5f7 28%); }
.theme-opt .tp.auto { background: linear-gradient(135deg, #121926 0 50%, #f4f5f7 50%); }
.theme-opt .tp::after { content: ''; position: absolute; left: 36%; top: 16px; right: 12px; height: 8px; border-radius: 4px; background: #6d6ff5; box-shadow: 0 14px 0 -1px rgba(128, 138, 160, .45), 0 26px 0 -1px rgba(128, 138, 160, .3); }
.theme-opt span.tl { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 12.5px; color: var(--text-2); }
.theme-opt.on { border-color: var(--accent); box-shadow: var(--ring); }
.theme-opt.on span.tl { color: var(--text); font-weight: 600; }
@media (max-width: 600px) { .theme-opts { grid-template-columns: minmax(0, 1fr); } }

/* links: same specificity as the base rule, so component colours (tabs, nav, cards) still win */
a { color: var(--link, var(--accent)); }
a:hover { color: var(--link-hover, var(--accent-hover)); }
.card, .card:hover, .sb-me, .sb-me:hover, .set-int, .sb-brand, .sb-brand:hover { color: var(--text); }
.set-int { color: var(--text-2); }

/* =====================================================================================================
   MODERN SURFACES (both themes) — colour carries meaning through a small dot / icon / text, never through
   pale tinted washes; selection = quiet neutral emphasis, never a coloured ring; focus = a crisp 1px line.
   ===================================================================================================== */
:root { --sel-border: color-mix(in srgb, var(--text) 32%, transparent); --sel-bg: var(--surface-2); --focus: var(--accent); --ring: 0 0 0 1px var(--focus); }

/* --- badges & pills: neutral body, coloured dot/icon and text --- */
.badge, .badge.ok, .badge.warn, .badge.err, .badge.info, .badge.accent { background: var(--surface-2); border-color: var(--border); }
.badge { color: var(--text-2); }
.badge.ok { color: var(--ok); } .badge.warn { color: var(--warn); } .badge.err { color: var(--err); } .badge.info { color: var(--info); } .badge.accent { color: var(--text); }
.badge.accent .ic { color: var(--accent); }
.tbadge, .tbadge.t-laravel, .tbadge.t-nuxt, .tbadge.t-next, .tbadge.t-vite,
:root:not([data-theme="light"]) .tbadge.t-laravel, :root:not([data-theme="light"]) .tbadge.t-nuxt, :root:not([data-theme="light"]) .tbadge.t-next, :root:not([data-theme="light"]) .tbadge.t-vite {
  background: transparent; border-color: var(--border); color: var(--text-2); font-weight: 500; }
.tbadge::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: var(--subtle); flex: none; }
.tbadge.t-laravel::before { background: #f05340; } .tbadge.t-nuxt::before { background: #22c55e; } .tbadge.t-next::before { background: var(--text); } .tbadge.t-vite::before { background: #a78bfa; }
/* project-type letter tiles: neutral square, coloured letter */
.tile.t-laravel, .tile.t-nuxt, .tile.t-next, .tile.t-vite, .tile.t-node, .tile.t-plain,
:root:not([data-theme="light"]) .tile.t-laravel, :root:not([data-theme="light"]) .tile.t-nuxt, :root:not([data-theme="light"]) .tile.t-next, :root:not([data-theme="light"]) .tile.t-vite {
  background: var(--surface-3); border-color: var(--border); }
.tile.t-laravel { color: #f05340; } .tile.t-nuxt { color: #22c55e; } .tile.t-next { color: var(--text); } .tile.t-vite { color: #a78bfa; }
:root:not([data-theme="light"]) .tile.t-laravel { color: #ff7a6b; } :root:not([data-theme="light"]) .tile.t-nuxt { color: #4ade80; } :root:not([data-theme="light"]) .tile.t-vite { color: #b8a3ff; }
.tile.has-icon, :root:not([data-theme="light"]) .tile.has-icon { background: #eef0f3; border-color: var(--border); }
/* icon squares in stat tiles: neutral plate, coloured glyph */
.stat-ic, .stat-ic.ok, .stat-ic.warn, .stat-ic.err, .stat-ic.info { background: var(--surface-3); }
.stat-ic { color: var(--accent); } .stat-ic.ok { color: var(--ok); } .stat-ic.warn { color: var(--warn); } .stat-ic.err { color: var(--err); } .stat-ic.info { color: var(--info); }
.tab-n.err { background: var(--surface-3); color: var(--err); }

/* --- alerts & banners: neutral card, coloured icon; text stays in text colours --- */
.alert, .alert.ok, .alert.warn, .alert.err, .alert.info, .guide-box, .focus-bar {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.alert b, .alert strong, .alert .alert-title, .guide-box b { color: var(--text); }
.alert > .ic:first-child, .alert .alert-title > .ic, .alert-title .ic { color: var(--muted); }
.alert.ok > .ic:first-child, .alert.ok .alert-title .ic { color: var(--ok-dot); }
.alert.warn > .ic:first-child, .alert.warn .alert-title .ic { color: var(--warn-dot); }
.alert.err > .ic:first-child, .alert.err .alert-title .ic { color: var(--err-dot); }
.alert.info > .ic:first-child, .alert.info .alert-title .ic { color: var(--info-dot); }
.alert.err { border-color: color-mix(in srgb, var(--err-dot) 35%, var(--border)); }
.guide-box .ic { color: var(--info-dot); }
.focus-bar { color: var(--text-2); }

/* --- project-card status line & inline issue boxes --- */
.pc-foot.pf-ok, .pc-foot.pf-warn, .pc-foot.pf-err { background: var(--surface); border-top-color: var(--border); color: var(--text-2); }
.pc-foot.pf-ok .ic { color: var(--ok-dot); } .pc-foot.pf-warn .ic { color: var(--warn-dot); } .pc-foot.pf-err .ic { color: var(--err-dot); }
.pc-foot b, .pc-found { color: var(--muted); }
.card-issue, .ci-err, .ci-warn { background: var(--surface-2); border-color: var(--border); color: var(--text-2); }
.ci-err .ic { color: var(--err-dot); } .ci-warn .ic { color: var(--warn-dot); }
.chk-fail, :root:not([data-theme="light"]) .chk-fail { background: none; }

/* --- selection: quiet neutral emphasis --- */
.stat-btn.on { border-color: var(--sel-border); box-shadow: none; background: var(--sel-bg); }
.stat-btn:hover { box-shadow: none; border-color: var(--border-strong); }
#nav a.active, :root:not([data-theme="light"]) #nav a.active { background: var(--surface-3); color: var(--text); }
#nav a.active .ic, :root:not([data-theme="light"]) #nav a.active .ic { color: var(--accent); }
.set-nav a.on, :root:not([data-theme="light"]) .set-nav a.on { background: var(--surface-3); color: var(--text); }
.set-nav a.on small, :root:not([data-theme="light"]) .set-nav a.on small { color: var(--muted); }
.set-nav a.on .ic, :root:not([data-theme="light"]) .set-nav a.on .ic { color: var(--accent); }
.sb-user.active .sb-me { background: var(--surface-3); }
.role-card.on { border-color: var(--sel-border); background: var(--sel-bg); box-shadow: none; }
.role-card.on .rc-ic { background: var(--surface-3); color: var(--accent); }
.perm-row.on, .pp-item.on { border-color: var(--sel-border); background: var(--sel-bg); }
.theme-opt.on { border-color: var(--sel-border); box-shadow: none; }
.perm-presets .chip.on { border-color: var(--sel-border); background: var(--surface-3); color: var(--text); }
.r-item.on { background: var(--surface-3); color: var(--text); }
.repo-item.on { background: var(--surface-3); box-shadow: none; }
.daychip.on { background: var(--surface-3); border-color: var(--sel-border); color: var(--text); }
.pg.on { border-color: var(--sel-border); color: var(--text); box-shadow: none; }
.swatch.on, :root:not([data-theme="light"]) .swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--text); }
.card:hover { box-shadow: none; border-color: var(--border-strong); transform: none; }

/* --- focus: crisp 1px accent line, no glow; keyboard-only rings for buttons & links --- */
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.cf-row.dirty input, .cf-row.dirty textarea { box-shadow: none; }
.btn:focus-visible, .chip:focus-visible, .pg:focus-visible, a:focus-visible, button:focus-visible, .stat-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: none; }
.btn:focus:not(:focus-visible) { box-shadow: var(--shadow-xs); }
:root:not([data-theme="light"]) .btn.primary { box-shadow: none; }
ol.steps > li::before { background: var(--surface-3); color: var(--text-2); border-color: var(--border); }
.tg-step.done .step-num { background: var(--surface-3); color: var(--ok); }
.avatar:not([class*="av-c"]):not(.has-img), :root:not([data-theme="light"]) .avatar:not([class*="av-c"]):not(.has-img) { background: var(--surface-3); color: var(--text-2); border-color: var(--border); }
.sha, :root:not([data-theme="light"]) .sha { background: var(--surface-3); color: var(--text-2); }
.env-table tr.env-ed td, .env-table tr.env-new td, .env-table tr.env-del td { background: var(--surface-2); }
.env-table tr.env-ed td:first-child { box-shadow: inset 2px 0 0 var(--warn-dot); }
.env-table tr.env-new td:first-child { box-shadow: inset 2px 0 0 var(--ok-dot); }
.env-table tr.env-del td:first-child { box-shadow: inset 2px 0 0 var(--err-dot); }

/* =====================================================================================================
   WANDERER CONCEPT (v2) — warm light canvas, borderless rounded cards, dark sidebar, one indigo "hero",
   black pill primary button, Manrope for text + JetBrains Mono for numbers/code.  Light is the default;
   the dark variant keeps the same structure.
   ===================================================================================================== */
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(fonts/manrope-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(fonts/manrope-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(fonts/manrope-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --r-sm: 8px; --r: 12px; --r-lg: 24px; --pill: 99px;
  --ctl: 40px; --ctl-sm: 32px;
  --sidebar: 260px;
  --hero: linear-gradient(135deg, #5b5ef0 0%, #7c6cf6 58%, #a78bfa 100%);
  --rail: #11141c; --rail-2: #1b1f29; --rail-text: #a9aebb; --rail-muted: #5f6573;
}
/* light (default) */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ecebe7;          /* canvas */
  --surface: #f6f5f2;     /* cards */
  --surface-2: #efede9;
  --surface-3: #e7e5e0;   /* chips, inner blocks */
  --input: #fbfaf8;
  --border: #e3e0da;      /* dividers only — cards have no border */
  --border-strong: #d6d2cb;
  --text: #14161c; --text-2: #3b3e46; --muted: #86837b; --subtle: #a4a19a;
  --accent: #5b5ef0; --accent-hover: #4b4ee0; --accent-soft: rgba(91, 94, 240, .1); --accent-border: rgba(91, 94, 240, .3);
  --ink: #14161c; --on-ink: #ffffff;
  --link: #4b4ee0; --link-hover: #3437c9;
  --ok: #15803d; --ok-dot: #22c55e; --warn: #b45309; --warn-dot: #f59e0b; --err: #c42b1c; --err-dot: #ef4444; --info: #2563eb; --info-dot: #3b82f6;
  --gray-dot: #a4a19a;
  --shadow-xs: none; --shadow-sm: none; --shadow-lg: 0 18px 40px -18px rgba(40, 32, 20, .25); --shadow-xl: 0 30px 60px -20px rgba(40, 32, 20, .35);
  --series-1: #5b5ef0; --series-2: #eb6834; --series-3: #1baf7a; --chart-grid: #e3e0da; --seq-bg: #e7e5e0;
  --sel-border: rgba(20, 22, 28, .55); --sel-bg: var(--surface); --focus: #5b5ef0;
}
/* dark variant */
:root:not([data-theme="light"]) {
  --bg: #0f1115; --surface: #171a20; --surface-2: #1c1f26; --surface-3: #22262e; --input: #111318;
  --border: #262a33; --border-strong: #323744;
  --text: #eef0f4; --text-2: #c4c8d0; --muted: #8b909b; --subtle: #6b707b;
  --accent: #7c7ff7; --accent-hover: #9597fa; --accent-soft: rgba(124, 127, 247, .14); --accent-border: rgba(124, 127, 247, .35);
  --ink: #eef0f4; --on-ink: #0f1115;
  --link: #a3a5fc; --link-hover: #c6c7ff;
  --rail: #07080b; --rail-2: #14171d;
  --sel-border: rgba(238, 240, 244, .5); --sel-bg: var(--surface); --focus: #8b8dfa;
  --shadow-xs: none; --shadow-sm: none;
  --chart-grid: #262a33; --seq-bg: #22262e;
}

body { font: 14px/1.55 var(--font); font-variant-ligatures: normal; letter-spacing: 0; }
b, strong { font-weight: 700; }
.mono, code, pre, .sha, .num, kbd, .secret-box, .log, td.mono, .stat-v, .score-v, .code-input { font-family: var(--mono); }

/* ---------- sidebar: dark, open, active item = tab that merges into the canvas ---------- */
.sidebar { background: var(--rail) !important; border-right: 0; padding-left: 18px; }
.sb-brand { padding: 26px 18px 24px 6px; color: #fff; }
.sb-brand:hover { color: #fff; }
.sb-brand .logo, .sidebar img.logo { width: 44px; height: 44px; border-radius: 14px; box-shadow: none; }
.sb-title { color: #fff; font-weight: 800; font-size: 17px; }
.sb-sub { color: #7d8391; }
#nav { padding: 0; }
.nav-label { color: var(--rail-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 14px 12px 6px; }
#nav a, :root:not([data-theme="light"]) #nav a { height: 44px; padding: 0 16px; margin: 1px 18px 1px 0; border-radius: var(--pill); color: var(--rail-text); font-weight: 600; font-size: 14px; gap: 12px; }
#nav a .ic { color: #7d8391; width: 19px; height: 19px; }
#nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
#nav a:hover .ic { color: #fff; }
#nav a.active, :root:not([data-theme="light"]) #nav a.active { margin-right: 0; border-radius: var(--pill) 0 0 var(--pill); background: var(--bg); color: var(--text); font-weight: 700; }
#nav a.active .ic, :root:not([data-theme="light"]) #nav a.active .ic { color: var(--accent); }
.sb-user { border-top: 0; margin: 12px 18px 18px 0; padding: 12px; border-radius: 18px; background: var(--rail-2); }
.sb-me, .sb-me:hover { color: #fff; }
.sb-me:hover { background: transparent; }
.sb-user .who b { color: #fff; }
.sb-user .who span { color: #7d8391; }
.sb-user .icon-btn { color: #7d8391; }
.sb-user .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sb-user.active { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.sb-user.active .sb-me { background: transparent; }
.mobilebar, :root:not([data-theme="light"]) .mobilebar { background: var(--rail); color: #fff; border-bottom: 0; }
.mobilebar .icon-btn { color: #fff; }
main { padding: 32px 40px 64px; max-width: 1320px; }

/* ---------- headings ---------- */
h1 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.ph-sub { font-size: 14.5px; color: var(--muted); margin-top: 8px; }
h2 { font-size: 16px; font-weight: 700; letter-spacing: -.005em; }
.back { font-weight: 600; }

/* ---------- surfaces: borderless, big radius ---------- */
.panel, .card, .stat, .auth-card, dialog, .set-nav, .pager, .chart-tip, .float-tip, .toast { border: 0 !important; }
.panel { background: var(--surface); border-radius: var(--r-lg); box-shadow: none; padding: 24px 26px; }
.panel.flush { padding: 0; }
.panel-head { border-bottom: 1px solid var(--border); padding: 18px 26px; }
.panel-body { padding: 18px 26px; }
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: none; }
.card:hover { box-shadow: none; }
.card.pc:hover { box-shadow: 0 0 0 2px var(--border-strong) inset; }

/* ---------- stats: label, big mono number, one indigo hero ---------- */
.stats { gap: 20px; }
.stat { background: var(--surface); border-radius: var(--r-lg); box-shadow: none; padding: 20px 22px; align-items: flex-start; }
.stat-v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat-l { font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-top: 4px; }
.stat-f { color: var(--muted); }
.stat-ic { border-radius: 12px; }
.stat-btn.on { box-shadow: inset 0 0 0 2px var(--sel-border); border: 0; }
.stat-btn:first-child, .atk-tiles > .stat:first-child { background: var(--hero); color: #fff; }
.stat-btn:first-child .stat-l, .stat-btn:first-child .stat-f, .atk-tiles > .stat:first-child .stat-l, .atk-tiles > .stat:first-child .stat-f, .atk-tiles > .stat:first-child .stat-top { color: rgba(255, 255, 255, .85); }
.stat-btn:first-child .stat-ic, .atk-tiles > .stat:first-child .ic { background: rgba(255, 255, 255, .16); color: #fff; }
.stat-btn:first-child.on { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.stat.col .stat-top .stat-l { margin: 0; }

/* ---------- buttons: pills; primary = ink ---------- */
.btn { height: var(--ctl); padding: 0 18px; border-radius: var(--pill); border: 0; background: var(--surface); color: var(--text); font: 700 13px var(--font); box-shadow: none; }
.panel .btn:not(.primary):not(.ghost):not(.danger), dialog .btn:not(.primary):not(.ghost):not(.danger) { background: var(--surface-3); }
.btn:hover { background: var(--surface-3); color: var(--text); }
.panel .btn:not(.primary):not(.ghost):not(.danger):hover, dialog .btn:not(.primary):not(.ghost):not(.danger):hover { background: var(--border-strong); }
.btn.primary, :root:not([data-theme="light"]) .btn.primary { background: var(--ink); color: var(--on-ink); border: 0; box-shadow: none; }
.btn.primary:hover { background: var(--ink); color: var(--on-ink); opacity: .88; }
.btn.danger { background: transparent; color: var(--err); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--err-dot) 40%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--err-dot) 10%, transparent); }
.btn.danger.solid, :root:not([data-theme="light"]) .btn.danger.solid { background: #dc2626; color: #fff; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { height: var(--ctl-sm); padding: 0 14px; font-size: 12.5px; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 14px; }
.icon-btn { border-radius: 12px; }

/* ---------- inputs ---------- */
input:not([type]), input[type=text], input[type=password], input[type=search], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  font: 500 14px var(--font); height: var(--ctl); padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--input); box-shadow: none; }
textarea { height: auto; padding: 10px 14px; font: 13px/1.6 var(--mono); border-radius: 14px; }
input[type=search], .toolbar select, select.sel-sm { border-radius: var(--pill); }
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.search > .ic { left: 15px; }
.search input { padding-left: 40px; }
.toolbar > .search input, .pager .pg-q input { background: var(--surface); border-color: transparent; }
.toolbar > select, .toolbar .sel-sm { background-color: var(--surface); border-color: transparent; }
.input-prefix span { border-radius: 12px 0 0 12px; background: var(--surface-3); border-color: var(--border); }
.input-prefix input { border-radius: 0 12px 12px 0; }
.env-table input, .dw-table input { background: var(--input); }
label { font-weight: 600; color: var(--text-2); font-size: 13px; }

/* ---------- segmented chips: pill group, active = ink ---------- */
.seg { background: var(--surface); border: 0; border-radius: var(--pill); padding: 4px; box-shadow: none; gap: 2px; }
.panel .seg { background: var(--surface-3); }
.chip { border-radius: var(--pill); padding: 7px 14px; font: 700 13px var(--font); color: var(--text-2); }
.chip.on, .perm-presets .chip.on { background: var(--ink); color: var(--on-ink); border-color: transparent; }
.chip.on .n { color: inherit; opacity: .65; }
.chip .n { font-family: var(--mono); font-size: 11.5px; }

/* ---------- tabs: text + thick ink underline ---------- */
.tabs { border-bottom: 0; gap: 26px; margin: -4px 0 24px; }
.tabs a { padding: 8px 2px 12px; font-weight: 600; font-size: 15px; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs a .ic { display: none; }
.tabs a:hover { color: var(--text); }
.tabs a.on, :root:not([data-theme="light"]) .tabs a.on { color: var(--text); border-bottom-color: var(--ink); font-weight: 700; }
.tab-n { background: var(--surface-3); color: var(--text-2); font-family: var(--mono); }

/* ---------- badges / pills ---------- */
.badge { border: 0; border-radius: var(--pill); background: var(--surface-3); padding: 3px 11px; font-weight: 700; font-size: 12px; }
.panel .badge, .card .badge { background: var(--surface-3); }
.tbadge { background: var(--surface-3) !important; border: 0 !important; }
.sha, :root:not([data-theme="light"]) .sha { border-radius: 8px; background: var(--surface-3); color: var(--text-2); padding: 2px 8px; font-size: 12px; }
.tile { border: 0 !important; border-radius: 14px; }
.tile.has-icon { background: #ffffff !important; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.kchip, .cc { border: 0; background: var(--surface-3); border-radius: 8px; }

/* ---------- project card ---------- */
.card.pc { border-radius: var(--r-lg); }
.pc .card-top { padding: 18px 20px 12px; }
.pc .tile { width: 44px; height: 44px; font-size: 16px; }
.card-title { font-size: 15.5px; font-weight: 700; }
.card-domain { font-size: 13px; }
.pc-kv { border-top: 0; padding: 6px 20px 16px; gap: 9px 12px; grid-template-columns: 74px minmax(0, 1fr); font-size: 13.5px; }
.pc-kv dt { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--subtle); }
.pc-kv .st > span { font-family: var(--mono); font-size: 12.5px; }
.pc-foot, .pc-foot.pf-ok, .pc-foot.pf-warn, .pc-foot.pf-err { margin: 0 12px 12px; padding: 11px 14px; border-radius: 16px; border-top: 0; background: var(--surface-3); color: var(--text-2); font-weight: 600; font-size: 13px; }
.pc-foot .ic { width: 22px; height: 22px; padding: 4px; border-radius: 50%; color: #fff !important; flex: none; }
.pf-ok .ic { background: var(--ok-dot); } .pf-warn .ic { background: var(--warn-dot); } .pf-err .ic { background: var(--err-dot); }
.pc-foot .pc-found .ic { width: auto; height: 14px; padding: 0; background: none; color: var(--muted) !important; }

/* ---------- alerts / banners ---------- */
.alert { border-radius: 18px; padding: 14px 18px; background: var(--surface); border: 0; }
.panel .alert, dialog .alert { background: var(--surface-3); }
.alert.err { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--err-dot) 35%, transparent); }

/* ---------- tables ---------- */
th { background: transparent !important; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--subtle); }
td { border-bottom: 1px solid var(--border); }
tr.click:hover td { background: var(--surface-2); }
.ptable, .utable { border-collapse: separate; }

/* ---------- lists, meta, dialogs, misc ---------- */
.meta > div { border-right-color: var(--border); }
dialog { border-radius: 26px; background: var(--surface); }
dialog::backdrop, :root:not([data-theme="light"]) dialog::backdrop { background: rgba(17, 20, 28, .45); backdrop-filter: blur(4px); }
.toast, :root:not([data-theme="light"]) .toast { background: var(--ink); color: var(--on-ink); border-radius: var(--pill); padding: 12px 20px; }
.toast .ic { color: #22c55e; }
.toast.err, :root:not([data-theme="light"]) .toast.err { background: #dc2626; color: #fff; }
.set-nav { background: var(--surface); border-radius: var(--r-lg); padding: 8px; }
.set-nav a { border-radius: 14px; }
.set-nav a.on, :root:not([data-theme="light"]) .set-nav a.on { background: var(--ink); color: var(--on-ink); }
.set-nav a.on .ic, .set-nav a.on small, :root:not([data-theme="light"]) .set-nav a.on .ic, :root:not([data-theme="light"]) .set-nav a.on small { color: var(--on-ink); opacity: .8; }
.pager { background: transparent !important; border-top: 1px solid var(--border); }
.pg.on { background: var(--ink); color: var(--on-ink); border-color: transparent; }
.terminal { border-radius: var(--r-lg); border: 0; }
.term-head { background: #151821; }
.auth-wrap, :root:not([data-theme="light"]) .auth-wrap { background: var(--bg); }
.auth-card { border-radius: 28px; box-shadow: none; background: var(--surface); }
.auth-card .btn.primary { height: 48px; }
.empty .empty-ic { background: var(--surface-3); border-radius: 16px; }
.acc-hero .avatar.av-xl { border-radius: 22px; }
.role-card, .perm-row, .pp-item, .theme-opt { border-color: transparent; background: var(--surface-2); }
.role-card.on, .perm-row.on, .pp-item.on, .theme-opt.on { background: var(--surface); box-shadow: inset 0 0 0 2px var(--sel-border); border-color: transparent; }
.cf-bar { background: var(--surface); }
.set-int, .set-u { border: 0; background: var(--surface-3); border-radius: 16px; }
.focus-bar { border-radius: var(--pill); background: var(--surface); }
.meter, .meter.m-ok, .meter.m-seq, :root:not([data-theme="light"]) .meter.m-ok { background: var(--surface-3); border-radius: var(--pill); }
.meter.m-ok i, :root:not([data-theme="light"]) .meter.m-ok i { background: var(--accent); }
.chart-plot .line.s1 { stroke: var(--series-1); }
.float-tip { border-radius: 18px; box-shadow: var(--shadow-xl); }
.score { border-width: 5px; }

@media (max-width: 900px) {
  .sidebar { padding-left: 14px; }
  main { padding: 20px 16px 56px; }
  h1 { font-size: 26px; }
  .panel { padding: 18px; border-radius: 20px; }
  .stat { padding: 16px; }
  .stat-v { font-size: 24px; }
}
/* Manrope's space glyph is narrow (≈0.19em): open it up for UI text, keep mono untouched */
body { word-spacing: .09em; }
.mono, code, pre, .sha, .num, kbd, .secret-box, .log, td.mono, .stat-v, .score-v, .code-input, textarea, .pc-kv .st > span { word-spacing: 0; }
:root:not([data-theme="light"]) { --series-1: #7c7ff7; --series-2: #d95926; --series-3: #199e70; }
.stats:has(.stat.col) { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; gap: 16px; }
.stat.col .stat-v { font-size: 26px; }
.stat.col .stat-v-sm, .stat-v-sm { font-size: 17px; line-height: 1.3; }
.stat.col { padding: 18px 20px; }
textarea { font: 500 14px/1.55 var(--font); }
textarea[spellcheck="false"], textarea.mono, #inv-text { font: 13px/1.6 var(--mono); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2386837b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
:root:not([data-theme="light"]) select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238b909b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; }
.auth-brand .sb-title { color: var(--text); font-size: 20px; }
.auth-brand img.logo, .auth-brand .logo { width: 56px; height: 56px; border-radius: 18px; }

/* ---------- checkboxes & radios: custom, match the pill / ink language ---------- */
input[type=checkbox], input[type=radio] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  width: 18px; height: 18px; display: inline-grid; place-content: center; vertical-align: -4px;
  background: var(--input); box-shadow: inset 0 0 0 1.5px var(--border-strong);
  transition: background-color .12s, box-shadow .12s;
}
input[type=checkbox] { border-radius: 6px; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]::after {
  content: ''; width: 11px; height: 11px; background: var(--on-ink); transform: scale(0); transition: transform .12s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
input[type=radio]::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--on-ink); transform: scale(0); transition: transform .12s; }
input[type=checkbox]:checked, input[type=radio]:checked { background: var(--ink); box-shadow: none; }
input[type=checkbox]:checked::after, input[type=radio]:checked::after { transform: scale(1); }
input[type=checkbox]:hover:not(:disabled):not(:checked), input[type=radio]:hover:not(:disabled):not(:checked) { box-shadow: inset 0 0 0 1.5px var(--muted); }
input[type=checkbox]:focus, input[type=radio]:focus { outline: none; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .45; cursor: not-allowed; }
label.check { align-items: center; gap: 10px; font-weight: 500; color: var(--text-2); }
label.check input { margin-top: 0; }
label.check:has(> span > .muted), label.check:has(br) { align-items: flex-start; }
label.check:has(> span > .muted) input { margin-top: 2px; }
.pc-kv input[type=checkbox], .ptable input[type=checkbox] { vertical-align: middle; }
/* the repo picker: borderless list inside the card */
.repo-list { border: 0; border-radius: 18px; background: var(--surface-2); }
.repo-item { background: transparent; border-top-color: var(--border); }
.repo-item:hover { background: var(--surface-3); }
.repo-item.on { background: var(--surface); box-shadow: inset 0 0 0 2px var(--sel-border); }
.step-num { background: var(--ink); color: var(--on-ink); }
label.check { align-items: flex-start; }
label.check input[type=checkbox], label.check input[type=radio] { margin-top: max(0px, calc((1lh - 18px) / 2)); }

/* ---------- sweep fixes: remaining pages ---------- */
/* badges next to a page title must not inherit the title's tight tracking */
h1 .badge { letter-spacing: 0; font-size: 12px; font-weight: 600; }
/* section titles with a long muted tail ("— Tenglashtirish: 2, …") wrap as a sentence, not a column */
h2 { flex-wrap: wrap; row-gap: 2px; }
h2 .u-fw4 { font-size: 13.5px; }
/* worded stat values */
.stat-v.stat-txt { font: 700 19px/1.3 var(--font); letter-spacing: -.01em; word-spacing: .09em; }
/* meters without a severity class still show their fill */
.meter i { background: var(--accent); }
/* danger buttons: pill fill + red text, no outline ring */
.btn.danger { background: var(--surface); box-shadow: none; border-color: transparent; color: var(--err); }
.panel .btn.danger, dialog .btn.danger { background: var(--surface-3); }
.btn.danger:hover, .panel .btn.danger:hover, dialog .btn.danger:hover { background: var(--err-dot); color: #fff; }
.btn.ghost.danger, .panel .btn.ghost.danger { background: transparent; color: var(--muted); }
.btn.ghost.danger:hover, .panel .btn.ghost.danger:hover { background: var(--surface-3); color: var(--err); }
/* weekday toggles: plain pills, ink when chosen (the checkbox itself stays hidden) */
.daychip input[type=checkbox] { display: none; }
.daychip, .daychip.on { border: 0; border-radius: var(--pill); height: 28px; min-width: 34px; margin-right: 4px; padding: 0 9px; background: var(--surface-3); color: var(--muted); font-weight: 600; transition: background-color .12s, color .12s; }
.daychip:hover { color: var(--text); }
.daychip.on { background: var(--ink); color: var(--on-ink); }
/* role cards: the radio is only the state carrier */
.role-card input[type=radio], .role-card input[type=checkbox] { position: absolute; opacity: 0 !important; pointer-events: none; }
.role-card.on .rc-ic { background: var(--ink); color: var(--on-ink); }
/* a checkbox label that holds a select lines up on the control's centre */
label.check:has(select) { align-items: center; }
label.check:has(select) input[type=checkbox] { margin-top: 0; }
/* banners are borderless in every tone (the tone rules above carry more specificity) */
.alert, .alert.ok, .alert.warn, .alert.info, .guide-box, .focus-bar { border: 0; }
.alert.err { border: 0; }
/* four tiles in a half-width column: a 2 × 2 block instead of 3 + an orphan */
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.role-card.on small, .role-card small { color: var(--muted); }

/* ---------- sidebar menu: active item is a tab fused into the canvas, with concave (inverted) corners ---------- */
#nav a, :root:not([data-theme="light"]) #nav a { margin: 2px 18px 2px 0; border-radius: var(--pill); transition: background-color .15s ease, color .15s ease; }
#nav a:hover { background: var(--rail-2); color: #fff; }
#nav a:hover .ic { color: #fff; }
#nav a.active, :root:not([data-theme="light"]) #nav a.active, #nav a.active:hover { position: relative; margin-right: 0; border-radius: var(--pill) 0 0 var(--pill); background: var(--bg); color: var(--text); font-weight: 700; }
#nav a.active .ic, #nav a.active:hover .ic, :root:not([data-theme="light"]) #nav a.active .ic { color: var(--accent); }
#nav a.active::before, #nav a.active::after { content: ''; position: absolute; right: 0; width: 22px; height: 22px; pointer-events: none; }
#nav a.active::before { top: -22px; background: radial-gradient(circle at 0 0, transparent 21.5px, var(--bg) 22px); }
#nav a.active::after { bottom: -22px; background: radial-gradient(circle at 0 100%, transparent 21.5px, var(--bg) 22px); }
#nav a:focus-visible { outline: 1px solid rgba(255, 255, 255, .7); outline-offset: 2px; }

/* ---------- new project wizard ---------- */
.wz-steps { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; overflow-x: auto; scrollbar-width: none; }
.wz-step { display: inline-flex; align-items: center; gap: 10px; flex: none; border: 0; background: var(--surface); color: var(--muted); height: 44px; padding: 0 18px 0 6px; border-radius: var(--pill); font: 700 13.5px var(--font); cursor: pointer; transition: background-color .15s, color .15s; }
.wz-step:disabled { cursor: default; opacity: .55; }
.wz-step:not(:disabled):not(.on):hover { color: var(--text); background: var(--surface-2); }
.wz-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font: 700 13px var(--mono); }
.wz-n .ic { width: 15px; height: 15px; }
.wz-step.done { color: var(--text); }
.wz-step.done .wz-n { background: var(--ink); color: var(--on-ink); }
.wz-step.on { background: var(--ink); color: var(--on-ink); }
.wz-step.on .wz-n { background: var(--on-ink); color: var(--ink); }
.wz-line { flex: 1 0 16px; min-width: 16px; height: 2px; border-radius: 2px; background: var(--border-strong); }
.wz-cols { grid-template-columns: minmax(0, 1fr) 380px; }
.wz-panel { padding: 28px 30px; }
.wz-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.wz-head .step-num { width: 36px; height: 36px; font-size: 15px; flex: none; }
.wz-head h2 { margin: 0 0 2px; font-size: 20px; }
.wz-foot { display: flex; align-items: center; gap: 12px; margin: -4px 0 24px; padding: 0 4px; }
.wz-foot .btn.primary { min-width: 140px; justify-content: center; }
.wz-sub { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--border); }
.wz-head + .wz-sub, .wz-recbar + .wz-sub, .wz-recbar + .field-hint + .wz-sub { border-top: 0; margin-top: 14px; padding-top: 0; }
.wz-sub h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); }
.wz-sub h3 .ic { width: 15px; height: 15px; }
.wz-field { padding: 14px 0; }
.wz-field + .wz-field { border-top: 1px dashed var(--border); }
.wz-fl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.wz-fl b { font-size: 14px; }
.wz-why { margin-top: 8px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.wz-why b { color: var(--text-2); font-weight: 600; }
.rec { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border: 0; border-radius: var(--pill); background: var(--surface-3); color: var(--text-2); font: 700 11.5px var(--font); cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s; }
.rec .ic { width: 12px; height: 12px; color: var(--accent); }
button.rec:hover { background: var(--ink); color: var(--on-ink); }
button.rec:hover .ic { color: inherit; }
.rec.ok { cursor: default; background: transparent; color: var(--ok); padding: 0 2px; }
.rec.ok .ic { color: inherit; }
.seg > button { border: 0; background: transparent; color: var(--muted); height: 32px; padding: 0 14px; border-radius: var(--pill); cursor: pointer; font: 700 12.5px var(--font); transition: background-color .12s, color .12s; }
.seg > button:hover { color: var(--text); }
.seg > button.on { background: var(--ink); color: var(--on-ink); }
.wz-recbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-radius: 18px; background: var(--surface-3); font-size: 13px; color: var(--text-2); }
.wz-recbar .ic { color: var(--ok); vertical-align: -3px; }
.wz-recbar .btn .ic { color: inherit; }
.wz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.wz-card { position: relative; text-align: left; border: 0; padding: 14px 16px; border-radius: 18px; background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; transition: background-color .15s; }
.wz-card:hover { background: var(--surface-3); }
.wz-card b { font-size: 15px; margin-right: 6px; }
.wz-card small { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.wz-card.bad small:first-of-type { color: var(--err); }
.wz-card.on { background: var(--ink); color: var(--on-ink); }
.wz-card.on small, .wz-card.on.bad small:first-of-type { color: var(--on-ink); opacity: .75; }
.wz-card.on .rec.ok { color: var(--on-ink); }
.wz-repo { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--surface-3); }
.wz-repo-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.wz-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.wz-type { display: flex; align-items: center; gap: 6px; height: var(--ctl); }
.wz-facts { grid-template-columns: max-content 1fr max-content 1fr; font-size: 13px; gap: 10px 20px; }
.wz-dnsrec { margin: 14px 0 4px; padding: 14px 16px; border-radius: 18px; background: var(--surface-3); font-size: 12.5px; color: var(--muted); }
.wz-rec-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; color: var(--text); font-size: 13px; }
.wz-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wz-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.wz-checks li > .ic { flex: none; margin-top: 2px; }
.wz-checks li.ok > .ic { color: var(--ok-dot); } .wz-checks li.warn > .ic { color: var(--warn-dot); } .wz-checks li.err > .ic { color: var(--err-dot); }
.wz-inline { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin: 4px 0 8px; padding: 14px 16px; border-radius: 18px; background: var(--surface-2); }
.wz-inline label { margin-top: 0; }
.wz-inline input[type=number] { width: 110px; }
.wz-envbar .search { max-width: none; }
.wz-env { border-radius: 18px; background: var(--surface-2); max-height: 460px; overflow: auto; }
.wz-env-row { display: grid; grid-template-columns: minmax(140px, 36%) minmax(0, 1fr) 32px; gap: 10px; align-items: center; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--border); }
.wz-env-row:last-child { border-bottom: 0; }
.wz-env-k { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-env-v { height: 34px; font: 13px var(--mono); }
.wz-env-row.auto .wz-env-k { color: var(--muted); }
.wz-env-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.wz-env-row.miss .wz-env-k::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--warn-dot); vertical-align: 2px; }
.wz-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.wz-members .pp-item { border: 0; border-radius: 16px; padding: 10px 12px; }
.wz-members .pp-item input { display: none; }
.wz-members .pp-item.on { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.wz-members .pp-item.on b, .wz-members .pp-item.on small { color: var(--on-ink); }
.wz-members .pp-item.on small { opacity: .75; }
.wz-sums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.wz-sum { padding: 16px 18px; border-radius: 18px; background: var(--surface-2); }
.wz-sum-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wz-sum-h b { font-size: 14px; }
.wz-advice { display: grid; gap: 4px; }
.wz-note { display: flex; gap: 10px; padding: 10px 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); border-top: 1px solid var(--border); }
.wz-advice h2 + .wz-note { border-top: 0; padding-top: 0; }
.wz-note > .ic { flex: none; margin-top: 2px; }
.wz-note b { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }
.wz-note.ok > .ic { color: var(--ok-dot); } .wz-note.warn > .ic { color: var(--warn-dot); } .wz-note.err > .ic { color: var(--err-dot); } .wz-note.info > .ic { color: var(--info-dot); }
.wz-draftbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.wz-dlg { width: min(560px, calc(100vw - 32px)); padding: 24px; }
.wz-plist { display: grid; gap: 4px; max-height: 50vh; overflow: auto; margin-top: 12px; }
.wz-pitem { display: flex; align-items: center; gap: 12px; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 14px; cursor: pointer; font: inherit; color: var(--text); }
.wz-pitem:hover { background: var(--surface-3); }
.wz-pitem b { display: block; font-size: 13.5px; }
.wz-pitem small { display: block; font-size: 11.5px; color: var(--muted); }
@media (max-width: 1100px) { .wz-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .wz-step .wz-t { display: none; } .wz-step { padding: 0 6px; } .wz-step.on .wz-t { display: inline; } .wz-step.on { padding-right: 16px; }
  .wz-panel { padding: 20px 18px; }
  .wz-grid2, .wz-sums { grid-template-columns: minmax(0, 1fr); }
  .wz-facts { grid-template-columns: max-content 1fr; }
  .wz-env-row { grid-template-columns: minmax(0, 1fr) 32px; } .wz-env-row > :nth-child(2) { grid-column: 1; grid-row: 2; }
}
.wz-members > .field-hint { grid-column: 1 / -1; }
@media (max-width: 700px) { .wz-recbar > .grow { flex-basis: 100%; } .wz-foot .btn.primary { min-width: 0; } }
/* wizard: SSL upload */
.wz-drop { position: relative; display: grid; justify-items: center; gap: 6px; padding: 26px 18px; border-radius: 18px; background: var(--surface-2); border: 1.5px dashed var(--border-strong); text-align: center; cursor: pointer; font-weight: 400; transition: background-color .15s, border-color .15s; }
.wz-drop:hover, .wz-drop.over { background: var(--surface-3); border-color: var(--muted); }
.wz-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wz-drop > .ic { width: 22px; height: 22px; color: var(--accent); }
.wz-drop b { font-size: 13.5px; color: var(--text); }
.wz-drop small { max-width: 520px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.wz-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wz-file { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 4px 0 12px; border-radius: var(--pill); background: var(--surface-3); font-size: 12.5px; }
.wz-file .icon-btn { width: 26px; height: 26px; }
.wz-sslres { margin-top: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface-2); }
.wz-sslres .wz-facts { grid-template-columns: max-content 1fr; }
.wz-sub .seg { max-width: 100%; }

/* ---------- select dropdown (replaces the OS list) ---------- */
.dsel-pop { position: fixed; z-index: 1000; display: flex; flex-direction: column; min-width: 180px; max-width: min(460px, calc(100vw - 16px)); padding: 6px; border-radius: 18px; background: var(--surface); box-shadow: 0 18px 50px -12px rgba(20, 22, 28, .28), 0 0 0 1px var(--border); animation: dsel-in .12s ease-out; transform-origin: top center; }
.dsel-pop.up { transform-origin: bottom center; }
@keyframes dsel-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.dsel-pop.up { animation-name: dsel-in-up; }
@keyframes dsel-in-up { from { opacity: 0; transform: translateY(4px) scale(.98); } }
:root:not([data-theme="light"]) .dsel-pop { background: var(--surface-2, #1d2027); box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .6), 0 0 0 1px var(--border-strong); }
.dsel-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.dsel-opt { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 12px; border-radius: 12px; cursor: pointer; font: 500 14px/1.3 var(--font); color: var(--text); user-select: none; }
.dsel-opt.act { background: var(--surface-3); }
.dsel-opt[aria-selected="true"] { font-weight: 700; }
.dsel-opt .dsel-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsel-opt .ck { flex: none; color: var(--ink); visibility: hidden; }
.dsel-opt[aria-selected="true"] .ck { visibility: visible; }
.dsel-opt.dis { opacity: .45; cursor: default; }
.dsel-grp { padding: 10px 12px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--subtle); }
.dsel-grp:first-child { padding-top: 4px; }
.dsel-empty { padding: 12px; font-size: 13px; color: var(--muted); }
.dsel-ico { width: 20px; height: 20px; flex: none; border-radius: 5px; object-fit: contain; }
.dsel-mono { display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font: 700 11px var(--font); }
.dsel-opt.act .dsel-mono { background: var(--surface); }
.dsel-search { position: relative; margin: 0 0 6px; }
.dsel-search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.dsel-search input { width: 100%; height: 36px; padding-left: 36px; border-radius: 12px; background: var(--surface-2); border-color: transparent; }
select.dsel-open { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
select.dsel-withico { padding-left: 44px; background-image: var(--dsel-ico), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2386837b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-size: 20px 20px, 16px 16px; background-position: 14px center, right 12px center; background-repeat: no-repeat; }
:root:not([data-theme="light"]) select.dsel-withico { background-image: var(--dsel-ico), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238b909b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); }
/* checkbox + one-line label next to a button: centred, normal text size */
label.check.oneline { align-items: center; margin: 0; font-size: 13px; color: var(--text-2); }
label.check.oneline input[type=checkbox] { margin-top: 0; }
/* SSL panel on the project page */
.ssl-cur { padding: 14px 16px; border-radius: 18px; background: var(--surface-2); }
.ssl-cur + .ssl-cur { margin-top: 10px; }
.ssl-cur-h { display: flex; align-items: center; gap: 12px; }
.ssl-cur-h .dsel-ico { width: 28px; height: 28px; border-radius: 8px; }
.ssl-cur-h b { display: block; font-size: 14px; }
.ssl-cur-h small { display: block; font-size: 12px; color: var(--muted); }
.ssl-cur .kv { grid-template-columns: max-content minmax(0, 1fr); }
.ssl-dlg { width: min(640px, calc(100vw - 32px)); }

/* ---------- code editor: VS Code Dark+ ---------- */
.vsc { --vsc-bg: #1e1e1e; --vsc-bar: #252526; --vsc-fg: #d4d4d4; --vsc-dim: #858585; --vsc-blue: #007acc;
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--vsc-bg); color: var(--vsc-fg);
  box-shadow: 0 0 0 1px #2b2b2b; font: 13px/1.4 var(--font); word-spacing: 0; text-align: left; }
.vsc-tabs { display: flex; align-items: stretch; height: 36px; background: var(--vsc-bar); }
.vsc-tab { display: flex; align-items: center; gap: 7px; padding: 0 16px 0 12px; background: var(--vsc-bg); color: #fff; font-size: 13px; border-top: 1px solid var(--vsc-blue); max-width: 60%; }
.vsc-fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vsc-fi .ic { width: 14px; height: 14px; display: block; }
.vsc-fi-dotenv { color: #e2c08d; } .vsc-fi-pem { color: #cbcb41; } .vsc-fi-ini, .vsc-fi-plain { color: #6d8086; }
.vsc-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; margin-left: 4px; flex: none; }
.vsc.dirty .vsc-dot { background: #fff; }
.vsc-acts { display: flex; align-items: center; gap: 2px; padding: 0 8px; }
.vsc-ab { width: 28px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #c5c5c5; cursor: pointer; font: 600 14px var(--font); }
.vsc-ab:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.vsc-ab .ic { width: 15px; height: 15px; }
.vsc.wrap .vsc-ab[data-a="wrap"] { background: rgba(255, 255, 255, .12); color: #fff; }
.vsc-bread { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 16px; background: var(--vsc-bg); color: #a9a9a9; font-size: 12.5px; border-bottom: 1px solid #2b2b2b; overflow: hidden; white-space: nowrap; }
.vsc-bread i { font-style: normal; color: #6b6b6b; }
.vsc-bread span:last-child { color: #cccccc; }
.vsc-body { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); height: var(--vsc-h, 420px); min-height: 120px; overflow: hidden; }
.vsc-gut { position: relative; overflow: hidden; padding: 8px 0; user-select: none; background: var(--vsc-bg); }
.vsc-lns { will-change: transform; }
.vsc-lns div { height: 20px; padding: 0 14px 0 18px; font: 13px/20px var(--mono); color: var(--vsc-dim); text-align: right; min-width: 3ch; font-variant-numeric: tabular-nums; }
.vsc-lns div.on { color: #c6c6c6; }
.vsc-lns div.m-err { color: #f14c4c; } .vsc-lns div.m-warn { color: #cca700; }
.vsc-ed { position: relative; overflow: hidden; }
.vsc-cur { position: absolute; left: 0; right: 0; top: 8px; height: 20px; border: 2px solid #282828; pointer-events: none; will-change: transform; }
.vsc-ta:not(:focus) ~ .vsc-cur, .vsc-ed:not(:focus-within) .vsc-cur { border-color: transparent; }
.vsc .vsc-hl, .vsc .vsc-ta { position: absolute; top: 0; left: 0; margin: 0; padding: 8px 24px 8px 6px; border: 0; font: 13.5px/20px var(--mono); letter-spacing: 0; word-spacing: 0; tab-size: 2;
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; white-space: pre; overflow-wrap: normal; text-rendering: optimizeSpeed; }
.vsc .vsc-hl { color: var(--vsc-fg); min-width: 100%; pointer-events: none; will-change: transform; }
.vsc .vsc-ta { width: 100%; height: 100%; z-index: 1; resize: none; outline: none; box-shadow: none !important; border-radius: 0; background: transparent !important; color: transparent; caret-color: #aeafad; overflow: auto; scrollbar-color: #424242 transparent; }
.vsc .vsc-ta:focus { border: 0; box-shadow: none; }
.vsc .vsc-ta::selection { background: rgba(38, 79, 120, .72); color: transparent; }
.vsc .vsc-ta::placeholder { color: #5a5a5a; }
.vsc.wrap .vsc-hl, .vsc.wrap .vsc-ta, .vsc.wrap .vsc-ed .vsc-ta { white-space: pre-wrap; overflow-wrap: anywhere; }
.vsc.wrap .vsc-hl { width: 100%; }
.vsc.wrap .vsc-lns, .vsc.wrap .vsc-cur { visibility: hidden; }
.vsc.ro .vsc-ta { cursor: default; }
/* Dark+ tokens */
.vsc .t-key { color: #9cdcfe; } .vsc .t-op { color: #d4d4d4; } .vsc .t-str, .vsc .t-val { color: #ce9178; } .vsc .t-num { color: #b5cea8; }
.vsc .t-kw { color: #569cd6; } .vsc .t-cm { color: #6a9955; } .vsc .t-var { color: #4fc1ff; } .vsc .t-exp { color: #c586c0; }
.vsc .t-mask { color: #7f7f7f; } .vsc .t-bad { color: #f48771; } .vsc .t-b64 { color: #ce9178; opacity: .8; }
.vsc .sq-err { text-decoration: underline wavy #f14c4c; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.vsc .sq-warn { text-decoration: underline wavy #cca700; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.vsc mark { background: rgba(234, 92, 0, .33); color: inherit; border-radius: 2px; box-shadow: 0 0 0 1px rgba(234, 92, 0, .55); }
.vsc mark.cur { background: rgba(255, 190, 0, .5); }
/* find widget */
.vsc-find { position: absolute; top: 0; right: 18px; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 5px 6px; background: var(--vsc-bar); box-shadow: 0 2px 8px rgba(0, 0, 0, .55); border-radius: 0 0 6px 6px; }
.vsc-find input { width: 210px; height: 26px !important; padding: 0 8px !important; border-radius: 3px !important; border: 1px solid #3c3c3c !important; background: #3c3c3c !important; color: #cccccc; font: 13px var(--font) !important; box-shadow: none !important; }
.vsc-find input:focus { border-color: #007fd4 !important; }
.vsc-fc { min-width: 70px; font-size: 12px; color: #cccccc; text-align: center; white-space: nowrap; }
.vsc-fc.none { color: #f48771; }
.vsc-find button { width: 24px; height: 24px; border: 0; border-radius: 4px; background: transparent; color: #c5c5c5; cursor: pointer; font: 600 13px var(--font); }
.vsc-find button:hover { background: rgba(255, 255, 255, .1); }
/* problems + status bar */
.vsc-probs { max-height: 150px; overflow: auto; background: var(--vsc-bg); border-top: 1px solid #2b2b2b; padding: 4px 0; }
.vsc-probs button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; color: #cccccc; font: 12.5px var(--font); padding: 4px 16px; text-align: left; cursor: pointer; }
.vsc-probs button:hover { background: #2a2d2e; }
.vsc-probs .err { color: #f14c4c; } .vsc-probs .warn { color: #cca700; }
.vsc-probs small { color: var(--vsc-dim); margin-left: auto; }
.vsc-none { padding: 6px 16px; color: var(--vsc-dim); font-size: 12.5px; }
.vsc-status { display: flex; align-items: center; height: 24px; background: var(--vsc-blue); color: #fff; font-size: 12px; }
.vsc-sb { display: inline-flex; align-items: center; height: 100%; padding: 0 9px; border: 0; background: transparent; color: inherit; font: inherit; white-space: nowrap; }
button.vsc-sb { cursor: pointer; }
button.vsc-sb:hover { background: rgba(255, 255, 255, .12); }
/* side-by-side diff */
.vsc-diff { margin: 12px 0 4px; }
.vsc-dcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-height: 60vh; overflow: auto; font: 13px/20px var(--mono); }
.vsc-dcol + .vsc-dcol { border-left: 1px solid #2b2b2b; }
.vsc-dcol > div { display: flex; min-height: 20px; white-space: pre; }
.vsc-dcol .n { flex: none; width: 46px; padding-right: 12px; text-align: right; color: var(--vsc-dim); user-select: none; }
.vsc-dcol .c { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
.vsc-dcol .del { background: rgba(255, 0, 0, .16); } .vsc-dcol .del .n { color: #f14c4c; }
.vsc-dcol .add { background: rgba(155, 185, 85, .2); } .vsc-dcol .add .n { color: #89d185; }
.vsc-dcol .gap { background: repeating-linear-gradient(-45deg, #1e1e1e 0 5px, #252526 5px 10px); }
dialog#modal.modal-wide { width: min(1100px, calc(100vw - 32px)); max-width: none; }
.env-cols { grid-template-columns: minmax(0, 1fr) 320px; }
.kbd-hints kbd { display: inline-block; padding: 0 5px; border-radius: 5px; background: var(--surface-3); font: 600 11px/18px var(--mono); color: var(--text-2); }
.cf-code .vsc { margin-top: 2px; }
@media (max-width: 1100px) { .env-cols { grid-template-columns: minmax(0, 1fr); } }
.vsc { container-type: inline-size; }
.vsc-pc { gap: 4px; }
.vsc-pc .ic { width: 13px; height: 13px; }
.vsc-pc .ic + .ic, .vsc-pc .ic:nth-of-type(2) { margin-left: 6px; }
.vsc-probs span .ic { width: 14px; height: 14px; display: block; }
@container (max-width: 460px) { .vsc-sb.opt { display: none; } .vsc-bread { display: none; } }

/* ---------- project "Boshqaruv" tab ---------- */
.mng-layout .set-nav { position: sticky; top: 20px; }
.mng-main > .panel + .panel, .mng-main > .panel.flush + .panel { margin-top: 16px; }
.mng-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mng-big { font: 800 26px/1.1 var(--font); letter-spacing: -.02em; }
.mng-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mng-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.mng-stats > div { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); }
.mng-stats span { display: block; font-size: 11.5px; color: var(--muted); }
.mng-stats b { display: block; font-size: 17px; margin-top: 2px; }
.mng-stats small { display: block; font-size: 11.5px; color: var(--muted); }
.mng-prog { padding: 14px 20px; border-top: 1px solid var(--border); }
.mng-prog-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mng-cmd { margin-top: 6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.mng-cron { margin-top: 10px; display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.panel-body { padding: 16px 20px; }
@media (max-width: 900px) { .mng-layout .set-nav { position: static; } }
.mng-dom { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-top: 1px solid var(--border); }
.mng-hdrs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 20px; }
.mng-hdrs label.check { align-items: flex-start; }
.u-mb8 { margin-bottom: 8px; }
.mng-main .row > input:not(.grow):not([type=checkbox]) { width: auto; flex: 1 1 180px; }
.mng-del { padding: 12px 16px; border-radius: 16px; background: var(--surface-2); font-size: 13px; }
.mng-del ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.mng-dopts { display: grid; gap: 10px; margin: 14px 0 4px; }
.mng-danger h2.t-err .ic { color: var(--err); }
/* "GitHub · hozirgina" next to the page actions: same height and shape as the buttons beside it */
.sync-at { display: inline-flex; align-items: center; gap: 7px; height: var(--ctl); padding: 0 14px; border-radius: var(--pill); background: var(--surface-3); color: var(--muted); font-size: 13px; white-space: nowrap; }
.sync-at .ic { width: 15px; height: 15px; }
.sync-at b { color: var(--text-2); font-weight: 600; }
.sync-at.hidden { display: none; }
.ph-actions { align-items: center; }
/* photo avatars: the picture takes the frame's own shape (circle or the account page's rounded square), no tinted ring */
.avatar.has-img, .av.has-img { border: 0; }
.avatar img, .av img { border-radius: inherit; }

/* ---------- "Server" page ---------- */
.srv-vers { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.srv-ver { padding: 16px 18px; border-radius: 18px; background: var(--surface-2); cursor: pointer; transition: background-color .15s; }
.srv-ver:hover { background: var(--surface-3); }
.srv-ver.on { box-shadow: inset 0 0 0 2px var(--sel-border); background: var(--surface); }
.srv-ver-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.srv-ver-h b { font-size: 18px; }
.srv-ver-s { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.srv-ver-u { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.srv-inst { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.srv-tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.srv-ini { display: grid; gap: 2px; }
.srv-ini-r { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.srv-ini-r:last-child { border-bottom: 0; }
.srv-calc { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); font-size: 13px; line-height: 1.5; color: var(--text-2); }
.srv-calc > .ic { color: var(--accent); flex: none; margin-top: 2px; }
.srv-mods td { vertical-align: middle; }
@media (max-width: 700px) { .srv-ini-r { grid-template-columns: minmax(0, 1fr); } }
.srv-verin { width: 130px !important; }
.srv-desc { max-width: 300px; }
.srv-acts { display: flex; gap: 2px; justify-content: flex-end; align-items: center; }
.srv-acts .icon-btn.danger:hover { color: var(--err); }
.srv-small { font-size: 12px !important; }

/* job console modal (Muammolar → tuzatish) */
dialog#modal.modal-job .jm-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
dialog#modal.modal-job .jm-head h2 { margin: 0; }
dialog#modal.modal-job .jm-sub { margin: 6px 0 14px; }
dialog#modal.modal-job .log { max-height: 52vh; min-height: 280px; }
dialog#modal.modal-job .modal-actions { justify-content: space-between; }
