:root {
  --orange: #ff6c2c;
  --orange-dark: #e45516;
  --header: #ffffff;
  --header-border: #d9d9d9;
  --page: #e8e8e8;
  --card: #ffffff;
  --text: #2b2b2b;
  --muted: #6b6b6b;
  --line: #e2e2e2;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.12);
  --files: #2f7de1;
  --db: #e67e22;
  --domains: #27ae60;
  --email: #8e44ad;
  --security: #c0392b;
  --metrics: #16a085;
  --advanced: #5d6d7e;
  --ok: #1e8e3e;
  --danger: #c62828;
  --radius: 8px;
  --header-h: 62px;
  --input-bg: #ffffff;
  --input-text: #1a1a1a;
}

[data-theme="dark"] {
  --header: #1c1c1f;
  --header-border: #2c2c31;
  --page: #121214;
  --card: #1e1e22;
  --text: #ececec;
  --muted: #9a9aa3;
  --line: #2d2d33;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  --input-bg: #2c2c32;
  --input-text: #f5f5f6;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-anchor: none; }
html { overflow-x: hidden; scroll-behavior: auto; scroll-padding-top: 0; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--page);
  color: var(--text);
  font-size: 14px;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  color: var(--input-text);
  background: var(--input-bg);
  caret-color: var(--input-text);
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--input-text);
  box-shadow: 0 0 0 1000px var(--input-bg) inset;
  caret-color: var(--input-text);
}
a { color: var(--orange); text-decoration: none; }

.app-hidden { display: none !important; }

