/* CreemHost billing — hand-written stylesheet (no framework, no CDN) */
:root {
  --ink: #14211b;
  --ink-2: #3d4b44;
  --ink-3: #6b7a72;
  --paper: #f6f4ef;
  --card: #ffffff;
  --line: #e3dfd6;
  --brand: #0f6b45;
  --brand-ink: #0a4a30;
  --brand-tint: #e6f2ec;
  --accent: #d98a1f;
  --danger: #b4332b;
  --danger-tint: #fbeceb;
  --ok: #1f7a4d;
  --line-soft: #f0ede6;
  --hover: #faf9f5;
  --chip: #eeece6;
  --warn-bg: #fdf1df;
  --warn-ink: #94600f;
  --warn-line: #ecc58a;
  --warn-tint: #fffaf1;
  --danger-line: #f1c9c6;
  --ok-line: #c4e0d1;
  --brand-tint-2: #d3e8dd;
  --side-bg: #ffffff;
  --side-border: #e3dfd6;
  --side-ink: #3d4b44;
  --side-mark: #14211b;
  --side-muted: #8a978f;
  --side-dim: #a9b3ad;
  --side-line: #e3dfd6;
  --side-hover: #f3f1ec;
  --side-active-bg: #fbf1e3;
  --side-active-ink: #14211b;
  --shell-bg: #0a4a30;
  --shadow: rgba(20,33,27,.12);
  --input-bg: #ffffff;
  color-scheme: light;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.55 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--ink-3); }
.small { font-size: .86rem; }

/* ---------- Auth / installer shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 38%) 1fr; }
.shell-side { background: var(--shell-bg); color: #e9f1ec; padding: 48px 44px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.shell-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; border: 56px solid rgba(255,255,255,.05); }
.shell-side .mark { font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.shell-side .mark span { color: var(--accent); }
.shell-side h2 { font-size: 1.9rem; font-weight: 600; max-width: 14ch; color: #fff; }
.shell-side p { color: #b9cdc2; max-width: 36ch; }
.shell-side .version { opacity: .6; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mb-0 { margin-bottom: 0; }
.actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 8px; }
.shell-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.panel { width: 100%; max-width: 440px; }
.panel.wide { max-width: 620px; }
.steps { display: flex; gap: 6px; margin-bottom: 28px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--brand); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--ink-2); }
.field .hint { font-size: .8rem; color: var(--ink-3); margin-top: 4px; }
.row-2 { display: grid; grid-template-columns: 1fr 120px; gap: 12px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=search], input[type=datetime-local], input[type=number], input[type=time], input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--input-bg);
  border: 1px solid var(--line); border-radius: 8px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
input.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .4em; text-align: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 8px;
  border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; background: var(--brand); color: #fff; }
.btn:hover { background: var(--brand-ink); text-decoration: none; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn.ghost:hover { background: var(--card); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 18px; font-size: .92rem; }
.alert.error { background: var(--danger-tint); color: var(--danger); border: 1px solid var(--danger-line); }
.alert.ok { background: var(--brand-tint); color: var(--brand-ink); border: 1px solid var(--ok-line); }
.alert ul { margin: 0; padding-left: 18px; }

.checklist { list-style: none; padding: 0; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.checklist li { display: flex; justify-content: space-between; padding: 9px 14px; border-top: 1px solid var(--line); font-size: .9rem; }
.checklist li:first-child { border-top: 0; }
.pill { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: .04em; }
.pill.ok { background: var(--brand-tint); color: var(--ok); }
.pill.no { background: var(--danger-tint); color: var(--danger); }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill.muted { background: var(--chip); color: var(--ink-3); }

/* ---------- Admin layout ---------- */
.admin { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--side-bg); color: var(--side-ink); border-right: 1px solid var(--side-border); padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .mark { color: var(--side-mark); font-weight: 700; padding: 0 10px 22px; display: block; }
.side .mark span { color: var(--accent); }
.side h6 { margin: 18px 10px 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--side-muted); }
.side a, .side .soon { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 7px; color: var(--side-ink); font-size: .92rem; }
.side a:hover { background: var(--side-hover); text-decoration: none; }
.side a.active { background: var(--side-active-bg); color: var(--side-active-ink); box-shadow: inset 2px 0 0 var(--accent); }
.side .soon { color: var(--side-dim); cursor: default; }
.side .soon em { font-style: normal; font-size: .68rem; border: 1px solid var(--side-line); padding: 0 6px; border-radius: 99px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 2; }
.topbar .who { display: flex; align-items: center; gap: 14px; font-size: .9rem; color: var(--ink-2); }
.topbar form { margin: 0; }
.content { padding: 28px; max-width: 1200px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 18px 0 28px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .label { font-size: .78rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.stat .value { font-size: 1.7rem; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: .85rem; color: var(--ink-3); font-weight: 500; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.card-body { padding: 18px; }
table.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.list th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; padding: 10px 18px; border-bottom: 1px solid var(--line); }
table.list td { padding: 10px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }

.qr-wrap { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; line-height: 0; }
.qr svg { width: 180px; height: 180px; }
.secret { font-family: var(--mono); background: var(--card); border: 1px dashed var(--line); padding: 8px 10px; border-radius: 6px; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-family: var(--mono); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }

details.alt { margin-top: 18px; font-size: .9rem; }
details.alt summary { cursor: pointer; color: var(--ink-3); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .shell-side { padding: 28px 24px; }
  .shell-side h2, .shell-side p { display: none; }
  .admin { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
}

/* ---------- Phase 2 step 2: lists, forms, badges ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--ink-3); font-size: .9rem; margin-top: 4px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.toolbar input, .toolbar select { width: auto; min-width: 160px; padding: 7px 10px; }
.btn.sm { padding: 6px 12px; font-size: .85rem; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #8f2620; }
.btn.light { background: var(--brand-tint); color: var(--brand-ink); }
.btn.light:hover { background: var(--brand-tint-2); }
.inline { display: inline; margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.stack > * + * { margin-top: 18px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px 6px; margin: 0 0 18px; background: var(--card); min-width: 0; }
/* the legend is the card's title inside the box (not cut into the border) */
legend { float: left; width: 100%; padding: 0 0 12px; margin: 0 0 16px; border-bottom: 1px solid var(--line-soft); font-weight: 700; font-size: 1rem; color: var(--ink); }
legend + * { clear: both; }
fieldset.checks legend { border-bottom: 0; padding-bottom: 0; margin-bottom: 8px; font-size: .85rem; font-weight: 600; color: var(--ink-3); }
fieldset.checks .check { display: flex; clear: both; }
.check { display: flex; gap: 8px; align-items: center; font-size: .92rem; margin-bottom: 14px; }
.check input { width: auto; }
.field .error { color: var(--danger); font-size: .8rem; margin-top: 4px; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list tfoot td { font-weight: 700; border-top: 1px solid var(--line); }
table.list tr.click:hover td { background: var(--hover); }
table.list input, table.list select { padding: 6px 8px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; text-transform: capitalize; background: var(--chip); color: var(--ink-2); }
.badge.active, .badge.paid, .badge.approved, .badge.online { background: var(--brand-tint); color: var(--ok); }
.badge.pending, .badge.unpaid, .badge.draft, .badge.on_hold { background: var(--warn-bg); color: var(--warn-ink); }
.badge.suspended, .badge.overdue, .badge.rejected, .badge.fraud, .badge.offline { background: var(--danger-tint); color: var(--danger); }
.badge.cancelled, .badge.terminated, .badge.closed, .badge.refunded, .badge.hidden, .badge.retired { background: var(--chip); color: var(--ink-3); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); }
.empty { padding: 28px 18px; text-align: center; color: var(--ink-3); }
.total-line { font-size: 1.3rem; font-weight: 700; }
.danger-zone { border-color: var(--danger-line); }
@media (max-width: 860px) { .grid-2, .grid-3, .grid-4, .split { grid-template-columns: 1fr; } }
details.inline-details { display: inline-block; position: relative; }
details.inline-details > summary { list-style: none; }
details.inline-details > summary::-webkit-details-marker { display: none; }
details.inline-details .pop { position: absolute; right: 0; top: 40px; z-index: 5; width: 300px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: 0 10px 30px var(--shadow); }
table.list td.error { color: var(--danger); font-weight: 600; }
/* sidebar colour runs the full page height */
.admin { background: linear-gradient(to right, var(--side-bg) 235px, var(--side-border) 235px 236px, transparent 236px); }
@media (max-width: 860px) { .admin { background: none; } }
/* ---------- Phase 2 step 3 ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 14px; color: var(--ink-3); font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.row-form { display: flex; gap: 6px; margin: 0; }
.row-form input { width: 130px; padding: 6px 8px; }
.row-form input[type=text] { width: 170px; }
.actions-cell { white-space: nowrap; }
.audit-json { max-width: 380px; word-break: break-all; color: var(--ink-3); }
.stat.attention { border-color: var(--warn-line); background: var(--warn-tint); }
.side .count { font-size: .7rem; background: var(--accent); color: #12201a; font-weight: 700; padding: 0 7px; border-radius: 99px; }
a.stat { color: inherit; } a.stat:hover { text-decoration: none; border-color: var(--brand); }
.error-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.error-code { font-size: 5rem; font-weight: 800; color: var(--brand); letter-spacing: -.04em; line-height: 1; margin-bottom: 12px; }

/* ================= Dark theme ================= */
/* data-theme="dark" (chosen by the user) or "auto" + OS dark mode */
:root[data-theme="dark"] {
  --ink: #e4ebe7; --ink-2: #b6c3bc; --ink-3: #85958c;
  --paper: #0e1512; --card: #151f1a; --line: #25322b; --line-soft: #1d2822;
  --hover: #1a2620; --chip: #222e28; --input-bg: #111a16;
  --brand: #37a874; --brand-ink: #2a8a5d; --brand-tint: #15301f; --brand-tint-2: #1c3d2a;
  --danger: #ef7a70; --danger-tint: #341c1a; --danger-line: #5a2a26;
  --ok: #58c792; --ok-line: #24503a;
  --warn-bg: #36290f; --warn-ink: #f0b964; --warn-line: #6b5020; --warn-tint: #1f1a0f;
  --side-bg: #0a100d; --shell-bg: #0c2419; --shadow: rgba(0,0,0,.45); --side-border: #1b2620; --side-ink: #c9d6cf; --side-mark: #ffffff; --side-muted: #6f8479; --side-dim: #5d7167; --side-line: #34463d; --side-hover: rgba(255,255,255,.06); --side-active-bg: rgba(217,138,31,.14); --side-active-ink: #ffffff;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --ink: #e4ebe7; --ink-2: #b6c3bc; --ink-3: #85958c;
    --paper: #0e1512; --card: #151f1a; --line: #25322b; --line-soft: #1d2822;
    --hover: #1a2620; --chip: #222e28; --input-bg: #111a16;
    --brand: #37a874; --brand-ink: #2a8a5d; --brand-tint: #15301f; --brand-tint-2: #1c3d2a;
    --danger: #ef7a70; --danger-tint: #341c1a; --danger-line: #5a2a26;
    --ok: #58c792; --ok-line: #24503a;
    --warn-bg: #36290f; --warn-ink: #f0b964; --warn-line: #6b5020; --warn-tint: #1f1a0f;
    --side-bg: #0a100d; --shell-bg: #0c2419; --shadow: rgba(0,0,0,.45); --side-border: #1b2620; --side-ink: #c9d6cf; --side-mark: #ffffff; --side-muted: #6f8479; --side-dim: #5d7167; --side-line: #34463d; --side-hover: rgba(255,255,255,.06); --side-active-bg: rgba(217,138,31,.14); --side-active-ink: #ffffff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] .btn, :root[data-theme="dark"] .btn:hover { color: #fff; }
:root[data-theme="dark"] .btn.ghost { color: var(--ink-2); }
:root[data-theme="dark"] .btn.light { color: var(--ok); }

/* ================= Icons ================= */
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }

/* Sidebar items: icon + label (+ badge) */
.side a, .side .soon { justify-content: flex-start; gap: 10px; }
.side a .lbl, .side .soon .lbl { flex: 1; }
.side a .icon, .side .soon .icon { opacity: .8; }
.side a.active .icon { opacity: 1; color: var(--accent); }
.side .mark { display: block; }

/* ================= Topbar actions ================= */
.topbar .tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; padding: 0; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.icon-btn.on { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.theme-toggle .when-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .when-dark { display: inline; }
:root[data-theme="dark"] .theme-toggle .when-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .theme-toggle .when-dark { display: inline; }
  :root[data-theme="auto"] .theme-toggle .when-light { display: none; }
}
.shell-theme { position: absolute; top: 18px; right: 18px; }
.shell-main { position: relative; }

/* Profile dropdown (<details>, works without JS) */
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu[open] > summary { border-color: var(--brand); color: var(--brand); }
.menu-pop { position: absolute; right: 0; top: 46px; z-index: 20; width: 250px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 14px 40px var(--shadow); padding: 6px; }
.menu-pop .who-box { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-pop .who-box strong { display: block; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 8px;
  color: var(--ink); background: none; border: 0; font: inherit; font-size: .92rem; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--hover); text-decoration: none; }
.menu-pop form { margin: 0; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.menu-pop .danger-item { color: var(--danger); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; font-size: .8rem; }

/* ================= Settings hub cards ================= */
.hub-hero { display: flex; gap: 18px; align-items: center; padding: 22px 24px; margin-bottom: 20px; }
.hub-hero .ico { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand); flex: none; }
.hub-hero h1 { margin: 0 0 4px; }
.hub-hero p { margin: 0; color: var(--ink-3); }
.hub-group { margin: 26px 0 10px; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 700; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.hub-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; color: inherit; position: relative; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.hub-card:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-1px); box-shadow: 0 8px 24px var(--shadow); }
.hub-card .ico { width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex: none; }
.hub-card h3 { margin: 0 0 4px; font-size: 1rem; padding-right: 64px; }
.hub-card p { margin: 0; font-size: .87rem; color: var(--ink-3); line-height: 1.45; }
.hub-card .state { position: absolute; top: 14px; right: 14px; }
.hub-card.disabled { opacity: .55; }
.ico.c-green { background: var(--brand-tint); color: var(--brand); }
.ico.c-amber { background: var(--warn-bg); color: var(--warn-ink); }
.ico.c-red { background: var(--danger-tint); color: var(--danger); }
.ico.c-blue { background: #e5eefb; color: #2f62b5; }
.ico.c-violet { background: #efe8fb; color: #6b45b8; }
.ico.c-slate { background: var(--chip); color: var(--ink-2); }
:root[data-theme="dark"] .ico.c-blue { background: #172338; color: #7aa7ec; }
:root[data-theme="dark"] .ico.c-violet { background: #231a36; color: #b39ae8; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .ico.c-blue { background: #172338; color: #7aa7ec; }
  :root[data-theme="auto"] .ico.c-violet { background: #231a36; color: #b39ae8; }
}

/* ================= Profile page ================= */
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.profile-head .avatar { width: 56px; height: 56px; font-size: 1.2rem; }

/* ================= Mobile responsive ================= */
.side-head { display: flex; align-items: center; justify-content: space-between; }
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-toggle, .nav-close, .nav-backdrop { display: none; }

@media (max-width: 900px) {
  .admin { display: block; background: none; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; width: 272px; height: 100%; z-index: 60;
    transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 0 40px var(--shadow); }
  body.nav-open .side { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(8, 14, 11, .45); z-index: 55; }
  body.nav-open .nav-backdrop { display: block; }
  .nav-toggle, .nav-close { display: inline-flex; }
  .side .mark { padding-bottom: 0; }
  .side-head { margin-bottom: 14px; }

  .topbar { padding: 10px 14px; gap: 8px; }
  .topbar .tools { gap: 6px; }
  .icon-btn { width: 36px; height: 36px; }
  .content { padding: 16px 14px 40px; }
  h1 { font-size: 1.3rem; }
  .page-head { align-items: flex-start; }
  .page-head > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0 20px; }
  .stat { padding: 12px 14px; }
  .stat .value { font-size: 1.35rem; }

  /* Tables scroll sideways inside their card — the page never overflows */
  table.list { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.list th, table.list td { white-space: nowrap; padding: 9px 12px; }
  table.list td.small, table.list td .small { white-space: normal; min-width: 140px; }

  .toolbar { padding: 10px 12px; }
  .toolbar input, .toolbar select { flex: 1 1 100%; min-width: 0; }
  .row-form { flex-wrap: wrap; }
  .row-form input, .row-form input[type=text] { width: 100%; }
  .kv { grid-template-columns: 110px 1fr; }
  .card-head, .card-body { padding-left: 14px; padding-right: 14px; }
  fieldset { padding: 14px 14px 2px; }
  .hub-hero { padding: 16px; gap: 12px; }
  .hub-hero .ico { width: 44px; height: 44px; }
  .hub-grid { grid-template-columns: 1fr; }
  .menu-pop { width: min(260px, calc(100vw - 24px)); }
  .qr-wrap { flex-direction: column; }
  .profile-head .avatar { width: 46px; height: 46px; }
  details.inline-details .pop { width: min(300px, calc(100vw - 32px)); }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat .label { font-size: .7rem; }
  .btn { padding: 9px 14px; }
}
/* Keep grid columns from stretching because of tables (mobile overflow fix) */
.split > *, .stack > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .hub-grid > * { min-width: 0; }
.tabs-in-card { padding: 0 14px; margin-bottom: 0; }
.device-row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.device-actions { display: flex; gap: 6px; }
.key-reveal { border-color: var(--warn-line); background: var(--warn-tint); margin-bottom: 18px; }
ol.howto { padding-left: 18px; margin: 8px 0; }
ol.howto li { margin-bottom: 4px; }

/* ---------- Client portal (Phase 5A) ---------- */
.imp-banner { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 18px; background: var(--accent); color: #1d1406; font-size: .9rem; }
.imp-banner .icon { width: 16px; height: 16px; vertical-align: -3px; }
.imp-banner form { margin: 0; }
.imp-banner .btn { background: #1d1406; color: #fff; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.auth-row .check { margin: 0; }
.auth-alt { margin: 18px 0 0; text-align: center; font-size: .92rem; color: var(--ink-3); }
.auth-alt .icon { width: 15px; height: 15px; vertical-align: -2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-card { max-width: 860px; }
.group-title { margin: 8px 0 12px; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 28px; }
.plan-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; }
.plan-card.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.plan-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.plan-card .btn { margin-top: auto; }
.plan-flag { position: absolute; top: -10px; right: 16px; background: var(--accent); color: #1d1406; font-size: .7rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: .05em; }
.plan-price { font-size: 1.6rem; font-weight: 700; margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: .85rem; color: var(--ink-3); font-weight: 500; }
.plan-feat { list-style: none; margin: 0 0 18px; padding: 0; font-size: .92rem; }
.plan-feat li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.plan-feat .icon { width: 16px; height: 16px; color: var(--brand); flex: none; margin-top: 3px; }
.cycle-pick { display: grid; gap: 8px; }
.cycle-opt { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 400; }
.cycle-opt input { width: auto; }
.cycle-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.cycle-opt em { font-style: normal; margin-left: 6px; }
.pay-method { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.pay-method summary { cursor: pointer; font-weight: 600; }
.pay-method .kv { margin-top: 8px; grid-template-columns: 120px 1fr; }
.pay-method .kv dd { word-break: break-all; }
.invoice-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.invoice-top > div:last-child { text-align: right; }
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; max-width: 92%; }
.msg.staff { align-self: flex-end; background: var(--brand-tint); border-color: var(--ok-line); }
.msg.note { background: var(--warn-tint); border-color: var(--warn-line); }
.msg-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.msg-head .small { margin-left: auto; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .94rem; }
.badge.open, .badge.customer_reply, .badge.prio-high { background: var(--warn-bg); color: var(--warn-ink); }
.badge.answered { background: var(--brand-tint); color: var(--ok); }
.badge.on_hold, .badge.prio-low, .badge.prio-medium { background: var(--chip); color: var(--ink-3); }
.badge.prio-high { background: var(--danger-tint); color: var(--danger); }
@media (max-width: 900px) {
  .imp-banner { padding: 8px 12px; font-size: .85rem; }
  .msg { max-width: 100%; }
  .invoice-top > div:last-child { text-align: left; }
  .plan-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  table.list th, table.list td { padding-left: 12px; padding-right: 12px; }
  .plan-res span { display: block; white-space: nowrap; }
}
.plan-res span + span::before { content: "· "; }
.plan-dc-sm { display: none; }
@media (max-width: 900px) { .plan-dc-sm { display: block; } }
@media (max-width: 900px) { .plan-res span + span::before { content: none; } }
@media print {
  .side, .topbar, .imp-banner, .no-print, .page-head .btn, .nav-backdrop, .alert { display: none !important; }
  .admin { display: block; background: none; }
  body { background: #fff; color: #000; }
  .content { padding: 0; }
  .split { display: block; }
  .card { border-color: #ccc; }
}

/* ---------- Servers (Phase 3) ---------- */
pre.cmd { margin: 0 0 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; font: .86rem/1.5 var(--mono);
  white-space: pre-wrap; word-break: break-all; user-select: all; }
pre.json { max-height: 320px; overflow: auto; margin: 6px 0 0; padding: 8px 10px; background: var(--hover); border-radius: 6px; font: .78rem/1.45 var(--mono); white-space: pre-wrap; word-break: break-word; }
.error-text { color: var(--danger); }
.inline-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin-bottom: 6px; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; }
.svc { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .88rem; }
meter { width: 70px; height: 8px; vertical-align: middle; }
meter::-webkit-meter-bar { background: var(--chip); border: 0; border-radius: 99px; height: 8px; }
meter::-webkit-meter-optimum-value { background: var(--brand); border-radius: 99px; }
meter::-webkit-meter-suboptimum-value { background: var(--accent); border-radius: 99px; }
meter::-webkit-meter-even-less-good-value { background: var(--danger); border-radius: 99px; }
meter::-moz-meter-bar { background: var(--brand); border-radius: 99px; }
.badge.sent, .badge.running, .badge.queued, .badge.maintenance { background: var(--warn-bg); color: var(--warn-ink); }
.badge.success { background: var(--brand-tint); color: var(--ok); }
.badge.failed, .badge.disabled { background: var(--danger-tint); color: var(--danger); }

/* Websites (Phase 4) */
.row-form.switch { justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row-form.switch:last-child { border-bottom: 0; }
.card-head .inline-buttons { justify-content: flex-end; }
.site-list td .muted { overflow-wrap: anywhere; }
.alert .inline { margin-left: 8px; }
@media (max-width: 600px) { .card-head { flex-wrap: wrap; gap: 8px; } .row-form.switch { flex-direction: column; align-items: flex-start; } }

/* Website move: progress bar + numbered list */
progress.bar { width: 100%; height: 10px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 6px; background: var(--line); overflow: hidden; }
progress.bar::-webkit-progress-bar { background: var(--line); border-radius: 6px; }
progress.bar::-webkit-progress-value { background: var(--brand); border-radius: 6px; }
progress.bar::-moz-progress-bar { background: var(--brand); border-radius: 6px; }
ol.plain-list.numbered { padding-left: 20px; }
/* New migration: two ways side by side */
.mig-methods { align-items: stretch; margin-bottom: 18px; }
@media (min-width: 861px) { .mig-methods { grid-template-columns: 1fr 1fr; } }
.mig-method .card-body { display: flex; flex-direction: column; }
.mig-method .actions { margin-top: auto; }
.mig-steps { list-style: none; counter-reset: mig; margin: 0 0 6px; padding: 0; }
.mig-steps > li { counter-increment: mig; position: relative; padding: 0 0 14px 38px; }
.mig-steps > li::before { content: counter(mig); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%;
    background: var(--brand-tint); color: var(--ok); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.mig-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--line); }
.mig-steps > li > span { display: block; margin-bottom: 8px; font-size: .9rem; }
.mig-steps .field { margin-bottom: 0; }
.mig-steps textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; word-break: break-all; }

/* ---------- Client dashboard: websites ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.alert.warn { background: var(--warn-tint); color: var(--warn-ink); border: 1px solid var(--warn-line); }
.warn-ink { color: var(--warn-ink); }
.due-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 20px; }
.site-toolbar .search-box { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: var(--input-bg); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.site-toolbar .search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.site-toolbar .search-box .icon { color: var(--ink-3); flex: none; }
.site-toolbar .search-box input { border: 0; box-shadow: none; padding: 10px 0; background: transparent; width: 100%; font: inherit; color: inherit; outline: none; }
.site-toolbar select { width: auto; padding: 9px 10px; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
.view-toggle a { display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink-3); }
.view-toggle a + a { border-left: 1px solid var(--line); }
.view-toggle a.on { background: var(--brand-tint); color: var(--brand); }
.view-toggle a:hover { text-decoration: none; color: var(--brand); }
.js .no-js-only { display: none; }

.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; margin-bottom: 28px; }
.site-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.site-card:hover { border-color: var(--brand-tint-2); box-shadow: 0 8px 24px var(--shadow); }
.site-thumb { display: block; aspect-ratio: 16 / 10; background: var(--chip); border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.site-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.site-body { padding: 14px 16px 6px; flex: 1; }
.site-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.site-title a { font-weight: 700; font-size: 1.05rem; color: var(--ink); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-flag { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.site-flag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.site-flag.ok { color: var(--ok); }
.site-flag.bad { background: var(--danger-tint, #fdecec); color: var(--danger); }
.site-state.down { color: var(--danger); } .site-state.down::before { background: var(--danger); }

/* Dashboard filter cards */
.stat-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.stat-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; }
.stat-card:hover { border-color: var(--ink-3); }
.stat-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.stat-card .stat-ic { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--paper, #f3f4f3); color: var(--ink-2); }
.stat-card .stat-ic svg { width: 20px; height: 20px; }
.stat-card .stat-num { font-size: 1.5rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-card .stat-label { font-size: .84rem; color: var(--ink-2); }
.stat-card.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.stat-card.on .stat-ic { background: var(--brand-tint); color: var(--brand); }
.stat-card.warn .stat-ic { background: var(--warn-bg); color: var(--warn-ink); }
.stat-card.warn .stat-num { color: var(--warn-ink); }
.stat-card.bad .stat-ic { background: var(--danger-tint, #fdecec); color: var(--danger); }
.stat-card.bad .stat-num { color: var(--danger); }
@media (max-width: 1100px) { .stat-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card { padding: 10px 12px; column-gap: 10px; }
  .stat-card .stat-ic { width: 32px; height: 32px; }
}
.site-url { display: flex; align-items: center; gap: 6px; font-size: .86rem; margin-top: 2px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-url .icon { width: 14px; height: 14px; flex: none; }
.site-url.secure { color: var(--ink-3); } .site-url.secure .icon { color: var(--ok); }
.site-url.insecure { color: var(--warn-ink); }
.site-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--chip); color: var(--ink-2); }
.tag .icon { width: 12px; height: 12px; }
.tag.wp { background: var(--brand-tint); color: var(--brand-ink); }
.tag.stage { background: var(--warn-bg); color: var(--warn-ink); }
.tag.fast { background: var(--brand-tint); color: var(--brand-ink); }
.site-note { font-size: .8rem; color: var(--warn-ink); margin-top: 8px; }
.site-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px 14px; }
.site-actions { display: flex; gap: 6px; flex: none; }
.site-actions .btn { white-space: nowrap; padding: 7px 11px; }
.site-actions .btn .icon { width: 15px; height: 15px; }
.site-state { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.site-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.site-state.live { color: var(--ok); } .site-state.live::before { background: var(--ok); box-shadow: 0 0 0 3px var(--brand-tint); }
.site-state.setup { color: var(--warn-ink); } .site-state.setup::before { background: var(--accent); }
.site-state.suspended, .site-state.failed { color: var(--danger); } .site-state.suspended::before, .site-state.failed::before { background: var(--danger); }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.choice { display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--card); }
.choice .icon { width: 26px; height: 26px; color: var(--brand); margin-bottom: 6px; }
.choice span { font-size: .86rem; color: var(--ink-3); }
.choice:hover { text-decoration: none; border-color: var(--brand); background: var(--brand-tint); }
.first-site h2 { font-size: 1.3rem; }

.dash-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 8px 0 22px; }
.mini-stat { display: flex; flex-direction: column; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.mini-stat span { font-size: .78rem; color: var(--ink-3); }
.mini-stat:hover { text-decoration: none; border-color: var(--brand); }
.mini-stat.attention { border-color: var(--warn-line); background: var(--warn-tint); }
@media (max-width: 560px) {
  .site-toolbar select { flex: 1 1 140px; }
  .site-grid { grid-template-columns: 1fr; }
  .site-foot { flex-wrap: wrap; }
}

/* ---------- Pay as you go: wallet chip, wallet page, deploy wizard ---------- */
.hidden, [hidden] { display: none !important; }
.wallet-chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }
.wallet-chip .icon { color: var(--brand); width: 17px; height: 17px; }
.wallet-chip:hover { text-decoration: none; border-color: var(--brand); }
.wallet-chip.low { border-color: var(--warn-line); background: var(--warn-tint); color: var(--warn-ink); }
.wallet-chip.low .icon { color: var(--warn-ink); }
.wallet-chip.empty { border-color: var(--danger-line); background: var(--danger-tint); color: var(--danger); }
.wallet-chip.empty .icon { color: var(--danger); }
@media (max-width: 560px) { .wallet-chip .chip-label { display: none; } }

.wallet-hero { display: grid; grid-template-columns: 1.1fr 1fr 1.4fr; gap: 16px; margin-bottom: 22px; }
.wallet-hero > div, .wallet-hero > form { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.wallet-hero .label { font-size: .8rem; color: var(--ink-3); }
.wallet-balance { border-top: 3px solid var(--brand) !important; }
.wallet-balance .small { color: var(--ink-3); }
.wallet-balance strong { font-size: 2rem; font-variant-numeric: tabular-nums; color: var(--brand); }
.wallet-balance.low { border-top-color: var(--accent) !important; }
.wallet-balance.low strong { color: var(--warn-ink); }
.wallet-fact strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.wallet-fact small { font-size: .85rem; color: var(--ink-3); font-weight: 500; }
.topup-row { display: flex; gap: 8px; }
.topup-row input { flex: 1; }
.quick-amounts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.chip-btn { font: inherit; font-size: .8rem; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); cursor: pointer; }
.chip-btn:hover { border-color: var(--brand); color: var(--brand); }
td.num.pos { color: var(--ok); }
@media (max-width: 900px) { .wallet-hero { grid-template-columns: 1fr; } }

.deploy { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.deploy-step { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 18px; }
.deploy-step h2 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 14px; }
.step-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; }
.deploy-fields { margin-top: 16px; }
.row-2.wide { grid-template-columns: 1fr 140px; }
.option-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.option-cards.two { grid-template-columns: 1fr 1fr; }
.option-card { position: relative; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.option-card .oc-body { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); }
.option-card .oc-body .icon { color: var(--brand); width: 22px; height: 22px; margin-bottom: 4px; }
.option-card .oc-body span { font-size: .84rem; color: var(--ink-3); }
.option-card .factor { font-style: normal; font-size: .75rem; color: var(--warn-ink); font-weight: 600; }
.option-card input:checked + .oc-body { border-color: var(--brand); background: var(--brand-tint); box-shadow: 0 0 0 1px var(--brand) inset; }
.option-card input:focus-visible + .oc-body { outline: 2px solid var(--brand); outline-offset: 2px; }
.res-group { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.res-group:first-of-type { border-top: 0; padding-top: 0; }
.res-label { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.res-label span { font-size: .8rem; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 8px; font-weight: 600; font-size: .9rem; background: var(--card); font-variant-numeric: tabular-nums; }
.chip input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type=range] { flex: 1; accent-color: var(--brand); }
.range-row output { min-width: 70px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.deploy-summary { position: sticky; top: 84px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.deploy-summary h2 { font-size: 1.1rem; }
.sum-lines { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin: 0 0 14px; font-size: .88rem; }
.sum-lines dt { color: var(--ink-3); }
.sum-lines dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sum-total { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin-bottom: 10px; display: grid; gap: 6px; }
.sum-total div { display: flex; justify-content: space-between; align-items: baseline; }
.sum-total span { color: var(--ink-3); font-size: .88rem; }
.sum-total strong { font-variant-numeric: tabular-nums; }
.sum-total strong.big { font-size: 1.5rem; color: var(--brand); }
.sum-wallet { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 8px; }
.btn.block { width: 100%; justify-content: center; margin: 8px 0 10px; }
@media (max-width: 980px) {
  .deploy { grid-template-columns: 1fr; }
  .deploy-summary { position: static; }
  .option-cards.two { grid-template-columns: 1fr; }
}

/* ---------- Site manage page: header, gauges, uptime, billing ---------- */
.page-head.site-head { justify-content: flex-start; gap: 18px; align-items: center; }
.page-head.site-head .head-actions { margin-left: auto; }
.site-head-thumb { width: 120px; height: 75px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); background: var(--chip); flex: none; }
@media (max-width: 640px) { .site-head-thumb { display: none; } .page-head.site-head .head-actions { margin-left: 0; } }
.res-card { margin-bottom: 20px; }
.live-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink-3); }
.live-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.live-tag.on { color: var(--ok); }
.live-tag.on::before { background: var(--ok); animation: creem-pulse 2s ease-in-out infinite; }
@keyframes creem-pulse { 50% { box-shadow: 0 0 0 4px var(--brand-tint); } }
@media (prefers-reduced-motion: reduce) { .live-tag.on::before { animation: none; } }
.gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 18px 18px 10px; }
.gauge { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.gauge svg { width: 118px; height: 118px; }
.gauge .g-track { fill: none; stroke: var(--line-soft); stroke-width: 9; }
.gauge .g-val { fill: none; stroke: var(--brand); stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.gauge.warm .g-val { stroke: var(--accent); }
.gauge.hot .g-val { stroke: var(--danger); }
.gauge .g-center { position: absolute; top: 0; height: 118px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge .g-center strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.gauge .g-center span { font-size: .76rem; color: var(--ink-3); }
.gauge .g-detail { font-size: .8rem; color: var(--ink-2); margin-top: 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .gauges { grid-template-columns: repeat(2, 1fr); } }
.usage-chart { padding: 6px 18px 16px; border-top: 1px solid var(--line-soft); }
.uc-head { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: .82rem; margin: 10px 0 6px; }
.uc-head small { color: var(--ink-3); }
.uc-head .dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.uc-head .dot.cpu { background: var(--brand); } .uc-head .dot.ram { background: var(--accent); }
.usage-chart svg { width: 100%; height: 70px; display: block; }
.uc-grid { stroke: var(--line-soft); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.uc-cpu, .uc-ram { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.uc-cpu { stroke: var(--brand); } .uc-ram { stroke: var(--accent); }
.uptime-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.uptime-stats div { display: flex; flex-direction: column; }
.uptime-stats strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.uptime-stats span { font-size: .76rem; color: var(--ink-3); }
.uptime-bars { width: 100%; height: 30px; display: block; margin-bottom: 10px; }
.uptime-bars rect.ok { fill: var(--ok); } .uptime-bars rect.warn { fill: var(--accent); } .uptime-bars rect.bad { fill: var(--danger); } .uptime-bars rect.none { fill: var(--line); }
@media (max-width: 480px) { .uptime-stats { grid-template-columns: repeat(2, 1fr); } }
.billing-card .bill-rate { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.billing-card .bill-rate strong { font-size: 1.8rem; color: var(--brand); font-variant-numeric: tabular-nums; }
.billing-card .bill-rate span { color: var(--ink-3); }
details.resize > summary { list-style: none; display: inline-flex; margin-top: 6px; cursor: pointer; }
details.resize > summary::-webkit-details-marker { display: none; }
.resize-form { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.resize-form .res-label { margin: 6px 0 0; }
.resize-form input[type=number] { max-width: 160px; }
.resize-form .chip span { padding: 6px 12px; }

/* ================= Brand theme (Bilal 2026-11-24): calm neutral surfaces, green only where it
   means something — primary buttons, the active menu item / tab, links, healthy states.
   Orange stays for small highlights (counts, warnings). ================= */
:root {
  --paper: #f6f7f6;
  --line: #e3e7e4;
  --line-soft: #eef1ef;
  --hover: #f7f9f8;
  --chip: #eef1ef;
  --brand-tint: #e8f3ed;
  --brand-tint-2: #d3eadc;
  --side-bg: #ffffff;
  --side-border: #e3e7e4;
  --side-ink: #3d4a43;
  --side-mark: #14201a;
  --side-muted: #8a968f;
  --side-dim: #a3ada7;
  --side-line: #e3e7e4;
  --side-hover: #f3f6f4;
  --side-active-bg: #e8f3ed;
  --side-active-ink: #0f6b45;
}
:root[data-theme="dark"] { --side-bg: #0f1613; --side-border: #1f2a25; --side-ink: #b9c7bf; --side-mark: #ffffff; --side-muted: #6f8479;
  --side-hover: rgba(255,255,255,.04); --side-active-bg: rgba(55,168,116,.16); --side-active-ink: #6fd3a0; --side-line: #26332c; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] { --side-bg: #0f1613; --side-border: #1f2a25; --side-ink: #b9c7bf; --side-mark: #ffffff; --side-muted: #6f8479;
    --side-hover: rgba(255,255,255,.04); --side-active-bg: rgba(55,168,116,.16); --side-active-ink: #6fd3a0; --side-line: #26332c; }
}
.side .mark { color: var(--side-mark); font-size: 1.12rem; }
.side .mark span { color: var(--brand); }
.side a.active { box-shadow: inset 3px 0 0 var(--brand); font-weight: 600; }
.side a.active .icon { color: var(--brand); }
.side .count { background: var(--accent); color: #1d1406; }
.tabs a.on { border-bottom-color: var(--brand); color: var(--brand); }
.topbar { background: rgba(255,255,255,.9); backdrop-filter: blur(6px); }
:root[data-theme="dark"] .topbar { background: rgba(14,21,18,.92); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .topbar { background: rgba(14,21,18,.92); } }
.kv dd { overflow-wrap: anywhere; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 3px; background: var(--paper); margin-bottom: 12px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: inline-block; padding: 6px 14px; border-radius: 7px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.seg input:checked + span { background: var(--card); color: var(--brand); box-shadow: 0 1px 3px var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.auto-box { border: 1px dashed var(--brand-tint-2); background: var(--brand-tint); border-radius: 10px; padding: 12px 14px; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.inline-field input { width: 130px; }

/* Website security tab */
.break { overflow-wrap: anywhere; }
.danger-ink { color: var(--danger); }
.check-cell { width: 34px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sec-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sec-row .sec-text { flex: 1 1 220px; }
.sec-row .sec-text strong { font-size: 1.05rem; }
.sec-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--chip); color: var(--ink-2); }
.sec-ic svg { width: 24px; height: 24px; }
.sec-summary.clean .sec-ic { background: var(--brand-tint); color: var(--brand); }
.sec-summary.warning .sec-ic { background: var(--warn-bg); color: var(--warn-ink); }
.sec-summary.infected { border-color: var(--danger-line); }
.sec-summary.infected .sec-ic { background: var(--danger-tint); color: var(--danger); }

/* Website firewall tab */
.waf-rules { display: grid; gap: 8px; }
.waf-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.waf-rule select, .waf-rule input { min-height: 38px; }
.waf-rule .grow { flex: 1 1 200px; }
.waf-rule .grow input { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; text-decoration: underline; font: inherit; }
@media (max-width: 640px) { .waf-rule { padding-bottom: 8px; border-bottom: 1px solid var(--line); } .waf-rule > label:not(.grow) { flex: 1 1 30%; } .waf-rule > label select { width: 100%; } }
.point-actions { white-space: nowrap; }
@media (max-width: 640px) { .point-actions { white-space: normal; } .point-actions > * { margin: 2px 0; } }

/* Live chat */
.chat-launcher { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border: 0; border-radius: 99px; background: var(--brand); color: #fff; font: inherit; font-weight: 600;
  box-shadow: 0 6px 20px rgba(15, 60, 40, .25); cursor: pointer; }
.chat-launcher svg { width: 20px; height: 20px; }
.chat-launcher:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.chat-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .75rem; display: inline-grid; place-items: center; }
body.chat-open .chat-launcher { display: none; }
.chat-float { position: fixed; right: 20px; bottom: 20px; z-index: 61; width: 380px; max-width: calc(100vw - 24px); height: min(600px, calc(100vh - 40px)); }
.chat-float[hidden] { display: none; }
.chat-panel { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .16); }
.chat-panel.full { height: calc(100vh - 240px); min-height: 420px; box-shadow: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-head [data-chat-status] { color: var(--ink-2); }
.chat-head-actions { display: flex; gap: 4px; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--paper, #f6f7f6); }
.chat-hello { padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.chat-hello p { margin: 0 0 4px; }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 86%; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-who { font-size: .72rem; color: var(--ink-3); margin: 0 4px 2px; }
.chat-bubble { padding: 9px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.chat-msg.mine .chat-bubble { background: var(--brand); color: #fff; border-color: var(--brand); border-bottom-right-radius: 4px; }
.chat-msg.mine .chat-bubble a { color: #fff; }
.chat-msg.staff:not(.mine) .chat-bubble { border-color: var(--accent); }
.chat-msg.system { align-self: center; max-width: 92%; align-items: center; }
.chat-msg.system .chat-bubble { background: transparent; border: 0; color: var(--ink-3); font-size: .82rem; text-align: center; padding: 2px 8px; }
.chat-typing { display: flex; gap: 4px; padding: 6px 18px; background: var(--paper, #f6f7f6); }
.chat-typing[hidden] { display: none; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: chat-dot 1.2s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .15s; } .chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-typing span { animation: none; } }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--card); }
.chat-form textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; }
.chat-form .btn { align-self: flex-end; }
.chat-error { padding: 6px 12px; color: var(--danger); background: var(--danger-tint); }
.chat-error[hidden] { display: none; }
@media (max-width: 640px) {
  .chat-float { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; }
  .chat-float .chat-panel { border-radius: 0; }
  .chat-launcher { right: 14px; bottom: 14px; padding: 12px; }
  .chat-launcher > span:not(.chat-badge) { display: none; }
  .chat-panel.full { height: calc(100dvh - 200px); }
}
/* Admin chat */
.chat-admin-log { max-height: 60vh; min-height: 320px; }
.chat-admin-log .chat-msg.staff { align-self: flex-end; align-items: flex-end; }
.chat-admin-log .chat-msg.staff .chat-bubble { background: var(--brand); color: #fff; border-color: var(--brand); }
.chat-admin-log .chat-msg.ai .chat-bubble { background: var(--brand-tint); }
/* "Add new" in the top bar (dashboard): same height as the wallet chip / icon buttons */
.topbar .top-add { height: 38px; min-height: 0; padding: 0 12px; gap: 6px; border-radius: 9px; font-size: .9rem; font-weight: 600; }
.topbar .top-add svg { width: 17px; height: 17px; }
@media (max-width: 640px) { .topbar .top-add { width: 38px; padding: 0; } .topbar .top-add .chip-label { display: none; } }

/* Client area: compact icon rail (icon + name below); left drawer on phones */
.admin.client-rail { grid-template-columns: 96px 1fr; background: linear-gradient(to right, var(--side-bg) 95px, var(--side-border) 95px 96px, transparent 96px); }
.client-rail .side { padding: 14px 10px; display: flex; flex-direction: column; gap: 6px; }
.client-rail .rail-head { display: flex; align-items: center; justify-content: center; margin: 0 0 14px; }
.client-rail .rail-mark { display: flex; gap: 0; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: var(--brand); color: #fff;
  font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; box-shadow: none; padding: 0; }
.client-rail .rail-mark span { color: #ffd7a8; }
.client-rail .rail-mark:hover { background: var(--brand); text-decoration: none; }
.client-rail .side a:not(.rail-mark) { position: relative; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  padding: 12px 4px 10px; border-radius: 12px; font-size: .74rem; font-weight: 600; text-align: center; line-height: 1.2; color: var(--side-ink); }
.client-rail .side a:not(.rail-mark) svg { width: 24px; height: 24px; }
.client-rail .side a .lbl { flex: none; }
.client-rail .side a.active { box-shadow: none; background: var(--side-active-bg); color: var(--side-active-ink); }
.client-rail .side a .count { position: absolute; top: 6px; right: 14px; min-width: 18px; padding: 0 5px; line-height: 18px; text-align: center; }
.client-rail .side a.m-only, .client-rail .rail-sep { display: none; }
@media (min-width: 901px) { .client-rail .nav-toggle, .client-rail .nav-close, .client-rail .nav-backdrop { display: none !important; } }
@media (max-width: 900px) {
  .admin.client-rail { display: block; background: none; }
  .client-rail .side { width: 250px; padding: 16px 12px; gap: 2px; }
  .client-rail .rail-head { justify-content: space-between; margin-bottom: 16px; }
  .client-rail .side a:not(.rail-mark), .client-rail .side a.m-only { display: flex; flex-direction: row; justify-content: flex-start; gap: 12px;
    padding: 11px 12px; font-size: .95rem; text-align: left; border-radius: 10px; }
  .client-rail .side a:not(.rail-mark) svg { width: 20px; height: 20px; }
  .client-rail .side a .lbl { flex: 1; }
  .client-rail .side a .count { position: static; }
  .client-rail .rail-sep { display: block; height: 1px; margin: 10px 6px; background: var(--side-border); }
}
@media print { .client-rail .side { display: none !important; } }

/* Client area uses the full width next to the rail */
.client-rail .content { max-width: none; }
@media (min-width: 1101px) and (max-width: 1360px) { .stat-card { padding: 12px; column-gap: 10px; } .stat-card .stat-ic { width: 34px; height: 34px; } }

/* DNS page */
.dns-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .dns-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .dns-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dns-list { display: grid; gap: 10px; }
.dns-item { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; margin: 0; }
.dns-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1rem; }
.dns-name a { color: var(--ink); text-decoration: none; } .dns-name a:hover { text-decoration: underline; }
.dns-ns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dns-ns > span { flex-basis: 100%; }
.ns-chip { display: inline-flex; align-items: center; gap: 6px; font: .82rem ui-monospace, SFMono-Regular, Menlo, monospace; padding: 4px 8px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--paper, #f6f7f6); color: var(--ink); cursor: pointer; }
.ns-chip:hover { border-color: var(--brand); }
.ns-chip .icon { width: 13px; height: 13px; color: var(--ink-3); }
.ns-chip.copied { border-color: var(--brand); background: var(--brand-tint); }
.dns-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.dns-actions form { margin: 0; }
.text-danger { color: var(--danger); }
.ns-box { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
@media (max-width: 900px) {
  .dns-item { grid-template-columns: 1fr; gap: 10px; }
  .dns-actions { justify-content: flex-start; }
}
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-between form { margin: 0; }

/* Admin settings page header */
.crumbs { margin: 0 0 12px; font-size: .9rem; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs .icon { width: 15px; height: 15px; }

/* DNS zone page */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); text-decoration: none; font-size: .9rem; margin: 0 0 12px; }
.back-link:hover { color: var(--brand); }
.back-link .icon { width: 15px; height: 15px; }
.zone-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 20px; align-items: center; padding: 18px 20px; margin-bottom: 14px; }
.zone-title { display: flex; gap: 14px; align-items: center; min-width: 0; }
.zone-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); flex: none; }
.zone-ic .icon { width: 22px; height: 22px; }
.zone-title h1 { margin: 0 0 6px; font-size: 1.45rem; line-height: 1.2; overflow-wrap: anywhere; }
.zone-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .85rem; color: var(--ink-3); }
.zone-meta a { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.zone-meta .icon { width: 14px; height: 14px; }
.zone-ns { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; text-align: right; }
.zone-ns .ns-label { font-size: .8rem; color: var(--ink-3); }
.zone-ns .ns-box { margin: 0; justify-content: flex-end; }
.ns-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.ns-foot form { margin: 0; }
.import-strip { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 0 0 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--card); }
.import-strip .import-ic { color: var(--ink-3); display: flex; } .import-strip .import-ic .icon { width: 18px; height: 18px; }
.import-strip > .small { flex: 1; color: var(--ink-2); }
.import-strip form { margin: 0; }

.dns-records { padding: 0; overflow: hidden; }
.rec-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rec-toolbar h2 { margin: 0; font-size: 1.05rem; flex: 1 1 auto; }
.rec-search { display: flex; align-items: center; gap: 8px; background: var(--input-bg); border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; flex: 0 1 280px; }
.rec-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.rec-search .icon { color: var(--ink-3); width: 16px; height: 16px; flex: none; }
.rec-search input { border: 0; box-shadow: none; background: transparent; padding: 8px 0; width: 100%; font: inherit; font-size: .9rem; color: inherit; outline: none; }
.type-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.type-chip { font: inherit; font-size: .8rem; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; }
.type-chip b { font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.type-chip:hover { border-color: var(--ink-3); }
.type-chip.on { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-ink); }

.rec-add { padding: 14px 16px; background: var(--hover); border-bottom: 1px solid var(--line); }
.rec-form { display: grid; grid-template-columns: 110px minmax(150px, 1fr) minmax(200px, 2fr) 90px 110px auto; gap: 10px; align-items: end; }
.rec-form .rf { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rec-form label, .rec-form .rf-label { font-size: .78rem; font-weight: 600; color: var(--ink-3); }
.rec-form input, .rec-form select { width: 100%; font-size: .9rem; padding: 8px 10px; }
.rec-form .rf-content input { font-family: var(--mono); font-size: .85rem; }
.rf-suffix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; background: var(--input-bg); overflow: hidden; }
.rf-suffix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.rf-suffix input { border: 0 !important; box-shadow: none !important; min-width: 0; }
.rf-suffix span { display: flex; align-items: center; padding: 0 8px; font-size: .78rem; color: var(--ink-3); background: var(--chip); white-space: nowrap; }
.rec-form .switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .85rem; font-weight: 500; color: var(--ink-2); height: 38px; }
.rec-form .switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rec-form .switch .track { width: 36px; height: 20px; border-radius: 99px; background: var(--chip); border: 1px solid var(--line); position: relative; transition: background .15s; flex: none; }
.rec-form .switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px var(--shadow); transition: transform .15s; }
.rec-form .switch input:checked + .track { background: var(--accent); border-color: var(--accent); }
.rec-form .switch input:checked + .track::after { transform: translateX(16px); }
.rec-form .switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }
.rec-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

.rec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rec-table th { text-align: left; font-size: .74rem; font-weight: 600; color: var(--ink-3); padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.rec-table td { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.rec-table tbody tr[data-rec]:hover { background: var(--hover); }
.rec-table .c-type { width: 84px; } .rec-table .c-name { width: 22%; } .rec-table .c-proxy { width: 120px; } .rec-table .c-ttl { width: 80px; }
.rec-table .c-act { width: 96px; text-align: right; white-space: nowrap; }
.rec-table .c-act form { display: inline; margin: 0; }
.rtype { display: inline-block; min-width: 52px; text-align: center; font: 600 .74rem var(--mono); padding: 3px 6px; border-radius: 6px; background: var(--chip); color: var(--ink-2); }
.rtype.t-a, .rtype.t-aaaa { background: #e5eefb; color: #2f62b5; }
.rtype.t-cname { background: #efe9fb; color: #6a45b8; }
.rtype.t-mx { background: var(--warn-bg); color: var(--warn-ink); }
.rtype.t-txt { background: var(--chip); color: var(--ink-2); }
.rtype.t-srv, .rtype.t-caa { background: var(--brand-tint); color: var(--brand-ink); }
.rname { font-family: var(--mono); font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }
.rval { display: block; max-width: 100%; text-align: left; font: .84rem var(--mono); color: var(--ink); background: none; border: 0; padding: 0; cursor: copy; overflow-wrap: anywhere; }
.rval:hover { color: var(--brand); }
.rval.copied { color: var(--brand); }
.proxy { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--ink-3); }
.proxy .icon { width: 16px; height: 16px; }
.proxy.on { color: var(--accent); font-weight: 600; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 8px; }
.icon-btn.sm .icon { width: 16px; height: 16px; }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.rec-edit-row td { background: var(--hover); padding: 14px 16px; }
.rec-edit-row form { margin: 0; }
.show-sm { display: none; }

.dns-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; align-items: start; }
.dns-lower .card { margin: 0; }
.preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.preset { position: relative; cursor: pointer; }
.preset input { position: absolute; opacity: 0; }
.preset span { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; }
.preset span .icon { width: 16px; height: 16px; color: var(--ink-3); }
.preset input:checked + span { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand); }
.preset input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.tips { margin: 0 0 14px; padding-left: 18px; color: var(--ink-2); line-height: 1.6; }
.danger-details summary { cursor: pointer; color: var(--danger); font-weight: 600; font-size: .88rem; }

@media (max-width: 1100px) {
  .rec-form { grid-template-columns: 110px 1fr 1fr; }
  .rec-form .rf-content { grid-column: span 3; }
}
@media (max-width: 900px) {
  .zone-head { grid-template-columns: 1fr; }
  .zone-ns { align-items: flex-start; text-align: left; }
  .zone-ns .ns-box, .ns-foot { justify-content: flex-start; }
  .dns-lower { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rec-toolbar h2 { flex-basis: 100%; }
  .rec-search { flex: 1 1 auto; }
  .rec-table .c-name { width: auto; }
  .rec-table td, .rec-table th { padding: 10px; }
  .rec-table .c-type { width: 60px; }
  .rtype { min-width: 0; }
  .show-sm { display: block; margin-top: 2px; }
  .rec-form { grid-template-columns: 1fr 1fr; }
  .rec-form .rf-name, .rec-form .rf-content { grid-column: span 2; }
  .import-strip { flex-wrap: wrap; }
  .preset-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rec-table thead { display: none; }
  .rec-table tr[data-rec] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
  .rec-table tr[data-rec] td { padding: 0; border: 0; width: auto; }
  .rec-table tr[data-rec] td.c-content { grid-column: 1 / -1; grid-row: 2; padding-top: 6px; }
  .rec-table tr.rec-edit-row td { display: block; padding: 12px; }
}

/* Client notifications */
.note-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .note-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.now-card .card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.now-ok { display: flex; align-items: center; gap: 10px; padding: 18px 20px; color: var(--ok); font-weight: 500; }
.now-ok .icon { width: 22px; height: 22px; }
.now-list { list-style: none; margin: 0; padding: 0; }
.now-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-soft); scroll-margin-top: 80px; }
.now-item:first-child { border-top: 0; }
.now-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; flex: none; background: var(--warn-bg); color: var(--warn-ink); }
.now-item.bad .now-ic { background: var(--danger-tint); color: var(--danger); }
.now-ic .icon { width: 18px; height: 18px; }
.now-text { flex: 1; min-width: 0; }
.now-text a { color: var(--ink); }
.now-kind { font-size: .8rem; color: var(--ink-3); margin-left: 6px; }
.feed-card { padding: 0; overflow: hidden; }
.feed-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg a { padding: 6px 12px; font-size: .85rem; color: var(--ink-2); text-decoration: none; border-left: 1px solid var(--line); }
.seg a:first-child { border-left: 0; }
.seg a.on { background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item a { display: flex; gap: 12px; align-items: flex-start; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.feed-item a:hover { background: var(--hover); }
.feed-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; background: var(--chip); color: var(--ink-3); }
.feed-ic .icon { width: 16px; height: 16px; }
.feed-item.lv-bad .feed-ic { background: var(--danger-tint); color: var(--danger); }
.feed-item.lv-warn .feed-ic { background: var(--warn-bg); color: var(--warn-ink); }
.feed-item.lv-ok .feed-ic { background: var(--brand-tint); color: var(--ok); }
.feed-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.feed-title { font-size: .93rem; color: var(--ink-2); overflow-wrap: anywhere; }
.feed-item.unread .feed-title { font-weight: 650; color: var(--ink); }
.feed-body { font-size: .85rem; color: var(--ink-3); }
.feed-meta { font-size: .78rem; color: var(--ink-3); }
.feed-meta .pill { font-size: .66rem; }
.feed-item .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 8px; }
.feed-card .pager { padding: 12px 18px; }

.note-settings .card { margin-bottom: 16px; }
.channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.channel { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.channel .grow { flex: 1; min-width: 0; }
.channel .field { margin: 8px 0 0; }
.ch-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--chip); color: var(--ink-2); flex: none; }
.ch-ic.wa { background: var(--brand-tint); color: var(--brand); }
.ch-ic .icon { width: 18px; height: 18px; }
.pref-table { width: 100%; border-collapse: collapse; }
.pref-table th { text-align: left; font-size: .76rem; font-weight: 600; color: var(--ink-3); padding: 10px 18px; border-bottom: 1px solid var(--line); }
.pref-table td { padding: 12px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.pref-table .c-ch { width: 100px; text-align: center; }
.pref-name { display: flex; gap: 12px; align-items: center; }
.pref-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--chip); color: var(--ink-2); flex: none; }
.pref-ic .icon { width: 16px; height: 16px; }
.always { color: var(--ok); display: inline-flex; } .always .icon { width: 18px; height: 18px; }
.pref-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.switch.sm { display: inline-flex; cursor: pointer; position: relative; }
.switch.sm input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch.sm .track { width: 38px; height: 22px; border-radius: 99px; background: var(--chip); border: 1px solid var(--line); position: relative; transition: background .15s; }
.switch.sm .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px var(--shadow); transition: transform .15s; }
.switch.sm input:checked + .track { background: var(--brand); border-color: var(--brand); }
.switch.sm input:checked + .track::after { transform: translateX(16px); }
.switch.sm input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch.sm input:disabled + .track { opacity: .45; cursor: not-allowed; }
@media (max-width: 900px) { .channels { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .pref-table th, .pref-table td { padding: 10px 8px; }
  .pref-table .c-ch { width: 62px; }
  .pref-ic { display: none; }
  .now-item { padding: 12px; flex-wrap: wrap; }
  .now-kind { display: block; margin: 0; }
}

/* Subdomains tab */
.sub-form { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 90px auto; gap: 10px; align-items: end; border-top: 1px solid var(--line); }
.sub-form label { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.sub-form .strong { font-weight: 600; color: var(--ink-2); }
.sub-form select { width: 100%; }
.sub-form .rf-suffix input { padding: 9px 10px; width: 100%; }
.sub-form .sub-err { grid-column: 1 / -1; }
.sub-note { padding-top: 0; }
@media (max-width: 760px) { .sub-form { grid-template-columns: 1fr 1fr; } .sub-form .sub-name { grid-column: 1 / -1; } .sub-form .btn { grid-column: 1 / -1; } }

/* File manager */
.fm { padding: 0; overflow: hidden; position: relative; }
.fm-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fm-crumbs { flex: 1 1 260px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .9rem; min-width: 0; }
.fm-crumbs a { color: var(--ink-2); text-decoration: none; padding: 2px 4px; border-radius: 5px; overflow-wrap: anywhere; }
.fm-crumbs a:hover { background: var(--hover); color: var(--brand); }
.fm-crumbs a:last-child { color: var(--ink); font-weight: 600; }
.fm-crumbs .sep { color: var(--ink-3); }
.fm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.fm-upload { cursor: pointer; }
.fm-sel { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--brand-tint); border-bottom: 1px solid var(--line); font-size: .88rem; }
.fm-sel span { flex: 1; font-weight: 600; color: var(--brand-ink); }
.danger-text { color: var(--danger) !important; }
.fm-msg { padding: 9px 16px; font-size: .88rem; border-bottom: 1px solid var(--line); }
.fm-msg.ok { background: var(--brand-tint); color: var(--brand-ink); }
.fm-msg.bad { background: var(--danger-tint); color: var(--danger); }
.fm-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.fm-table th { text-align: left; font-size: .74rem; font-weight: 600; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--line); }
.fm-table td { padding: 6px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.fm-table tbody tr:hover { background: var(--hover); }
.fm-table .c-chk { width: 34px; }
.fm-table .c-size { width: 90px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.fm-table .c-date { width: 180px; color: var(--ink-3); font-size: .84rem; white-space: nowrap; }
.fm-table .c-perm { width: 90px; }
.fm-table .c-act { width: 170px; text-align: right; }
.fm-name { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; max-width: 100%; }
.fm-name span:last-child { overflow-wrap: anywhere; }
.fm-name:hover span:last-child { color: var(--brand); text-decoration: underline; }
.fm-name.is-dir { font-weight: 600; }
.fm-ic { display: inline-flex; flex: none; color: var(--ink-3); }
.fm-ic .icon { width: 18px; height: 18px; }
.fm-name.is-dir .fm-ic { color: var(--accent); }
.fm-row-acts { display: inline-flex; gap: 4px; opacity: .55; }
.fm-table tr:hover .fm-row-acts, .fm-row-acts:focus-within { opacity: 1; }
.fm-drop { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15,107,69,.08); border: 2px dashed var(--brand); border-radius: var(--radius); font-weight: 600; color: var(--brand-ink); pointer-events: none; }
.fm-editor { position: fixed; inset: 0; z-index: 60; background: rgba(10,20,15,.45); display: flex; padding: 24px; }
.fm-editor-box { flex: 1; display: flex; flex-direction: column; margin: 0; padding: 0; overflow: hidden; max-width: 1400px; margin-inline: auto; width: 100%; }
.fm-editor-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.fm-editor-head strong { font-family: var(--mono); font-size: .9rem; overflow-wrap: anywhere; }
.fm-editor-head .grow { flex: 1; }
.fm-editor textarea { flex: 1; border: 0; border-radius: 0; resize: none; padding: 14px 16px; font: .86rem/1.55 var(--mono); tab-size: 4; background: var(--card); color: var(--ink); outline: none; }
@media (max-width: 640px) { .fm-editor { padding: 0; } .fm-table .c-act { width: auto; } .fm-row-acts { opacity: 1; } }

/* Dialog */
.st-dialog { border: 1px solid var(--line); border-radius: 12px; padding: 20px; width: min(440px, calc(100vw - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 20px 50px var(--shadow); }
.st-dialog::backdrop { background: rgba(10,20,15,.4); }
.st-dialog h3 { margin: 0 0 8px; font-size: 1.05rem; overflow-wrap: anywhere; }
.st-dialog input[type=text] { width: 100%; margin-top: 6px; font-family: var(--mono); font-size: .9rem; }
.st-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Database manager */
.db { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.db .card { margin: 0; }
.db-side { padding: 12px; position: sticky; top: 12px; }
.db-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.db-side-head strong { font-family: var(--mono); font-size: .88rem; overflow-wrap: anywhere; }
.db-filter { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--input-bg); margin-bottom: 8px; }
.db-filter .icon { width: 15px; height: 15px; color: var(--ink-3); }
.db-filter input { border: 0; box-shadow: none; padding: 7px 0; width: 100%; background: transparent; font: inherit; font-size: .86rem; outline: none; }
.db-tables { list-style: none; margin: 0 0 10px; padding: 0; max-height: 60vh; overflow: auto; }
.db-tables button { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: .84rem; color: var(--ink-2); cursor: pointer; text-align: left; }
.db-tables button:hover { background: var(--hover); }
.db-tables button.on { background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; }
.db-tables .tn { font-family: var(--mono); overflow-wrap: anywhere; }
.db-tables .tc { color: var(--ink-3); font-size: .76rem; font-variant-numeric: tabular-nums; }
.db-sql-btn { width: 100%; justify-content: center; }
.db-main { padding: 16px; min-height: 300px; }
.db-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.db-head h3 { margin: 0 0 2px; font-family: var(--mono); font-size: 1rem; }
.db-head-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.db-bar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.db-bar .search-box { flex: 1 1 240px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--input-bg); }
.db-bar .search-box .icon { width: 15px; height: 15px; color: var(--ink-3); }
.db-bar input { border: 0; box-shadow: none; padding: 8px 0; width: 100%; background: transparent; font: inherit; outline: none; }
.db-grid { border: 1px solid var(--line); border-radius: 8px; max-height: 65vh; overflow: auto; }
.db-table { border-collapse: collapse; font-size: .82rem; min-width: 100%; }
.db-table th { position: sticky; top: 0; background: var(--card); z-index: 1; text-align: left; border-bottom: 1px solid var(--line); padding: 8px 10px; white-space: nowrap; }
.db-sort { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: left; }
.db-sort.on, .db-sort:hover { color: var(--brand); }
.db-table td { padding: 6px 10px; border-bottom: 1px solid var(--line-soft); font-family: var(--mono); max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-table td.null { color: var(--ink-3); font-style: italic; }
.db-table td.c-act, .db-table th.c-act { position: sticky; right: 0; background: var(--card); white-space: nowrap; }
.db-table .c-chk { width: 30px; }
.db-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.db-edit .f { margin-bottom: 12px; }
.db-edit label { display: block; margin-bottom: 4px; }
.db-edit input[type=text], .db-edit textarea { width: 100%; font-family: var(--mono); font-size: .86rem; }
.db-sql { width: 100%; font: .88rem/1.5 var(--mono); }
@media (max-width: 900px) { .db { grid-template-columns: 1fr; } .db-side { position: static; } .db-tables { max-height: 220px; } }
@media (max-width: 640px) {
  .fm-table, .fm-table tbody { display: block; width: 100%; }
  .fm-table thead { display: none; }
  .fm-table tbody tr.fm-up { display: block; padding: 6px 10px; }
  .fm-table tbody tr:not(.fm-up) { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line-soft); }
  .fm-table tbody tr:not(.fm-up) td { border: 0; padding: 2px 0; }
  .fm-table tbody tr:not(.fm-up) td.c-act { grid-column: 2; text-align: left; }
  .fm-table td.c-act .fm-row-acts { gap: 6px; }
}

/* ---- Server recovery ---- */
.badge.rc-done { background: var(--brand-tint); color: var(--ok); }
.badge.rc-waiting { background: var(--chip); color: var(--ink-3); }
.badge.rc-account, .badge.rc-sites, .badge.rc-create, .badge.rc-restore, .badge.rc-dns { background: var(--warn-bg); color: var(--warn-ink); }
.badge.rc-failed { background: var(--danger-tint); color: var(--danger); }
.rc-sites { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.rc-sites li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.rc-sites li .dom { font-weight: 600; word-break: break-all; }
.rc-sites li .note { color: var(--ink-3); flex-basis: 100%; }
.rc-sites li .note.bad { color: var(--danger); }
.rc-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.rc-progress { display: grid; gap: 6px; margin-top: 4px; }
.rc-progress .small { display: flex; justify-content: space-between; }

/* ---- Tasks with progress (tray in the top bar + per-website card) ---- */
.tasks-tray > summary { position: relative; }
.tasks-tray.active > summary svg { animation: tasks-spin 1.6s linear infinite; color: var(--brand); }
@keyframes tasks-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tasks-tray.active > summary svg { animation: none; } }
.tasks-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.tasks-count:empty { display: none; }
.tasks-count.bad { background: var(--danger); }
.tasks-pop { width: min(380px, calc(100vw - 24px)); padding: 0; max-height: 70vh; overflow: auto; }
.tasks-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tasks-list { display: grid; }
.task, .menu-pop a.task { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 14px; border-bottom: 1px solid var(--line); border-radius: 0; text-decoration: none; color: inherit; font-weight: 400; align-items: stretch; }
.task:last-child { border-bottom: 0; }
a.task:hover { background: var(--hover, rgba(0,0,0,.03)); }
.task-top { min-width: 0; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.task-title { font-weight: 650; font-size: 14px; }
.task-sub { color: var(--ink-3, #6b7280); font-size: 12.5px; overflow-wrap: anywhere; }
.task-pct { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--brand); }
.task-bar { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.task-bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transition: width .6s ease; }
.task.waiting .task-bar i { background: var(--ink-3, #9ca3af); }
.task.failed .task-bar i { background: var(--danger); }
.task.failed .task-pct, .task.failed .task-text { color: var(--danger); }
.task.done .task-pct { color: var(--ok, var(--brand)); }
.task-text { font-size: 12.5px; color: var(--ink-2, #4b5563); }
.task-when { font-size: 12px; color: var(--ink-3, #6b7280); }
.task-bar i.w-0 { width: 0%; } .task-bar i.w-5 { width: 5%; } .task-bar i.w-10 { width: 10%; } .task-bar i.w-15 { width: 15%; } .task-bar i.w-20 { width: 20%; } .task-bar i.w-25 { width: 25%; } .task-bar i.w-30 { width: 30%; } .task-bar i.w-35 { width: 35%; } .task-bar i.w-40 { width: 40%; } .task-bar i.w-45 { width: 45%; } .task-bar i.w-50 { width: 50%; } .task-bar i.w-55 { width: 55%; } .task-bar i.w-60 { width: 60%; } .task-bar i.w-65 { width: 65%; } .task-bar i.w-70 { width: 70%; } .task-bar i.w-75 { width: 75%; } .task-bar i.w-80 { width: 80%; } .task-bar i.w-85 { width: 85%; } .task-bar i.w-90 { width: 90%; } .task-bar i.w-95 { width: 95%; } .task-bar i.w-100 { width: 100%; }
a.tasks-tray { position: relative; }
.tasks-tray .when-busy, .tasks-tray.active .when-idle { display: none; }
.tasks-tray.active .when-busy { display: contents; }
.tasks-tray > span:not(.tasks-count) { line-height: 0; }
.tasks-tray.active svg { animation: tasks-spin 1.6s linear infinite; color: var(--brand); }
@media (prefers-reduced-motion: reduce) { .tasks-tray.active svg { animation: none; } }
.tasks-page { display: grid; gap: 16px; }
.tasks-page .stat-cards { margin: 0; }
.tasks-page button.stat-card { font: inherit; text-align: left; cursor: pointer; }
.tasks-page .tasks-card { padding: 0; overflow: hidden; }
.tasks-page .tasks-card .card-head { padding: 14px 18px; border-bottom: 1px solid var(--line); margin: 0; }
.tasks-page [hidden] { display: none !important; }
.tasks-empty { padding: 16px 14px; color: var(--ink-3, #6b7280); font-size: 13px; }
.tasks-card .tasks-list .task { padding: 12px 18px; }
.task-toast { position: fixed; right: 16px; bottom: 16px; z-index: 60; max-width: 340px; padding: 12px 16px; border-radius: 10px; background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.35); font-size: 14px; }
.task-toast.ok { border-left: 4px solid var(--brand); } .task-toast.bad { border-left: 4px solid var(--danger); }

/* ---- Client Backups page (all websites + deleted websites) ---- */
.stat-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
div.stat-card:hover { border-color: var(--line); }
.bk-search { margin: 0; min-width: min(320px, 100%); }
.bk-list { border-top: 1px solid var(--line-soft); }
.bk-item { border-bottom: 1px solid var(--line-soft); }
.bk-item:last-child { border-bottom: 0; }
.bk-item > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; }
.bk-item > summary::-webkit-details-marker { display: none; }
.bk-item > summary:hover { background: var(--hover); }
.bk-item > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.bk-item > summary > .icon { margin-left: auto; color: var(--ink-3); transition: transform .15s; flex: none; }
.bk-item[open] > summary > .icon { transform: rotate(180deg); }
.bk-name { display: flex; flex-direction: column; min-width: 0; }
.bk-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-body { padding: 0 0 8px; background: var(--card); }
.bk-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.bk-item .pill { flex: none; }
@media (max-width: 640px) {
  .stat-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-cards.three .stat-card { grid-template-columns: 1fr; grid-template-rows: auto; text-align: left; }
  .stat-cards.three .stat-ic { display: none; }
  .bk-item > summary { padding: 12px; }
  .bk-actions { padding: 0 12px 10px; }
}
@media (prefers-reduced-motion: reduce) { .bk-item > summary > .icon { transition: none; } }
.bk-item .point-actions { white-space: normal; text-align: right; }
.bk-item .point-actions > * { margin: 2px 0; vertical-align: middle; }
.bk-item .point-actions .pop { white-space: normal; text-align: left; }
@media (max-width: 640px) {
  .bk-item table.list { display: table; }
  .bk-item table.list td, .bk-item table.list th { padding-left: 12px; padding-right: 12px; }
  .bk-item .point-actions .lbl-long { display: none; }
}

/* ---- Client Emails page ---- */
.em-new .pop { width: 320px; }
.em-addr { word-break: break-all; }
.em-usage { width: 160px; }
.em-meter { width: 120px; height: 8px; }
.em-list .point-actions { white-space: normal; text-align: right; }
.em-list .point-actions > * { margin: 2px 0; vertical-align: middle; }
.em-list .point-actions .pop { white-space: normal; text-align: left; }
@media (max-width: 640px) {
  .em-list { display: table; }
  .em-list td, .em-list th { padding-left: 12px; padding-right: 12px; }
  .em-new .pop { width: min(320px, calc(100vw - 32px)); }
}
.row-form .btn { white-space: nowrap; flex: none; }

/* DDoS protection card (Firewall tab) */
.ddos-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.ddos-what { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.ddos-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ddos-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.ddos-add .field { flex: 1 1 240px; margin-bottom: 0; }

/* Website page: main buttons + Tools */
.site-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.site-nav-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink-2); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.site-nav-btn svg { width: 17px; height: 17px; }
.site-nav-btn:hover { text-decoration: none; color: var(--ink); border-color: var(--ink-3); background: var(--hover); }
.site-nav-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.site-nav-btn.on:hover { background: var(--brand-ink); color: #fff; }
.site-nav-btn .pill { margin-left: 2px; }
.tool-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: -2px 0 16px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.tool-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 8px; color: var(--ink-2); font-size: .86rem; font-weight: 500; white-space: nowrap; }
.tool-chip svg { width: 15px; height: 15px; }
.tool-chip:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.tool-chip.on { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.tool-chip.back { color: var(--ink-3); border-right: 1px solid var(--line); border-radius: 8px 0 0 8px; margin-right: 4px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tool-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.tool-card:hover { text-decoration: none; border-color: var(--brand); box-shadow: 0 2px 10px var(--shadow); }
.tool-ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); flex: none; }
.tool-ic svg { width: 21px; height: 21px; }
.tool-text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.tool-state { justify-self: start; margin-top: 6px; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--chip); color: var(--ink-2); }
.tool-state.ok { background: var(--brand-tint); color: var(--ok); }
.tool-state.warn { background: var(--warn-bg); color: var(--warn-ink); }
.tool-state.bad { background: var(--danger-tint); color: var(--danger); }
.tool-go { color: var(--ink-3); align-self: center; }
.tool-card:hover .tool-go { color: var(--brand); }
@media (max-width: 640px) {
  .site-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .site-nav-btn { height: auto; min-height: 54px; padding: 6px 4px; flex-direction: column; justify-content: center; gap: 3px; font-size: .78rem; text-align: center; white-space: normal; }
  .site-nav-btn .pill { position: absolute; margin: -36px 0 0 46px; }
  .site-nav-btn { position: relative; }
  .tool-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tool-grid { grid-template-columns: 1fr; }
}
.ext-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin-bottom: 10px; }
.ext-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-family: var(--mono); font-size: .85rem; }
.ext-item:hover { background: var(--hover); }
.ext-item input { accent-color: var(--brand); }
.ext-item.locked { cursor: default; color: var(--ink-3); background: var(--hover); }
.ext-item .pill { margin-left: auto; font-family: var(--sans); font-size: .7rem; }

/* ---------- Hosting plans (client) ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 14px; }
.plan-price strong { font-size: 1.5rem; }
.plan-price span { color: var(--ink-3); font-size: .9rem; }
.plan-meter { margin-bottom: 12px; }
.plan-meter > div { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 4px; }
.plan-meter span { color: var(--ink-3); }
.plan-card .kv { margin-top: 6px; }
.plan-form .chips, .plan-form .inline-field, .plan-form .option-cards { margin-bottom: 16px; }
.plan-form .res-label { margin-top: 6px; }
@media (max-width: 600px) { .plan-grid { grid-template-columns: 1fr; } .plan-form .option-cards.two { grid-template-columns: 1fr; } }
.plan-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stat .value.small { font-size: 1.15rem; line-height: 1.4; }
/* Migration key test result (Add new) */
.key-result { margin: 4px 0 16px 38px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.key-result .kr-title { margin: 0 0 8px; font-weight: 700; }
.key-result.good { border-color: var(--brand); background: var(--brand-tint); }
.key-result.bad { border-color: var(--danger); background: var(--danger-tint); }
.key-result.bad .kr-title { color: var(--danger); margin: 0; }
.key-result .kv { margin: 0 0 10px; }
.key-result ul:empty { display: none; }
@media (max-width: 600px) { .key-result { margin-left: 0; } }
/* Speed page: optimization report */
.opt-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.opt-totals > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--paper); }
.opt-totals span { display: block; font-size: .78rem; color: var(--ink-3); }
.opt-totals strong { display: block; font-size: 1.45rem; margin: 2px 0; color: var(--ok); }
.opt-totals em { font-style: normal; font-size: .78rem; color: var(--ink-3); }
.opt-h { font-size: .95rem; margin: 0 0 8px; }
.opt-list { list-style: none; margin: 0 0 14px; padding: 0; }
.opt-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.opt-list li strong::before { content: "•"; color: var(--ink-3); margin-right: 6px; }
.opt-list li.ok strong::before { content: "✓"; color: var(--ok); }
.opt-list b { color: var(--ok); }
@media (max-width: 860px) { .opt-totals { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .opt-list li { grid-template-columns: 1fr; gap: 2px; } }
pre.kb-preview { max-height: 520px; }

/* bulk move: website rows stack on phones (checkbox + name, then CPU + memory) */
@media (max-width: 640px) {
  .import-table thead { display: none; }
  .import-table tr { display: grid; grid-template-columns: 32px 1fr 1fr; grid-template-areas: "chk site site" ". cpu mem"; gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.list.import-table td { border: 0; padding: 0 4px; }
  .import-table td:nth-child(1) { grid-area: chk; }
  .import-table td:nth-child(2) { grid-area: site; }
  .import-table td:nth-child(4) { grid-area: cpu; }
  .import-table td:nth-child(5) { grid-area: mem; }
  .import-table select { width: 100%; }
}

/* live visitors (website overview) */
.visitors { border-top: 1px solid var(--line); padding: 14px 18px 16px; display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; align-items: center; }
.visitors .v-now { display: flex; align-items: baseline; gap: 8px; }
.visitors .v-now strong { font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.visitors .v-now span:last-child { color: var(--ink-3); font-size: .9rem; }
.visitors .v-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); align-self: center; }
.visitors.on .v-dot { background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
@media (prefers-reduced-motion: no-preference) { .visitors.on .v-dot { animation: v-pulse 2s ease-in-out infinite; } }
@keyframes v-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--brand) 8%, transparent); } }
.visitors .v-stats { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.visitors .v-stats div { display: flex; flex-direction: column; }
.visitors .v-stats strong { font-variant-numeric: tabular-nums; }
.visitors .v-stats span { color: var(--ink-3); font-size: .78rem; }
.visitors .v-bars { grid-column: 1 / -1; display: flex; align-items: flex-end; gap: 3px; height: 44px; }
.visitors .v-bars i { flex: 1; height: 4%; background: var(--line); border-radius: 2px 2px 0 0; transition: height .3s; }
.visitors .v-bars i.has { background: var(--brand); opacity: .75; }
.visitors .v-bars i:last-child.has { opacity: 1; }
.visitors > p { grid-column: 1 / -1; }
@media (max-width: 640px) { .visitors { grid-template-columns: 1fr; } .visitors .v-stats { justify-content: flex-start; } }

/* change data center */
progress.reloc-bar { width: 100%; height: 10px; border: 0; border-radius: 6px; background: var(--line-soft); overflow: hidden; appearance: none; }
progress.reloc-bar::-webkit-progress-bar { background: var(--line-soft); border-radius: 6px; }
progress.reloc-bar::-webkit-progress-value { background: var(--brand); border-radius: 6px; }
progress.reloc-bar::-moz-progress-bar { background: var(--brand); border-radius: 6px; }
.reloc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font-size: .85rem; color: var(--ink-3); }
.reloc-steps li { border-top: 3px solid var(--line); padding-top: 6px; }
.reloc-steps li.done { border-color: var(--brand); color: var(--ink); }
.reloc-steps li.now { border-color: var(--accent); color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .reloc-steps { grid-template-columns: 1fr 1fr; } }

/* Shown only where .hide-sm hides its column (≤ 900px) */
.show-md { display: none; }
@media (max-width: 900px) { .show-md { display: block; margin-top: 2px; } }

/* Admin → backup job form */
.seg.seg-wrap { flex-wrap: wrap; }
.backup-summary { background: var(--brand-tint); border: 1px solid var(--ok-line); color: var(--brand-ink); border-radius: 8px; padding: 10px 12px; font-size: .9rem; }

/* Admin → Backups: running list, run timeline, account cards */
.run-list { display: grid; }
.run-item { display: grid; gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.run-item:last-child { border-bottom: 0; }
.run-item:hover { background: var(--hover); text-decoration: none; }
.run-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.run-log { list-style: none; margin: 0; padding: 6px 18px 14px; max-height: 420px; overflow-y: auto; font-size: .86rem; }
.run-log li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); }
.run-log li:last-child { border-bottom: 0; }
.run-log time { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.run-log span { overflow-wrap: anywhere; }
.bk-cards .bk-item.card { margin-bottom: 14px; border: 1px solid var(--line); }
.bk-cards .bk-item.card:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .run-log li { grid-template-columns: 1fr; gap: 2px; } .run-item { padding: 12px 14px; } }

/* ---- Login pages (layouts/auth): one centred card ------------------------------------------------ */
.auth-page { min-height: 100vh; background:
    radial-gradient(1100px 520px at 50% -12%, var(--brand-tint) 0%, transparent 62%),
    var(--paper); }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px 18px; }
.auth-theme { position: fixed; top: 16px; right: 16px; z-index: 2; }
.auth-card { position: relative; width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--line); border-radius: 22px;
    padding: 36px 40px 22px; box-shadow: 0 1px 2px var(--shadow), 0 24px 60px -28px var(--shadow); overflow: hidden; }
.auth-card.wide { max-width: 640px; }
.auth-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
    background: linear-gradient(90deg, transparent 0%, var(--brand) 22%, var(--accent) 78%, transparent 100%); }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-logo { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 15px; background: var(--brand); color: #fff; display: grid; place-items: center;
    font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; position: relative; box-shadow: 0 8px 18px -10px var(--brand); }
.auth-logo::after { content: ""; position: absolute; right: -3px; top: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 3px solid var(--card); }
.auth-brand { font-weight: 800; font-size: 1.02rem; color: var(--ink); letter-spacing: .01em; }
.auth-brand span { color: var(--accent); }
.auth-head h1 { font-size: 1.45rem; margin: 16px 0 4px; letter-spacing: -.01em; }
.auth-sub { color: var(--ink-3); margin: 0 auto; max-width: 34ch; font-size: .95rem; }
.auth-card .field label { font-weight: 600; }
.auth-card .label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.auth-card .label-row a { font-weight: 600; color: var(--accent); }
.input-icon { position: relative; }
.input-icon > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.auth-card .input-icon input { padding-left: 42px; }
.auth-card input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .auth-card select { height: 48px; border-radius: 12px; width: 100%; }
.auth-card .grid-2 { align-items: start; }
.input-icon .pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px; color: var(--ink-3); cursor: pointer; border-radius: 8px; line-height: 0; }
.input-icon .pw-toggle:hover { color: var(--ink); background: var(--hover); }
.input-icon .pw-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.input-icon .pw-toggle svg { width: 18px; height: 18px; }
.input-icon .pw-toggle svg + svg, .input-icon .pw-toggle.shown svg:first-child { display: none; }
.input-icon .pw-toggle.shown svg + svg { display: inline; }
.input-icon:has(.pw-toggle) input { padding-right: 46px; }
.auth-remember { margin: 4px 0 18px; color: var(--ink-2); }
.auth-submit { height: 50px; border-radius: 12px; font-size: 1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
.auth-submit svg { width: 18px; height: 18px; transition: transform .15s; }
.auth-submit:hover svg { transform: translateX(3px); }
.auth-card .auth-alt { text-align: center; margin: 16px 0 0; }
.auth-foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: center; align-items: center;
    gap: 10px 14px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-3); }
.auth-foot b { color: var(--ink); }
.auth-ver { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid var(--warn-line); border-radius: 999px; color: var(--accent); font-weight: 700; }
.auth-ver svg { width: 14px; height: 14px; }
@media (max-width: 520px) {
    .auth-wrap { padding: 64px 12px 24px; align-items: flex-start; }
    .auth-card { padding: 28px 20px 18px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) { .auth-submit svg { transition: none; } }

/* WordPress tab: login details */
.wp-login-kv dd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.wp-login-kv dd > a.mono { overflow-wrap: anywhere; }
.wp-login-kv .wp-pw input { width: 220px; max-width: 100%; padding-right: 46px; font-family: var(--mono, ui-monospace, monospace); }
.wp-login-kv dd > .small { flex-basis: 100%; }
@media (max-width: 520px) { .wp-login-kv .wp-pw, .wp-login-kv .wp-pw input { width: 100%; } }

/* Settings hub + website tools: equal cards (Bilal 2026-11-25) */
.hub-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.hub-card { align-items: center; padding: 16px; min-height: 84px; }
.hub-card > div:not(.ico) { flex: 1; min-width: 0; }
.hub-card h3 { padding-right: 0; font-size: .98rem; }
.hub-card p { font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-card .ico { width: 40px; height: 40px; }
.hub-card.disabled .state { position: static; flex: none; }
.hub-go { color: var(--ink-3); flex: none; line-height: 0; }
.hub-go svg { width: 18px; height: 18px; }
a.hub-card:hover .hub-go { color: var(--brand); }
.tool-grid { grid-auto-rows: 1fr; }
.tool-card { align-items: center; min-height: 92px; }
.tool-text .small { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-state { margin-top: 4px; }
@media (max-width: 640px) { .hub-grid, .tool-grid { grid-auto-rows: auto; } }
.hub-grid { grid-auto-rows: 92px; }
.hub-card { height: 100%; min-height: 0; }
.hub-card h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .hub-grid { grid-auto-rows: auto; } }
.tool-card { align-items: flex-start; min-height: 128px; }
.tool-text { display: flex; flex-direction: column; gap: 3px; align-self: stretch; }
.tool-state { margin-top: auto; align-self: flex-start; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tool-text .small { margin-bottom: 8px; }
.tool-go { align-self: center; }
@media (max-width: 640px) { .tool-card { min-height: 0; } .tool-state { margin-top: 4px; } }

/* ---------------------------------------------------------------- VetaFull */
.type-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 0 0 18px; }
.type-tabs a { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: inherit; text-decoration: none; }
.type-tabs a .icon { flex: none; margin-top: 2px; color: var(--brand); }
.type-tabs a strong { display: block; }
.type-tabs a small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.type-tabs a.active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-tint); }
.type-tabs a:hover { border-color: var(--brand); }
.accounts-card { margin-bottom: 18px; }
.log-box { margin: 0; padding: 12px 14px; max-height: 420px; overflow: auto; background: #0f1512; color: #e6ede9; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; border-radius: 0 0 12px 12px; }
.env-rows .row-2 { margin-bottom: 6px; }
.env-rows input { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row form { margin: 0; }
.pay-online form { margin: 0 0 8px; }
.pay-redirect { display: grid; place-items: center; min-height: 100vh; background: var(--bg, #f6f7f6); padding: 16px; }
.pay-redirect-card { max-width: 460px; width: 100%; padding: 24px; text-align: center; }
.rail-logo img { max-width: 36px; max-height: 36px; object-fit: contain; display: block; }
.domain-search { display: flex; gap: 10px; margin: 0 0 16px; }
.domain-search .search-box { flex: 1; }
.search-box.big input { font-size: 18px; padding: 12px 12px 12px 40px; }
.tld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 14px; }
.tld-grid .tld { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.tld-grid .tld strong { display: block; font-size: 18px; }
.tld-grid .tld span { color: var(--muted); font-size: 13px; }
.ok-ink { color: var(--brand); }
.error-ink { color: #b42318; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.callout { border-left: 3px solid var(--brand); background: var(--brand-tint); padding: 10px 12px; border-radius: 8px; margin: 8px 0 14px; }
.pop.wide { min-width: min(560px, 92vw); }
.danger-zone { border-color: #f3c5c0; }
@media (max-width: 640px) {
  .domain-search { flex-direction: column; }
  .type-tabs { grid-template-columns: 1fr 1fr; }
  .type-tabs a small { display: none; }
}

/* ---------- Admin dashboard ---------- */
.dash-head h1 { letter-spacing: -.01em; }
.dash-attn { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.dash-attn-item { display: inline-flex; align-items: center; gap: 10px; padding: 9px 12px 9px 9px; border-radius: 12px; background: var(--warn-tint);
  border: 1px solid var(--warn-line); color: var(--ink); text-decoration: none; font-size: .92rem; }
.dash-attn-item:hover { border-color: var(--warn-ink); }
.dash-attn-item > svg:last-child { width: 15px; height: 15px; color: var(--ink-3); }
.dash-attn-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); }
.dash-attn-ic svg { width: 17px; height: 17px; }
.dash-attn-item.bad { background: var(--danger-tint); border-color: var(--danger-line); }
.dash-attn-item.bad .dash-attn-ic { background: var(--danger); color: #fff; }
.dash-clear { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--brand-tint); border: 1px solid var(--ok-line);
  color: var(--ink); margin: 0 0 18px; font-size: .92rem; }
.dash-clear svg { color: var(--ok); width: 20px; height: 20px; flex: 0 0 auto; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 0 0 18px; }
.dash-kpi { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; color: var(--ink); text-decoration: none; }
.dash-kpi.link:hover { border-color: var(--ink-3); }
.dash-kpi-top { display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); font-size: .85rem; }
.dash-kpi-top svg { width: 18px; height: 18px; color: var(--brand); }
.dash-kpi-num { font-size: 1.7rem; font-weight: 700; letter-spacing: -.01em; margin: 6px 0 4px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dash-kpi-foot { font-size: .83rem; color: var(--ink-3); }
.dash-delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-delta.up { color: var(--ok); }
.dash-delta.down { color: var(--danger); }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.dash-grid > .card { margin: 0; min-width: 0; }
.dash-span2 { grid-column: span 2; }
.dash-span3 { grid-column: 1 / -1; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr 1fr; } .dash-span2, .dash-span3 { grid-column: 1 / -1; } }
@media (max-width: 720px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-legend { text-align: right; }
.dash-chart { width: 100%; height: auto; display: block; }
.dash-bar { fill: var(--brand); opacity: .82; }
.dash-bar:hover { opacity: 1; }
.dash-bar.today { fill: var(--accent); opacity: 1; }
.dash-bar.empty { fill: var(--line); opacity: 1; }
.dash-grid-line { stroke: var(--line-soft); stroke-width: 1; }
.dash-axis { fill: var(--ink-3); font-size: 12px; font-family: var(--sans); }
.dash-chart-foot { margin-top: 8px; }
.dash-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.dash-row:last-child { border-bottom: 0; }
.dash-row.link:hover { background: var(--hover); }
.dash-row-main { flex: 1; min-width: 0; }
.dash-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-avatar { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: .85rem;
  background: var(--brand-tint); color: var(--brand-ink); }
.dash-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 18px; color: var(--ink-3); text-align: center; }
.dash-empty svg { width: 24px; height: 24px; }
.dash-grid .table-wrap { overflow-x: auto; }
.dash-server { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.dash-server b { display: block; }
.dash-roles { display: block; }
.dash-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: 0 0 auto; }
.dash-dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--brand-tint); }
.dash-dot.off { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-tint); }
.dash-meter { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.dash-servers td { vertical-align: middle; }
.dash-act { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.dash-act:last-child { border-bottom: 0; }
.dash-act-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: 0 0 auto; }
.dash-act-dot.k-admin { background: var(--brand); }
.dash-act-dot.k-client { background: var(--accent); }
.dash-when { white-space: nowrap; }
@media (max-width: 560px) { .dash-attn-item { flex: 1 1 100%; } .dash-attn-item > svg:last-child { margin-left: auto; }
  .dash-kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .dash-kpi { padding: 12px 14px; } .dash-kpi-num { font-size: 1.2rem; } .dash-kpi-top svg { display: none; } }

/* What we sell (Settings → Linux, email & domains) */
.offer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
@media (max-width: 640px) { .offer-grid { grid-template-columns: 1fr; } }

/* WhatsApp agent keys (Settings → WA Hero AI → Agent keys) */
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { flex: 1; min-width: 0; font-size: .85rem; }
.key-once { border-color: var(--brand); }
.key-form .perm-group { margin: 12px 0 0; }
.key-form .perm-group legend { font-size: .85rem; }
.key-form .check span { line-height: 1.35; }
.t-right { text-align: right; }
.nowrap { white-space: nowrap; }
.btn.ghost.danger { background: transparent; color: var(--danger); border-color: var(--line); }
.key-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 560px) { .key-actions { flex-direction: column; align-items: flex-end; } }

/* Admin → Security updates */
.sec-alerts { display: grid; gap: 12px; padding: 14px 16px; }
.sec-alert { border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; padding: 12px 14px; background: var(--card); display: grid; gap: 6px; }
.sec-alert.sev-critical, .sec-alert.sev-high { border-left-color: var(--danger); }
.sec-alert.sev-medium { border-left-color: var(--warn-ink); }
.sec-alert-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sec-body { margin: 0; white-space: pre-line; }
.sec-alert-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 4px; }
.sec-how p { margin: 0 0 8px; }
.sec-how .muted { margin: 2px 0 6px; }
.sec-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sec-actions form { margin: 0; }