/* ===== Login ===== */
.login-wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(255, 108, 44, 0.22), transparent),
    linear-gradient(180deg, #f3f3f3, #e4e4e4);
}
.login-card {
  width: min(440px, 92vw);
  background: #fff;
  color: #222;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  z-index: 2;
}
.login-brand {
  background: #2b2b2b;
  color: #fff;
  padding: 22px 26px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-brand h1 { margin: 0; font-size: 22px; letter-spacing: 0.02em; }
.login-brand p { margin: 4px 0 0; color: #bbb; font-size: 12px; }
.login-body { padding: 24px 26px 26px; }
.login-body label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: 12px; }
.login-body input {
  width: 100%;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: #111;
  caret-color: #111;
}
.login-body input:focus { outline: 2px solid rgba(255, 108, 44, 0.35); border-color: var(--orange); }
.login-wrap, .login-wrap input, .login-wrap button { color-scheme: light; }
.login-error { color: var(--danger); min-height: 1.2em; margin: 10px 0 0; font-size: 13px; }
.login-hints { margin-top: 16px; color: #777; font-size: 12px; line-height: 1.5; }

/* ===== Header ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--header-h);
  height: auto;
  background: var(--header);
  border-bottom: 1px solid var(--header-border);
  display: grid;
  grid-template-columns: 170px minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
  color: var(--text);
  cursor: pointer;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff8a4c, var(--orange-dark));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 2px 6px rgba(255, 108, 44, 0.35);
}
.search-wrap { position: relative; max-width: 560px; }
.search-wrap input {
  width: 100%;
  height: 38px;
  border: 0;
  border-radius: 19px;
  background: var(--input-bg);
  color: var(--input-text);
  padding: 0 16px 0 38px;
}
.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 10px;
  opacity: 0.55;
}
.search-results {
  display: none;
  position: absolute;
  left: 0; right: 0; top: 46px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 50;
}
.search-results.open { display: block; }
.search-results button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}
.search-results button:hover { background: rgba(255, 108, 44, 0.08); }

.stats-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.stat-pill,
html[data-theme="dark"] .stat-pill,
body.whm .stat-pill {
  min-width: 128px;
  background: #3a3a3a;
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px 7px;
}
.stat-pill .lbl,
html[data-theme="dark"] .stat-pill .lbl,
body.whm .stat-pill .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c8c8c8;
}
.stat-pill .val,
html[data-theme="dark"] .stat-pill .val,
body.whm .stat-pill .val {
  font-size: 11px;
  font-weight: 600;
  margin: 2px 0 4px;
  color: #fff;
}
.bar { height: 4px; background: #cfcfcf; border-radius: 99px; overflow: hidden; }
[data-theme="dark"] .bar { background: #3a3a42; }
.bar > i { display: block; height: 100%; background: var(--orange); }

.login-card { position: relative; }
.login-lang {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
}
.lang-btn {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text);
}
.lang-btn:hover { border-color: var(--orange); color: var(--orange); }
body.whm .lang-btn {
  background: #3d3d3d;
  border-color: #555;
  color: #fff;
}
.userbox { display: flex; align-items: center; gap: 8px; position: relative; }
.icon-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  cursor: pointer;
}
.menu {
  display: none;
  position: absolute;
  right: 0; top: 44px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 60;
}
.menu.open { display: block; }
.menu button, .menu .meta {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 10px 14px;
  cursor: pointer;
}
.menu .meta { color: var(--muted); cursor: default; border-bottom: 1px solid var(--line); }
.menu button:hover { background: rgba(255, 108, 44, 0.08); }

/* ===== Layout ===== */
.page {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(16px, 2.4vw, 28px) clamp(14px, 2vw, 32px) 64px;
  overflow-anchor: none;
}
.crumb { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 24px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* ===== Home boxes ===== */
.home-grid { display: grid; gap: 18px; }
.cat-box {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-top: 4px solid var(--accent, var(--orange));
  min-width: 0;
}
.cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 4px;
}
.cat-head h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, var(--orange));
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 4px 6px;
  padding: 8px 10px 16px;
}
.tool {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 12px 8px 10px;
  cursor: pointer;
  text-align: center;
  color: var(--text);
  position: relative;
  overflow-anchor: none;
}
.tool:hover { background: rgba(255, 108, 44, 0.08); }
.tool .glyph {
  width: 48px; height: 48px;
  margin: 0 auto 8px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.tool .glyph svg { width: 24px; height: 24px; }
.tool .name { font-size: 12px; font-weight: 600; line-height: 1.25; }
.tooltip {
  position: absolute;
  left: 50%; bottom: calc(100% - 4px);
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 5;
}
.tool:hover .tooltip { opacity: 1; }

/* ===== Module chrome ===== */
.module-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.chip.active, .btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}
.btn.danger { background: #fff1f1; color: var(--danger); border-color: #f3c0c0; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(12px, 2vw, 18px);
  min-width: 0;
  max-width: 100%;
}
.grid-2, .grid-3 {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; }
.table-wrap table { min-width: 640px; }
.table-wrap .pack-table { min-width: 860px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; word-break: break-word; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--input-text);
  border-radius: 8px;
  padding: 9px 10px;
}
table input:not([type="checkbox"]),
table select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--input-text);
  border-radius: 6px;
  padding: 6px 8px;
}
.field input[type="checkbox"] { width: auto; }
.field.check label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.field textarea { min-height: 90px; resize: vertical; }
.settings-stack { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.err { color: var(--danger); }
.notice {
  background: rgba(255, 108, 44, 0.1);
  border: 1px solid rgba(255, 108, 44, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.notice.err {
  background: rgba(200, 40, 40, 0.08);
  border-color: rgba(200, 40, 40, 0.28);
  color: var(--danger);
}
.notice.success, .cred-box.notice {
  background: rgba(20, 108, 46, 0.1);
  border: 1px solid rgba(20, 108, 46, 0.35);
  color: #146c2e;
}
[data-theme="dark"] .notice.success, [data-theme="dark"] .cred-box.notice {
  background: rgba(125, 222, 160, 0.1);
  border-color: rgba(125, 222, 160, 0.35);
  color: #7ddea0;
}
.toast.ok {
  background: #146c2e;
  font-weight: 600;
}
.pma { display: grid; grid-template-columns: minmax(180px, 220px) 1fr; gap: 16px; min-width: 0; }
.pma-side { height: fit-content; }
.pma-list { list-style: none; margin: 0; padding: 0; }
.pma-list button {
  width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px;
  border-radius: 8px; cursor: pointer; color: inherit;
}
.pma-list button:hover, .pma-list button.active { background: rgba(255,108,44,0.12); color: var(--orange-dark); }
.pma-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 800px) { .pma { grid-template-columns: 1fr; } }
.iframe-wrap {
  height: 72vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.iframe-wrap iframe { width: 100%; height: 100%; border: 0; }

/* File manager */
.files-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.crumb-path { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.crumb-path button { background: none; border: 0; color: var(--orange); cursor: pointer; padding: 0 4px; }
.file-row { cursor: pointer; }
.file-row:hover { background: rgba(255, 108, 44, 0.06); }
.editor {
  min-height: 420px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #1b1b1f;
  color: #eee;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding-top: 8px;
}
.chart i {
  flex: 1;
  background: linear-gradient(180deg, #ff8a4c, var(--orange));
  border-radius: 4px 4px 0 0;
  min-height: 4px;
}
.term {
  height: 62vh;
  background: #0d0d0f;
  border-radius: 8px;
  padding: 8px;
}

.role { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.role.admin { background: #fde8d8; color: #b34700; }
.role.reseller { background: #e4f0ff; color: #1558b0; }
.role.customer { background: #e7f6ec; color: #146c2e; }
[data-theme="dark"] .role.admin { background: #4a2a14; color: #ffb27a; }
[data-theme="dark"] .role.reseller { background: #1a2f4d; color: #8cbcff; }
[data-theme="dark"] .role.customer { background: #16341f; color: #7ddea0; }
[data-theme="dark"] .badge.ok { background: #16341f; color: #7ddea0; }
[data-theme="dark"] .badge.warn { background: #3d2e0a; color: #ffd36a; }
[data-theme="dark"] .badge.err { background: #3d1414; color: #ff9a9a; }
[data-theme="dark"] .btn.danger { background: #3d1414; color: #ff9a9a; border-color: #6a2a2a; }

.login-btn { width: 100%; margin-top: 8px; font-weight: 700; }
.pw-field { display: flex; gap: 8px; }
.pw-field input { flex: 1; }
.linkish {
  background: none; border: 0; color: var(--orange); cursor: pointer;
  padding: 0; font-weight: 700;
}
.impersonate-bar {
  background: #fff4d6; color: #6a4a00; padding: 8px 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-bottom: 1px solid #e6d08a;
}
[data-theme="dark"] .impersonate-bar { background: #3d2e0a; color: #ffd36a; border-color: #5a450f; }
.account-card {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px;
  margin-bottom: 18px;
}
.cred-box { margin-bottom: 16px; border-left: 4px solid #146c2e; }
@media (max-width: 980px) {
  .account-card { grid-template-columns: 1fr 1fr; }
}

.layout { display: flex; min-height: calc(100vh - var(--header-h)); min-width: 0; width: 100%; }
.sidebar {
  display: none;
  width: min(232px, 28vw);
  flex-shrink: 0;
  min-width: 0;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 14px 10px 40px;
}
.sidebar.visible { display: block; }
.sidebar h4 {
  margin: 14px 10px 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar button:hover, .sidebar button.active { background: rgba(255, 108, 44, 0.1); color: var(--orange-dark); }
.sidebar .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent, var(--orange));
  flex-shrink: 0;
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 8px;
}
.toast {
  background: #222;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  max-width: 360px;
  font-size: 13px;
}
.toast.error { background: #8b1e1e; }
.toast.ok { background: #146c2e; }

.modal-root {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  place-items: center;
  z-index: 90;
  padding: 20px;
  pointer-events: none;
}
.modal-root.open {
  display: grid;
  pointer-events: auto;
}
.modal-root[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.modal {
  width: min(560px, 100%);
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 18px;
}
.modal h3 { margin: 0 0 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: var(--page);
}
.badge.ok { background: #e7f6ec; color: #146c2e; }
.badge.warn { background: #fff4d6; color: #8a5b00; }
.badge.err { background: #fde8e8; color: #9b1c1c; }
.split-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions button { padding: 4px 8px; font-size: 12px; }
.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}
.log-box {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  background: #111;
  color: #d7d7d7;
  border-radius: 8px;
  padding: 12px;
  max-height: 52vh;
  overflow: auto;
  white-space: pre-wrap;
}
.term-out {
  height: 54vh;
  overflow: auto;
  background: #0d0d0f;
  color: #c8f5c4;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  padding: 10px;
  border-radius: 8px 8px 0 0;
  white-space: pre-wrap;
}
.term-in {
  width: 100%;
  border: 0;
  border-top: 1px solid #2a2a2e;
  background: #111;
  color: #eee;
  padding: 10px 12px;
  border-radius: 0 0 8px 8px;
  font-family: ui-monospace, Consolas, monospace;
}
.kv { display: grid; grid-template-columns: minmax(110px, 28%) 1fr; gap: 6px 12px; min-width: 0; }
.kv dd { overflow-wrap: anywhere; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.dropzone {
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: var(--page);
}
.dropzone.over { border-color: var(--orange); background: rgba(255,108,44,0.08); }
.hidden { display: none !important; }
.page.wide { max-width: none; padding-left: clamp(12px, 1.6vw, 24px); padding-right: clamp(12px, 1.6vw, 24px); }

@media (max-width: 1200px) {
  .stats-strip { display: none; }
  .topbar { grid-template-columns: auto 1fr auto; }
}
@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr auto; grid-template-rows: auto auto; height: auto; padding: 10px 12px; gap: 8px; }
  .search-wrap { grid-column: 1 / -1; max-width: none; }
  .sidebar { display: none !important; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .account-card { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 8px; }
  .impersonate-bar { flex-wrap: wrap; }
  .modal { width: min(560px, calc(100vw - 24px)); }
  .toast { max-width: calc(100vw - 36px); }
}
@media (max-width: 640px) {
  .page, .page.wide { padding: 14px 12px 48px; }
  .page-head h2 { font-size: 20px; }
  .account-card { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .login-card { width: min(440px, calc(100vw - 20px)); }
  .split-actions { flex-direction: column; align-items: stretch; }
}

/* ===== Jupiter (Kunde / cPanel) ===== */
body.cpanel {
  --header: #ffffff;
  --header-border: #d4d4d4;
  --page: #ececec;
}
html[data-theme="dark"] body.cpanel {
  --header: #1c1c1f;
  --header-border: #2c2c31;
  --page: #121214;
}
body.cpanel .topbar {
  box-shadow: 0 1px 0 var(--header-border);
  background: var(--header);
}
body.cpanel .brand, body.cpanel #brand-name {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
body.cpanel .search-wrap input {
  background: #f3f3f3;
  border: 1px solid #e0e0e0;
}
html[data-theme="dark"] body.cpanel .search-wrap input {
  background: var(--input-bg);
  border-color: var(--line);
}
body.cpanel .actionbar {
  background: #fff;
  border-bottom: 1px solid #ddd;
}
html[data-theme="dark"] body.cpanel .actionbar {
  background: #1c1c1f;
  border-bottom-color: #2c2c31;
}
body.cpanel .actionbar-hint { color: #666; font-weight: 500; }
html[data-theme="dark"] body.cpanel .actionbar-hint { color: #c8c8c8; }
body.cpanel .actionbar .hdr-webmail {
  background: #ff6c2c;
  color: #fff;
}
body.cpanel .actionbar .hdr-webmail:hover { background: #e45516; color: #fff; }
body.cpanel .sidebar {
  width: min(248px, 30vw);
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 10px 8px 48px;
}
body.cpanel .sidebar h4 {
  color: var(--accent, var(--orange));
  font-weight: 800;
}
body.cpanel .sidebar button {
  border-radius: 4px;
  font-size: 13px;
}
body.cpanel .page { max-width: 1180px; }

.cp-general {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.cp-general > h3 {
  margin: 0;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid var(--line);
}
html[data-theme="dark"] .cp-general > h3 { background: rgba(255, 255, 255, 0.04); }
.cp-general-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 18px;
  padding: 14px 16px 16px;
}
.cp-general-grid .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.cp-general-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.cp-groups { display: grid; gap: 14px; }
.cp-group {
  background: var(--card);
  border-radius: 2px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent, var(--orange));
}
.cp-group h3 {
  margin: 0;
  padding: 12px 16px 2px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--accent, var(--orange));
}
.cp-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px 8px 12px;
}
.cp-tool {
  width: 112px;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  padding: 12px 6px 10px;
  border-radius: 4px;
  overflow-anchor: none;
}
.cp-tool:hover { background: rgba(255, 108, 44, 0.08); }
.cp-tool .glyph {
  width: 48px; height: 48px; margin: 0 auto 8px;
  border-radius: 10px; display: grid; place-items: center; color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}
.cp-tool .glyph svg { width: 22px; height: 22px; }
.cp-tool .name { display: block; font-size: 12px; font-weight: 600; text-align: center; line-height: 1.3; }

/* ===== WHM (Admin) – light chrome, dark theme still works ===== */
body.whm {
  --header: #2b2b2b;
  --header-border: #1a1a1a;
  --page: #efefef;
  --text: #1a1a1a;
  --muted: #444444;
  --card: #ffffff;
  --input-bg: #ffffff;
  --input-text: #111111;
  --line: #d0d0d0;
}
html[data-theme="dark"] body.whm {
  --header: #1c1c1f;
  --header-border: #2c2c31;
  --page: #121214;
  --text: #ececec;
  --muted: #9a9aa3;
  --card: #1e1e22;
  --input-bg: #2c2c32;
  --input-text: #f5f5f6;
  --line: #2d2d33;
}
body.whm .topbar { color: #fff; }
body.whm .brand, body.whm #brand-name { color: #fff; }
body.whm .search-wrap input {
  background: var(--input-bg);
  color: var(--input-text);
}
body.whm .search-wrap input::placeholder { color: var(--muted); }
body.whm .search-wrap svg { color: var(--muted); }
body.whm .avatar { background: #ff6c2c; color: #fff; }
body.whm .icon-btn {
  background: #3d3d3d;
  border-color: #555;
  color: #fff;
}
body.whm .bar { background: #555; }
body.whm .crumb { color: var(--muted); }
body.whm .page-head h2 { color: var(--text); }
body.whm .page-head p { color: var(--muted); }
.whm-kpi {
  flex: 1 1 160px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
}
.whm-kpi .lbl { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.whm-kpi strong { color: var(--text); font-size: 22px; font-weight: 800; }
.actionbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: #ff6c2c;
  border-bottom: 1px solid #e45516;
  z-index: 35;
}
.actionbar-hint { color: #fff; font-size: 13px; font-weight: 600; }
.hdr-webmail {
  background: #ff6c2c;
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  padding: 8px 18px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.hdr-webmail:hover { background: #e45516; color: #ffffff; }
.actionbar .hdr-webmail {
  background: #ffffff;
  color: #d14510;
}
.actionbar .hdr-webmail:hover { background: #fff4ed; color: #b33a0c; }
.whm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.whm-card {
  background: var(--card);
  color: var(--text);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 16px 18px 18px;
}
.whm-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 2px solid #ff6c2c;
  padding-bottom: 6px;
}
.whm-card button, .whm-card a.whm-link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
  color: #1a5fb4;
  font-weight: 600;
}
html[data-theme="dark"] body.whm .whm-card button,
html[data-theme="dark"] body.whm .whm-card a.whm-link { color: #8cbcff; }
.whm-card button:hover, .whm-card a.whm-link:hover { color: #ff6c2c; }
.whm-status { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
body.whm .sidebar { display: none; }
.badge.warn { background: #fff4d6; color: #8a5a00; }
@media (max-width: 720px) {
  .actionbar-hint { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .search-wrap { grid-column: 1 / -1; max-width: none; }
  .stats-strip { display: none; }
}
