@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #f3efe6;
  --ink: #1c241c;
  --muted: #5c675c;
  --line: #d5cec0;
  --card: #fffdf8;
  --field: #fbfaf6;
  --field-focus: #ffffff;
  --accent: #0f6b4c;
  --accent-ink: #f4fff9;
  --accent-soft: #e5f3ec;
  --danger: #8b2e2e;
  --ok: #1f6b3a;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(40, 40, 20, 0.04);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #dfead8 0%, transparent 55%),
    linear-gradient(180deg, #efe8da, var(--bg));
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.has-sidebar {
  background: var(--bg);
}

/* ── Plesk-style app shell ───────────────────────────────────────── */
.app {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}
.sidebar {
  width: 240px;
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  background: #fffdf8;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 40;
}
.sidebar .brand {
  padding: 1rem 1rem .75rem;
  flex-shrink: 0;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .12rem;
  padding: 0 .6rem .6rem;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .45rem .65rem;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none !important;
  font-weight: 600;
  font-size: .88rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-sizing: border-box;
}
.sidebar-item:hover { background: #f0ebe0; }
.sidebar-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.sidebar-label {
  margin: .35rem .65rem .35rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar-site {
  border-top: 1px solid var(--line);
  padding: .7rem .6rem 1rem;
  flex: 1 1 auto;
}
.sidebar-site-name {
  font-weight: 700;
  font-size: .92rem;
  padding: .2rem .65rem .55rem;
  word-break: break-all;
}
.sidebar-switcher { width: 100%; margin-bottom: .45rem; }
.sidebar-switcher-btn {
  width: 100%;
  justify-content: space-between;
  border-radius: 10px !important;
  padding: .4rem .55rem !important;
  font-size: .86rem !important;
  font-weight: 700 !important;
}
.sidebar-switcher .site-switcher-label {
  max-width: 10.5rem;
}
.sidebar-site-nav {
  display: flex;
  flex-direction: column;
  gap: .08rem;
}
.sidebar-size { margin: .75rem .2rem 0; }
.sidebar .nav-username-label { max-width: 8rem; }
.app-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.app-topbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
  position: sticky;
  top: 0;
  z-index: 30;
  height: 3rem;
  flex-shrink: 0;
}
.app-topbar-spacer { flex: 1; }
.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: .15rem;
}
.topbar-action-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .55rem;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 600 .83rem/1 var(--sans);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.topbar-action-btn:hover { background: #f0ebe0; }
.topbar-action-btn.active { color: var(--accent); background: var(--accent-soft); }
.topbar-action-btn svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.topbar-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
}
.sidebar-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}
.sidebar-edge-toggle {
  position: sticky;
  top: 12px;
  z-index: 45;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin: 12px -14px 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #8f8878;
  background: #fffdf8;
  border-radius: 999px;
  cursor: pointer;
  color: #1c241c;
  box-shadow: 0 1px 6px rgba(28, 36, 28, .18);
}
.sidebar-edge-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
  transition: transform .2s ease;
}
.app.sidebar-collapsed .sidebar-edge-toggle svg {
  transform: rotate(180deg);
}
.sidebar {
  transition: width .2s ease, flex-basis .2s ease;
}
.app.sidebar-collapsed .sidebar {
  width: 68px;
  flex: 0 0 68px;
}
.app.sidebar-collapsed .sidebar .brand {
  display: flex;
  width: 100%;
  justify-content: center;
  padding: 1rem .5rem .75rem;
}
.app.sidebar-collapsed .sidebar .brand-text,
.app.sidebar-collapsed .sidebar-text,
.app.sidebar-collapsed .sidebar-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.app.sidebar-collapsed .sidebar-nav {
  padding: 0 .45rem .6rem;
  align-items: stretch;
}
.app.sidebar-collapsed .sidebar-item {
  justify-content: center;
  padding: .55rem .4rem;
  gap: 0;
}
.app.sidebar-collapsed .sidebar-item .nav-icon {
  width: 1.25rem;
  height: 1.25rem;
}
.sidebar-backdrop {
  display: none;
}
.app-topbar .site-head {
  flex: 1;
  margin: 0;
  min-width: 0;
}
.site-head-title {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}
.site-head-title h1 {
  margin: 0;
  font-size: 1.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-mode-pills { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav-mode-pill {
  font-size: .72rem; font-weight: 500; padding: .22rem .55rem;
  border-radius: 99px; border: 1px solid var(--line);
  background: transparent; cursor: pointer; color: var(--muted);
  line-height: 1.4; font-family: inherit;
}
.nav-mode-pill:hover:not(:disabled) { background: #f0ebe0; color: var(--ink); }
.nav-mode-pill:disabled { cursor: default; }
.nav-mode-pill.npm-live  { background: #dcfce7; color: #15803d; border-color: #86efac; }
.nav-mode-pill.npm-soon  { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.nav-mode-pill.npm-maint { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.nav-mode-pill.npm-susp  { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.open-site-btn {
  font-size: .78rem; padding: .28rem .7rem; border-radius: 6px;
  border: 1px solid var(--line); color: var(--muted);
  text-decoration: none !important; display: inline-flex; align-items: center;
  background: transparent; white-space: nowrap; font-weight: 600;
}
.open-site-btn:hover { background: #f0ebe0; color: var(--ink); }
.site-head-actions { display: flex; align-items: center; gap: .45rem; margin-left: auto; flex-wrap: wrap; }

@media (max-width: 899px) {
  .sidebar-toggle { display: inline-flex; }
  .sidebar-edge-toggle { display: none; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: none;
  }
  .app.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 28px rgba(20, 20, 10, .16);
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(28, 36, 28, .35);
    z-index: 35;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  .app.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .app.sidebar-collapsed .sidebar {
    width: 240px;
    flex: 0 0 240px;
  }
  .app.sidebar-collapsed .sidebar .brand {
    justify-content: flex-start;
    padding: 1rem 1rem .75rem;
  }
  .app.sidebar-collapsed .sidebar .brand-text,
  .app.sidebar-collapsed .sidebar-text,
  .app.sidebar-collapsed .sidebar-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }
  .app.sidebar-collapsed .sidebar-item {
    justify-content: flex-start;
    padding: .45rem .65rem;
    gap: .55rem;
  }
  .app-topbar .site-head { flex-wrap: wrap; }
  .site-head-title h1 { font-size: 1rem; max-width: 46vw; }
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--line);
  background: rgba(255,253,248,.85); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.brand {
  display: inline-flex; align-items: center; gap: .65rem;
  color: var(--ink); text-decoration: none; letter-spacing: .02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.85rem; height: 1.85rem; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: .95rem; flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-weight: 700; font-size: 1.05rem; }
.brand-tagline {
  font-size: .72rem; font-weight: 500; color: var(--muted);
  letter-spacing: .01em;
}
.login-brand {
  display: flex; align-items: center; gap: .85rem;
  margin-bottom: 1.25rem;
}
.login-brand h1 { margin: 0; font-size: 1.55rem; }
.login-tagline { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; }
.login .brand-mark { width: 2.4rem; height: 2.4rem; font-size: 1.2rem; border-radius: 10px; }
.top nav { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.top nav a, .top nav button {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .7rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem;
  border: 0; background: transparent; cursor: pointer; font: inherit;
}
.top nav a:hover, .top nav button:hover { background: #f0ebe0; }
.top nav a.active {
  background: var(--accent-soft); color: var(--accent);
}
.wrap { max-width: 1280px; margin: 0 auto; padding: 1.25rem 1.5rem; width: 100%; }
.has-sidebar .wrap { max-width: 1400px; margin: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
h1, h2 { margin: 0 0 .75rem; letter-spacing: -.02em; font-weight: 650; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.35rem 1.4rem; margin: 1rem 0; box-shadow: var(--shadow);
}
.login { max-width: 420px; margin: 4rem auto; }

/* Forms */
label {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin: .85rem 0;
  font-size: .84rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .01em;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
  width: 100%;
  margin: 0;
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .78rem .95rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  outline: none;
  appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}
textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.55;
  background:
    linear-gradient(180deg, #fffcf7 0%, var(--field) 100%);
  box-shadow: inset 0 1px 2px rgba(28, 36, 28, 0.03);
}
textarea:focus,
input:focus,
select:focus {
  background: var(--field-focus);
  border-color: #7bb89a;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
textarea::placeholder,
input::placeholder { color: #9aa395; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .15rem 1rem;
  align-items: start;
}
.form-grid label:has(textarea),
.form-grid > button { grid-column: 1 / -1; }
@media (max-width: 800px) { .form-grid { grid-template-columns: 1fr; } }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; background: var(--accent); color: var(--accent-ink);
  border: 0; padding: .7rem 1.15rem; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 600; text-decoration: none;
}
button:hover, .btn:hover { filter: brightness(1.05); text-decoration: none; }
button.sidebar-toggle,
button.sidebar-edge-toggle {
  background: #fffdf8;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0;
  filter: none;
}
button.sidebar-toggle { width: 2rem; height: 2rem; border-radius: 8px; }
button.sidebar-edge-toggle {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border-color: #8f8878;
  color: #1c241c;
}
.inline button, .top button {
  width: auto; background: transparent; color: var(--ink); border: 1px solid var(--line);
}
.inline-form { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; }
.inline-form label { flex: 1; min-width: 160px; margin: 0; }

table {
  width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow);
}
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); background: #f7f2e8; font-weight: 600;
}
tr:last-child td { border-bottom: 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } }
dl { display: grid; grid-template-columns: 130px 1fr; gap: .45rem .85rem; margin: 0; }
dt { color: var(--muted); } dd { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.err { color: var(--danger); } .ok { color: var(--ok); } .muted { color: var(--muted); font-size: .9rem; }
.text-danger { color: var(--danger); } .text-warn { color: #b45309; }
.check { display: flex; flex-direction: row; align-items: center; gap: .55rem; }
.check input { width: auto; margin: 0; }
.crumbs { color: var(--muted); }
.site-menu {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 1rem 0 1.4rem; flex-wrap: wrap;
}
.site-menu-bar {
  display: inline-flex; align-items: stretch; gap: 0;
  padding: .28rem; border-radius: 14px;
  background: #ebe4d6; border: 1px solid var(--line);
  box-shadow: inset 0 1px 2px rgba(28,36,28,.04);
  flex-wrap: wrap;
  max-width: 100%;
}
.site-menu-item {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-width: 0; padding: .55rem .72rem;
  border-radius: 10px; color: var(--ink); font-weight: 650;
  text-decoration: none !important; letter-spacing: .01em;
  font-size: .84rem; white-space: nowrap;
}
.site-menu-item:hover { background: rgba(255,253,248,.75); color: var(--ink); }
.site-menu-item.active {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 6px 16px rgba(15,107,76,.22);
}
.menu-icon, .nav-icon {
  display: inline-flex; width: 1.15rem; height: 1.15rem; flex-shrink: 0;
  opacity: .92;
}
.menu-icon svg, .nav-icon svg { width: 100%; height: 100%; display: block; }
.site-menu-item.active .menu-icon { opacity: 1; }
.icon-actions {
  display: inline-flex; gap: .35rem; flex-wrap: nowrap; white-space: nowrap;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; padding: 0; flex: 0 0 auto;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 10px; text-decoration: none !important; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.icon-btn svg { width: 1.1rem; height: 1.1rem; display: block; }
.icon-btn:hover {
  background: #f7f2e8; border-color: #cfc4ae; color: var(--accent);
  text-decoration: none; transform: translateY(-1px);
}
.icon-btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.icon-btn[data-tip] {
  position: relative;
}
.icon-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + .45rem);
  transform: translateX(-50%) translateY(2px);
  padding: .28rem .55rem;
  border-radius: 8px;
  background: #1f2a1f;
  color: #f7f2e8;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .01em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
  z-index: 20;
  box-shadow: 0 8px 18px rgba(20, 20, 10, .18);
}
.icon-btn[data-tip]::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + .2rem);
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1f2a1f;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease, visibility .12s ease;
  z-index: 20;
}
.icon-btn[data-tip]:hover::after,
.icon-btn[data-tip]:hover::before,
.icon-btn[data-tip]:focus-visible::after,
.icon-btn[data-tip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
}
.icon-btn[data-tip]:hover::after,
.icon-btn[data-tip]:focus-visible::after {
  transform: translateX(-50%) translateY(0);
}
.card-title { font-size: 1.05rem; color: var(--muted); font-weight: 600; }
.file-actions { display: grid; gap: .75rem; margin: 1rem 0; }
.actions { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
button.danger, .actions button {
  background: transparent; color: var(--danger); border: 1px solid #e2b4b4;
  border-radius: 999px; padding: .35rem .7rem; width: auto; font-size: .85rem;
}
button.danger:hover { background: #f8e8e8; }

.size-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .28rem .65rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-size: .82rem; font-weight: 500;
  white-space: nowrap; border: 1px solid #cfe5d8;
}
.size-pill small { color: var(--muted); font-family: var(--sans); font-weight: 500; }
.size-stack { display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; }
.size-stack .muted { font-size: .78rem; }
.disk-meter { width: 100%; min-width: 110px; max-width: 160px; }
.disk-meter-bar {
  height: 6px;
  border-radius: 99px;
  background: #ebe4d6;
  overflow: hidden;
  margin-top: .2rem;
}
.disk-meter-bar > span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ok, #2f7d4a);
}
.disk-meter.disk-warn .disk-meter-bar > span { background: #b58a00; }
.disk-meter.disk-crit .disk-meter-bar > span { background: var(--danger, #b42318); }
.disk-meter .size-detail { font-size: .72rem; line-height: 1.25; margin-top: .15rem; }
.site-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.site-head h1 { margin: 0; font-size: 1.75rem; }

/* ── Domain chrome (main pane, Plesk-style) ─────────────────────── */
.site-chrome {
  display: flex;
  align-items: center;
  gap: .65rem .85rem;
  flex-wrap: wrap;
  margin: 0 0 1.1rem;
}
.site-chrome--dash {
  padding: .95rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.site-chrome--crumb {
  padding: .35rem 0 .55rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}
.site-chrome-back {
  font-size: .82rem;
  font-weight: 650;
  color: var(--muted);
  text-decoration: none !important;
  white-space: nowrap;
}
.site-chrome-back:hover { color: var(--accent); }
.site-chrome-fav {
  position: relative;
  width: 2.15rem;
  height: 2.15rem;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  overflow: hidden;
  border: 1px solid #cfe5d8;
}
.site-chrome--crumb .site-chrome-fav {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 6px;
}
.site-chrome-fav-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 750;
  font-size: .95rem;
}
.site-chrome-fav img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--card);
}
.site-chrome-title {
  min-width: 0;
  display: flex;
  align-items: center;
}
.site-chrome-title h1,
.site-chrome .site-switcher-label {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-chrome--crumb .site-chrome-title h1,
.site-chrome--crumb .site-switcher-label {
  font-size: 1.05rem;
}
.site-chrome .site-switcher-btn {
  font-size: inherit;
  font-weight: 700;
  padding: .1rem .35rem .1rem .15rem;
}
.site-chrome-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.site-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.6rem, 1fr));
  gap: .55rem;
  margin: 0 0 1.15rem;
}
.site-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .75rem .4rem .7rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none !important;
  font-weight: 650;
  font-size: .78rem;
  box-shadow: var(--shadow);
}
.site-tool:hover {
  border-color: #cfe5d8;
  background: var(--accent-soft);
  color: var(--accent);
}
.site-tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  background: #f4f1ea;
  color: var(--accent);
}
.site-tool:hover .site-tool-icon { background: #fffdf8; }
.site-tool-icon svg { width: 1.2rem; height: 1.2rem; }
.site-tool-label { text-align: center; line-height: 1.2; }
.site-dash-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.site-dash-col .card { margin: 0 0 1rem; }
.site-dash-col .card:last-child { margin-bottom: 0; }
.site-dash-col .overview-stats { margin-bottom: 1rem; }
.site-preview-login { margin-top: .85rem; }
.site-dash-cols .site-preview-img { max-height: 280px; }
@media (max-width: 900px) {
  .site-dash-cols { grid-template-columns: 1fr; }
  .site-chrome-actions { margin-left: 0; width: 100%; }
}
.site-switcher { max-width: 100%; }
.site-switcher-btn {
  font-size: inherit; font-weight: inherit; letter-spacing: inherit;
  padding: .12rem .4rem .12rem .2rem; border-radius: 10px; max-width: 100%;
}
.site-switcher-label {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(70vw, 28rem);
}
.site-switcher-menu {
  min-width: 18rem; max-width: min(32rem, 92vw); padding: .4rem;
}
.site-switcher-filter {
  width: 100%; margin: 0 0 .35rem; padding: .45rem .65rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--field); color: var(--ink); font: inherit; font-size: .9rem;
}
.site-switcher-filter:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--field-focus); }
.site-switcher-links {
  max-height: 18rem; overflow-y: auto;
}
.site-switcher-links a.is-current {
  background: var(--accent-soft); color: var(--accent); font-weight: 650;
}
.site-switcher-links a.is-hidden { display: none; }
.site-switcher-links a:focus {
  outline: 2px solid var(--accent); outline-offset: -2px;
}
.site-switcher-empty {
  margin: 0; padding: .5rem .75rem; color: var(--muted); font-size: .85rem;
}

/* File manager */
.fm { padding: 0; overflow: hidden; }
.fm-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); background: #f7f2e8;
  flex-wrap: wrap;
}
.fm-path { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-weight: 600; }
.fm-path span { color: var(--muted); font-weight: 500; }
.fm-search input {
  min-width: 240px; background: #fff; border-radius: 999px; padding: .65rem 1rem;
}
.fm-actions {
  display: flex; gap: .75rem; align-items: center; flex-wrap: wrap;
  padding: .9rem 1.2rem; border-bottom: 1px solid var(--line);
}
.fm-action { margin: 0; display: flex; gap: .5rem; align-items: center; }
.fm-upload-btn {
  position: relative; overflow: hidden; cursor: pointer; margin: 0;
  background: var(--accent); color: var(--accent-ink); border-radius: 999px;
  padding: .55rem 1rem; font-weight: 600;
}
.fm-upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fm-mkdir input { margin: 0; min-width: 180px; border-radius: 999px; }
.fm-mkdir button { margin: 0; }

/* Drag & drop zone */
.fm-table-wrap { overflow: auto; position: relative; }
.fm-drop-overlay {
  display: none;
  position: absolute; inset: 0; z-index: 10;
  background: rgba(76,128,85,.10);
  border: 3px dashed var(--accent);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.fm-table-wrap.fm-dragging .fm-drop-overlay { display: flex; }
.fm-drop-label {
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; padding: .6rem 1.4rem;
  font-weight: 700; font-size: 1rem; letter-spacing: .02em; pointer-events: none;
}
/* Upload progress bar */
.fm-upload-progress {
  display: none;
  padding: .6rem 1.2rem; border-bottom: 1px solid var(--line);
  background: #f7f2e8; gap: .75rem; align-items: center; flex-wrap: wrap;
}
.fm-upload-progress.active { display: flex; }
.fm-progress-wrap { flex: 1; min-width: 180px; background: var(--line); border-radius: 999px; height: 8px; overflow: hidden; }
.fm-progress-bar { height: 100%; background: var(--accent); border-radius: 999px; width: 0%; transition: width .15s; }
.fm-progress-text { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.fm-table { border: 0; border-radius: 0; box-shadow: none; margin: 0; }
.fm-table th { position: sticky; top: 0; }
.fm-table td { vertical-align: middle; }
.fm-name {
  display: inline-flex; align-items: center; gap: .65rem;
  color: var(--ink); font-weight: 550; text-decoration: none;
}
a.fm-name:hover { color: var(--accent); }
.fm-icon {
  width: 1.55rem; height: 1.55rem; border-radius: 7px; flex: 0 0 auto;
  background: #e7e0d2 center/70% no-repeat;
}
.fm-icon.dir { background-color: #f0c96a; }
.fm-icon.up { background-color: #cfc6b4; }
.fm-icon.file { background-color: #d7e7de; }
.fm-icon.ext-php { background-color: #8892bf; }
.fm-icon.ext-css { background-color: #264de4; }
.fm-icon.ext-js { background-color: #c5a100; }
.fm-icon.ext-html, .fm-icon.ext-htm { background-color: #e34f26; }
.fm-icon.ext-json, .fm-icon.ext-xml { background-color: #6b8e23; }
.fm-row-actions { display: flex; gap: .4rem; justify-content: flex-end; }
.fm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: .35rem .75rem; font: inherit; font-size: .82rem;
  font-weight: 600; cursor: pointer; text-decoration: none; width: auto;
}
.fm-btn:hover { background: #f7f2e8; text-decoration: none; }
.fm-btn.danger { color: var(--danger); border-color: #e2b4b4; }
.fm-btn.danger:hover { background: #f8e8e8; }
.fm-empty td { color: var(--muted); text-align: center; padding: 2rem; }
.col-size { width: 110px; }
.col-modified { width: 160px; }
.col-actions { width: 170px; text-align: right; }

.modal { border: 0; border-radius: 16px; padding: 0; max-width: 420px; width: calc(100% - 2rem);
  box-shadow: 0 24px 60px rgba(20,20,10,.2); }
.modal::backdrop { background: rgba(28,36,28,.45); backdrop-filter: blur(2px); }
.modal-card { padding: 1.35rem 1.4rem; margin: 0; }
.modal-card h3 { margin: 0 0 .5rem; }
.modal-card p { margin: .35rem 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.1rem; }
.btn-ghost, .btn-danger {
  width: auto; border-radius: 999px; padding: .6rem 1rem; font: inherit; font-weight: 600; cursor: pointer;
}
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; border: 0; }

.editor-card { padding: 1rem 1.1rem 1.2rem; }
.editor-meta { display: flex; justify-content: space-between; gap: .75rem; align-items: center; margin-bottom: .75rem; flex-wrap: wrap; }
.code-editor {
  min-height: 60vh; font-family: var(--mono); font-size: .92rem; line-height: 1.45;
  background: #1e2420; color: #e8efe9; border-color: #2c3530; border-radius: 12px;
  tab-size: 4; white-space: pre; overflow: auto;
}
.code-editor:focus { box-shadow: 0 0 0 4px rgba(15,107,76,.25); border-color: #5fa88a; }
.editor-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .9rem; }

.flash-err {
  white-space: pre-wrap; background: #f8e8e8; border: 1px solid #e2b4b4;
  border-radius: 12px; padding: .9rem 1rem; font-family: var(--mono); font-size: .86rem;
}
.php-change-form { display: grid; gap: .55rem; margin-top: 1rem; }
.php-change-form .check { margin: 0; }

.verify-card .row { margin-bottom: .5rem; }
.verify-summary {
  display: flex; gap: .75rem; align-items: center; flex-wrap: wrap;
  padding: .75rem 1rem; border-radius: 12px; margin: .75rem 0 1rem; font-weight: 600;
}
.verify-summary.pass { background: #e5f3ec; color: var(--ok); border: 1px solid #cfe5d8; }
.verify-summary.fail { background: #f8e8e8; color: var(--danger); border: 1px solid #e2b4b4; }
.verify-table { margin-top: .5rem; }
.verify-table tr.ok td:nth-child(2) { color: var(--ok); font-weight: 700; }
.verify-table tr.bad td:nth-child(2) { color: var(--danger); font-weight: 700; }
.verify-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem;
}
.verify-stats pre {
  background: #f7f2e8; border: 1px solid var(--line); border-radius: 10px;
  padding: .75rem; overflow: auto; max-height: 220px; font-size: .8rem;
}
@media (max-width: 800px) { .verify-stats { grid-template-columns: 1fr; } }

.backup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
.backup-form {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf7f1;
}
.backup-form .check { margin: 0; }
.btn-danger {
  background: #8b2e2e;
  border-color: #8b2e2e;
  color: #fff;
}
.btn-danger:hover { filter: brightness(1.08); }
.backup-json {
  background: #f7f2e8;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .75rem;
  overflow: auto;
  max-height: 220px;
  font-size: .8rem;
}
@media (max-width: 800px) { .backup-actions { grid-template-columns: 1fr; } }

.sub-items-fieldset {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1rem 1rem;
  margin: 0;
}
.sub-items-fieldset legend {
  padding: 0 .35rem;
  font-weight: 600;
}
.addon-presets {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .75rem;
}
.addon-presets .fm-btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}
.sub-items-table input[type="number"] { width: 5.5rem; }
.sub-items-table input[type="text"] { width: 100%; min-width: 10rem; }
.sub-items-table select { min-width: 6.5rem; }
.sub-items-table select.item-vat { min-width: 4.4rem; }
.sub-items-table .item-gross-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sub-items-table .item-line { background: #faf7f1; }
.site-pick {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .85rem 1rem 1rem;
  margin: 1rem 0;
  background: #faf7f1;
}
.site-pick legend {
  padding: 0 .35rem;
  font-size: .84rem;
  font-weight: 600;
  color: var(--muted);
}
.site-pick .check {
  flex-direction: row;
  align-items: center;
  gap: .55rem;
  margin: .45rem 0;
  font-size: .95rem;
  color: var(--ink);
  font-weight: 400;
}
.sub-list {
  margin: .5rem 0 0;
  padding-left: 1.1rem;
}
.sub-list li { margin: .45rem 0; }

.price-edit {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.price-edit input[type="number"] {
  width: 7.5rem;
  margin: 0;
  padding: .45rem .6rem;
}
.inline-price-form { margin: 0; }
.vat-inline-form { margin: 0; }
.vat-inline-form select {
  width: auto;
  min-width: 4.75rem;
  margin: 0;
  padding: .35rem .5rem;
}
.top nav a, .top nav .nav-dropdown-btn { white-space: nowrap; }

/* ── Nav icon-only button (e.g. + New domain) ───────────────────── */
.nav-icon-only {
  padding: .4rem .5rem;
}
.nav-icon-only .nav-icon { margin: 0; }

/* ── Nav username label: hidden on narrow screens ─────────────────── */
.nav-username-label {
  max-width: 6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Nav dropdown ───────────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .7rem; border-radius: 999px;
  color: var(--ink); font-weight: 600; font-size: .92rem;
  border: 0; background: transparent; cursor: pointer; font: inherit;
}
.nav-dropdown-btn:hover { background: #f0ebe0; }
.nav-dropdown-btn.active { background: var(--accent-soft); color: var(--accent); }
.nav-chevron { flex-shrink: 0; transition: transform .18s; }
.nav-dropdown-btn[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + .4rem); left: 0;
  min-width: 11rem; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  padding: .35rem; z-index: 200;
}
.nav-dropdown-menu--right { left: auto; right: 0; }
.nav-dropdown-menu a,
.nav-dropdown-signout {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem; border-radius: 8px;
  color: var(--ink); text-decoration: none;
  font-size: .9rem; font-weight: 500; white-space: nowrap;
  border: 0; background: transparent; cursor: pointer; font: inherit; width: 100%;
}
.nav-dropdown-menu a svg,
.nav-dropdown-signout svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; opacity: .7; }
.nav-dropdown-menu a:hover,
.nav-dropdown-signout:hover { background: #f0ebe0; }
.nav-dropdown-divider { border: none; border-top: 1px solid var(--line); margin: .3rem 0; }
.nav-dropdown.open .nav-dropdown-menu { display: block; }

.nav-dropdown--bell { position: relative; }
.nav-dropdown--bell .nav-dropdown-btn { position: relative; }
.nav-bell-badge {
  position: absolute; top: .05rem; right: .05rem;
  min-width: 1.05rem; height: 1.05rem; padding: 0 .28rem;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: .65rem; font-weight: 700; line-height: 1.05rem;
  text-align: center; pointer-events: none;
}
.nav-dropdown-menu--notif {
  min-width: 22rem; max-width: 28rem; padding: .4rem;
}
.nav-dropdown-menu--notif a.nav-notif-item,
.nav-dropdown-menu--notif a.nav-notif-all {
  white-space: normal;
  width: auto;
  align-items: flex-start;
}
.nav-notif-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .4rem .6rem .5rem;
}
.nav-notif-head strong { font-size: .92rem; }
.nav-notif-mark {
  border: 0; background: transparent; color: var(--accent);
  font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; padding: 0;
}
.nav-notif-mark:hover { text-decoration: underline; }
.nav-notif-empty { margin: 0; padding: .6rem .75rem 1rem; color: var(--muted); font-size: .88rem; }
.nav-notif-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: .12rem;
  padding: .55rem .7rem; border-radius: 8px;
  color: var(--ink); text-decoration: none; white-space: normal;
  font-weight: 500; font-size: .88rem;
}
.nav-notif-item:hover { background: #f0ebe0; text-decoration: none; }
.nav-notif-item.unread { background: var(--accent-soft); }
.nav-notif-item.unread:hover { background: #dceee4; }
.nav-notif-title { font-weight: 650; line-height: 1.3; }
.nav-notif-body { color: var(--muted); font-size: .8rem; font-weight: 400; line-height: 1.35; }
.nav-notif-time { color: var(--muted); font-size: .75rem; font-weight: 400; }
.nav-notif-sev {
  display: inline-block; padding: .08rem .4rem; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: #eee8dc; color: var(--muted);
}
.nav-notif-sev.sev-warning { background: #fef3c7; color: #92400e; }
.nav-notif-sev.sev-critical { background: #fde8e8; color: #b91c1c; }
.nav-notif-sev.sev-info { background: #e5f3ec; color: var(--accent); }
.nav-notif-all {
  display: block; text-align: center; padding: .55rem .75rem; margin-top: .2rem;
  font-size: .85rem; font-weight: 600; border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
}
tr.notif-unread td { background: rgba(15,107,76,.06); }

.badge {
  display: inline-flex; align-items: center;
  padding: .1rem .5rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 600; font-size: .8rem;
}
.rc-wallet {
  display: inline-flex; align-items: baseline; gap: .45rem;
  padding: .35rem .8rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card); font-size: .88rem;
}
.rc-wallet strong { font-variant-numeric: tabular-nums; }
.rc-wallet.low { border-color: #c9a227; background: #fffbeb; }
.rc-wallet.err { color: var(--muted); }

/* ── Health page ─────────────────────────────────────────────────── */
.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.health-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.1rem 1.3rem; display: flex; flex-direction: column; gap: .35rem;
}
.health-card-label {
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted);
}
.health-card-value {
  font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1;
}
.health-card-sub { font-size: .82rem; color: var(--muted); margin-top: .1rem; }
.health-bar-wrap { height: 6px; border-radius: 3px; background: var(--line); margin-top: .5rem; overflow: hidden; }
.health-bar { height: 100%; border-radius: 3px; background: var(--accent); transition: width .4s; }
.health-bar.warn { background: #f59e0b; }
.health-bar.crit { background: var(--danger); }
.health-services { display: flex; flex-direction: column; gap: .45rem; }
.health-service-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.health-service-row:last-child { border-bottom: none; }
.health-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .75rem; font-weight: 600; padding: .2rem .55rem;
  border-radius: 999px; white-space: nowrap;
}
.health-pill.ok   { background: #dcfce7; color: #15803d; }
.health-pill.warn { background: #fef3c7; color: #92400e; }
.health-pill.crit { background: #fde8e8; color: #b91c1c; }
.health-section-title {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); margin: 1.5rem 0 .6rem;
}
.health-refresh-note { font-size: .8rem; color: var(--muted); margin-top: 1.5rem; text-align: right; }

.domains-filter {
  display: flex; gap: .65rem; align-items: center; flex-wrap: wrap;
  margin: 0 0 .4rem;
}
.domains-filter input[type="search"] {
  flex: 1; min-width: 260px; border-radius: 999px; background: #fff;
  padding: .78rem 1.1rem;
}
.domains-filter button { margin: 0; }
.domains-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none !important;
  flex-shrink: 0;
}
.domains-add-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}
.domains-add-btn:hover {
  filter: brightness(1.08);
  text-decoration: none !important;
}
.domains-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: .75rem 1rem;
  margin: 0 0 .85rem;
}
.domains-tag-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin: 0;
  min-width: 0;
  flex: 0 1 auto;
}
.domains-filter-dd {
  flex: 0 0 auto;
}
.domains-filter-dd .nav-dropdown-btn {
  gap: .4rem;
  max-width: 16rem;
}
.domains-filter-dd .nav-dropdown-btn.has-filter {
  background: var(--accent-soft);
  color: var(--accent);
}
.domains-filter-dd .filter-dd-label {
  font-size: .72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.domains-filter-dd .nav-dropdown-btn.has-filter .filter-dd-label {
  color: var(--accent);
}
.domains-filter-dd .filter-dd-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.domains-filter-dd .nav-dropdown-menu {
  min-width: 12.5rem;
  max-height: 18rem;
  overflow: auto;
}
.domains-filter-dd .nav-dropdown-menu a.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.domains-filter-dd .nav-dropdown-menu a.is-warn {
  color: #92400e;
}
.domains-filter-dd .smtp-scan-form {
  margin: 0;
}
.domains-filter-dd .smtp-scan-form .nav-dropdown-signout {
  width: 100%;
  text-align: left;
}
.domains-tag-label {
  font-size: .78rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: .15rem;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: .22rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.domain-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .28rem;
  margin-top: .4rem;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  padding: .1rem .4rem;
  border-radius: 999px;
  background: #efe8d8;
  color: var(--ink);
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.3;
}
.tag-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 .1rem;
  font-size: .85rem;
  line-height: 1;
}
.tag-remove:hover { color: var(--danger); }
.tag-add {
  width: 5.2rem;
  min-width: 4.4rem;
  padding: .12rem .4rem;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: .72rem;
}
.tag-add:focus { border-color: var(--accent); outline: none; }
.domains-table .col-note { min-width: 10rem; max-width: 16rem; }
.domain-note {
  width: 100%;
  padding: .35rem .5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: .8rem;
}
.domain-note:focus { border-color: var(--accent); outline: none; }
.domain-note.is-saved { border-color: var(--ok); }
.domain-note-text {
  display: block;
  font-size: .8rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.filter-meta { margin: 0 0 1rem; }
.domains-toolbar .filter-meta {
  margin: .2rem 0 0;
  white-space: nowrap;
  flex: 0 0 auto;
}
.domains-table .actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.domains-table td.actions { width: 1%; min-width: 7.5rem; }
.domains-table th .sort-link {
  color: inherit;
  text-decoration: none;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.domains-table th .sort-link::after {
  content: " ↕";
  font-weight: 500;
  opacity: .35;
}
.domains-table th .sort-link:hover { color: var(--accent); text-decoration: underline; }
.domains-table th .sort-link.active { color: var(--accent); }
.domains-table th .sort-link.dir-asc::after { content: " ↑"; opacity: 1; }
.domains-table th .sort-link.dir-desc::after { content: " ↓"; opacity: 1; }
.domains-table tr.bad td:first-child { border-left: 3px solid var(--danger); }

.host-cards { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 800px) { .host-cards { grid-template-columns: 1fr; } }
.host-metric { font-size: 1.9rem; font-weight: 650; margin: .1rem 0; color: var(--ink); }

.resources-card dl { margin-bottom: .5rem; }
.sparkline-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: .75rem;
}
.sparkline-row > div { display: flex; flex-direction: column; gap: .3rem; }
.sparkline-row .muted { font-size: .78rem; }
.sparkline { color: var(--accent); display: block; width: 100%; height: 44px; }
@media (max-width: 800px) { .sparkline-row { grid-template-columns: 1fr; } }

/* ── Resource columns in domains list ──────────────────────────── */
.domains-table td.res-cell {
  white-space: nowrap;
  width: 1%;
  min-width: 4.5rem;
  text-align: right;
}
.domains-table td.res-cell .res-val {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: .93rem;
}
.domains-table td.res-cell .res-sub {
  display: block;
  font-size: .73rem;
  line-height: 1.2;
}
/* amber = approaching limit */
.domains-table td.res-warn .res-val  { color: var(--amber, #d97706); font-weight: 600; }
/* red = saturated / high */
.domains-table td.res-high .res-val  { color: var(--danger); font-weight: 700; }
.domains-table tr:has(td.res-high) td:first-child { border-left: 3px solid var(--danger); }

/* ── Response time column ───────────────────────────────────────── */
.domains-table td.res-cell .res-val { font-variant-numeric: tabular-nums; }
.domains-table td.resp-ok   .res-val { color: var(--ok, #16a34a); font-weight: 600; }
.domains-table td.resp-warn .res-val { color: var(--amber, #d97706); font-weight: 600; }
.domains-table td.resp-slow .res-val { color: var(--danger); font-weight: 700; }
.domains-table td.resp-down .res-val { color: var(--danger); font-weight: 700; letter-spacing: .03em; }
.domains-table tr:has(td.resp-down) td:first-child { border-left: 3px solid var(--danger); }

/* ── Incident banner (site show page) ───────────────────────────── */
.incident-banner {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 4px solid var(--danger);
  color: #7f1d1d;
  padding: .75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: .93rem;
  line-height: 1.5;
}
.incident-banner code { background: #fee2e2; padding: .1em .35em; border-radius: 3px; }

/* ── Incidents section (resources page) ─────────────────────────── */
.incidents-section { margin: 1.5rem 0; }
.incidents-section h2 { font-size: 1.05rem; margin-bottom: .5rem; }
.incidents-table tr.incident-row td { background: #fff7f7; }
.card-incident { border-color: #fca5a5 !important; }
.metric-danger { color: var(--danger) !important; }
.metric-ok     { color: var(--ok, #16a34a) !important; }
.muted-heading { font-size: .92rem; color: var(--muted); font-weight: 500; margin-bottom: .4rem; }
.mt-2 { margin-top: 1.5rem; }

/* ── Health dot strip (site show page) ──────────────────────────── */
.card-divider { border: none; border-top: 1px solid var(--border); margin: .75rem 0; }
.health-dots {
  display: flex; flex-wrap: wrap; gap: 3px; margin-top: .3rem;
}
.health-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  cursor: default;
}
.dot-ok   { background: var(--ok, #16a34a); }
.dot-fail { background: var(--danger); }

/* ── Site thumbnails in domains list ────────────────────────────── */
.domains-table th.thumb-col,
.domains-table td.thumb-col { width: 84px; min-width: 84px; padding: 4px 6px; }
.thumb-open {
  display: block; padding: 0; margin: 0; border: 0; background: transparent;
  cursor: zoom-in; border-radius: 5px; line-height: 0;
}
.thumb-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-thumb {
  display: block;
  width: 72px; height: 48px;
  object-fit: cover;
  object-position: top center;
  border-radius: 5px;
  border: 1px solid var(--line);
  transition: transform .15s, box-shadow .15s;
}
.thumb-open:hover .site-thumb {
  transform: scale(1.04);
  box-shadow: 0 4px 14px rgba(28,36,28,.12);
}
.thumb-placeholder {
  display: block;
  width: 72px; height: 48px;
  border-radius: 5px;
  border: 1px dashed var(--line);
  background: #f4f1ea;
}

/* ── Overview preview (Plesk-style) ─────────────────────────────── */
.site-preview-card { padding: 1rem 1.15rem 1.15rem; }
.site-preview-btn {
  display: block; width: 100%; padding: 0; margin: 0; border: 0;
  background: #ebe4d6; border-radius: 12px; cursor: zoom-in; overflow: hidden;
  border: 1px solid var(--line);
}
.site-preview-img {
  display: block; width: 100%; max-height: 420px;
  object-fit: cover; object-position: top center;
  vertical-align: top;
}
.site-preview-btn:hover .site-preview-img { filter: brightness(1.02); }

/* ── Thumbnail lightbox ─────────────────────────────────────────── */
.thumb-lightbox {
  border: 0; padding: 0; border-radius: 16px;
  max-width: min(1100px, calc(100vw - 2rem));
  width: min(1100px, calc(100vw - 2rem));
  background: var(--card);
  box-shadow: 0 28px 70px rgba(20,20,10,.28);
}
.thumb-lightbox::backdrop {
  background: rgba(28,36,28,.55);
  backdrop-filter: blur(3px);
}
.thumb-lightbox-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line);
}
.thumb-lightbox-title {
  font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thumb-lightbox-img {
  display: block; width: 100%; max-height: min(80vh, 900px);
  object-fit: contain; object-position: top center;
  background: #1c241c;
}

/* ── Domains table: fit laptop screens without shifting right ───── */
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}
.table-scroll > table.domains-table {
  margin: 0;
  min-width: 860px;
}
.domains-table th,
.domains-table td {
  padding: .55rem .65rem;
  font-size: .9rem;
}
.domains-table .col-client {
  min-width: 12rem;
  max-width: 22rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.domains-table .client-cell-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.domains-table .client-cell-link:hover .client-name {
  text-decoration: underline;
}
.domains-table .client-name {
  display: block;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.domains-table .client-extra {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.domains-table .col-php,
.domains-table .col-status {
  white-space: nowrap;
}
.domains-table .size-detail {
  display: block;
  white-space: nowrap;
}
.domains-table td.res-cell {
  min-width: 3.6rem;
  padding-left: .4rem;
  padding-right: .4rem;
}
.domains-table td.actions { min-width: 3.2rem; width: 3.2rem; }
.row-actions-dd { position: static; }
.row-actions-dd .nav-dropdown-btn.icon-btn {
  padding: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
}
.row-actions-menu {
  min-width: 12.5rem;
  max-height: min(70vh, 28rem);
  overflow-y: auto;
}
@media (max-width: 1100px) {
  .domains-table .col-status { display: none; }
  .domains-table .size-detail { display: none; }
  .domains-table .col-client { min-width: 10rem; max-width: 16rem; }
}
@media (max-width: 900px) {
  .domains-table .col-php { display: none; }
  .table-scroll > table.domains-table { min-width: 720px; }
}

/* ── Per-site resource bars (CloudLinux-style) ──────────────────── */
.res-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 90px;
}
.res-bar-track {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: #ebe4d6;
  overflow: hidden;
}
.res-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 99px;
  transition: width .3s ease;
}
.res-bar-fill.green  { background: var(--ok); }
.res-bar-fill.yellow { background: #b58a00; }
.res-bar-fill.red    { background: var(--danger); }
.res-bar-label {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--muted);
  white-space: nowrap;
}
.res-bar-label strong {
  font-weight: 600;
  color: var(--ink);
}
.isolated-badge {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .15rem .45rem;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .03em;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #cfe5d8;
  white-space: nowrap;
}
.host-cards { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .host-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .host-cards { grid-template-columns: 1fr; } }

/* ── RBAC / User management ───────────────────────────────────────────── */
.role-badge {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.role-admin   { background: #fde8e8; color: #b91c1c; }
.role-viewer  { background: #dbeafe; color: #1d4ed8; }
.role-client  { background: #dcfce7; color: #15803d; }

.nav-user {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  padding: .3rem .6rem;
  white-space: nowrap;
}

.ok-dot  { color: var(--ok); }
.err-dot { color: var(--danger); }

.form-stack { display: flex; flex-direction: column; gap: 1.2rem; max-width: 680px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.checkbox-label input { width: auto; }

.sites-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}
.sites-fieldset legend { font-weight: 600; padding: 0 .4rem; }
.sites-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .4rem .8rem;
  margin-top: .6rem;
}
.check-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  cursor: pointer;
}
.check-item input { width: auto; margin: 0; }
.sites-actions { margin-top: .7rem; display: flex; gap: .5rem; }

.btn-danger {
  padding: .4rem .9rem;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
}
.btn-danger:hover { background: #b91c1c; }

/* ── Delete-site confirmation modal ──────────────────────────────────────── */
.delete-modal {
  border: 1px solid #fca5a5;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  max-width: 480px;
  width: 94vw;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.delete-modal::backdrop {
  background: rgba(0,0,0,.45);
}

/* ── Quick actions under each domain name ─────────────────────────── */
.domains-table .col-domain { white-space: nowrap; }
.domains-table .domain-name { display: inline-block; }
.domain-quick {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: .22rem;
}
.domain-quick-form { display: inline; margin: 0; }
.domain-quick-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent, #1a7f37);
  font: inherit;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .01em;
  cursor: pointer;
  text-decoration: none;
}
a.domain-quick-link { text-decoration: none; }
.domain-quick-link:hover,
.domain-quick-link:focus-visible {
  color: var(--ink, #24292f);
  text-decoration: underline;
}
button.domain-quick-link {
  display: inline;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--accent, #0f6b4c);
  filter: none;
  box-shadow: none;
}
button.domain-quick-link:hover {
  filter: none;
  background: none;
  color: var(--ink, #24292f);
}

/* ── DNS IP badge (domains list – rendered below domain name) ─────────── */
.dns-badge {
  display: block;
  margin-top: .25rem;
  font-family: var(--mono);
  font-size: .68rem;
  padding: .1rem .4rem;
  border-radius: 5px;
  white-space: nowrap;
  border: 1px solid transparent;
  width: fit-content;
  opacity: .85;
}
.dns-badge-loading {
  color: var(--muted);
  background: transparent;
}
.dns-badge-ok {
  background: #d1fae5;
  color: #065f46;
  border-color: #a7f3d0;
}
.dns-badge-warn {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.dns-badge-none {
  color: var(--muted);
  background: transparent;
}

.mail-badge {
  display: inline-block;
  margin-top: .2rem;
  margin-right: .35rem;
  font-size: .68rem;
  padding: .08rem .4rem;
  border-radius: 5px;
  border: 1px solid transparent;
  width: fit-content;
  white-space: nowrap;
}
.mail-badge-ok {
  background: #d1fae5;
  color: #065f46;
  border-color: #a7f3d0;
}
.mail-badge-warn {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.mail-badge-fail {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}
.mail-badge-none {
  color: var(--muted);
  background: transparent;
}
.tag-chip-warn {
  border-color: #f59e0b;
}
.smtp-scan-form {
  display: inline;
  margin-left: .35rem;
}

/* ── DNS records table (per-site DNS tab) ───────────────────────────── */
.dns-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.dns-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.dns-table th,
.dns-table td {
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.dns-table th {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f8f5ee;
}
.dns-table tr:last-child td { border-bottom: none; }
.dns-table tr:hover td { background: #faf7f0; }
.dns-name  { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.dns-content-cell { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.dns-priority { font-size: .8em; }
.dns-type {
  display: inline-block;
  padding: .1rem .4rem;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
  white-space: nowrap;
}
.dns-type-a     { background: #dbeafe; color: #1e40af; }
.dns-type-aaaa  { background: #ede9fe; color: #5b21b6; }
.dns-type-cname { background: #d1fae5; color: #065f46; }
.dns-type-mx    { background: #fef3c7; color: #92400e; }
.dns-type-txt   { background: #f3f4f6; color: #374151; }
.dns-type-ns    { background: #fce7f3; color: #9d174d; }
.dns-type-caa   { background: #fff7ed; color: #c2410c; }

.dns-ip-badge {
  display: inline-block;
  margin-left: .4rem;
  padding: .1rem .4rem;
  border-radius: 5px;
  font-size: .73rem;
  font-weight: 600;
  white-space: nowrap;
}
.dns-ip-ok   { background: #d1fae5; color: #065f46; }
.dns-ip-warn { background: #fef3c7; color: #92400e; }

.cf-proxied {
  color: #b45309;
  font-weight: 600;
  font-size: .82rem;
}

.coming-soon-card {
  max-width: 44rem;
  padding: 1.5rem 1.6rem;
  background: linear-gradient(160deg, #fffdf8 0%, #f3eee4 100%);
}

/* ── Imunify on-demand progress (fleet table + site tab) ─────────────── */
.imunify-scan-cell {
  white-space: nowrap;
  min-width: 11rem;
  vertical-align: middle;
}
.imunify-scan-cell--tab {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.imunify-scan-actions {
  display: inline-flex;
  gap: .4rem;
  align-items: center;
}
.imunify-progress {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 8.5rem;
  max-width: 12rem;
  margin-bottom: .35rem;
}
.imunify-scan-cell--tab .imunify-progress { margin-bottom: 0; min-width: 7.5rem; }
.imunify-progress[hidden] { display: none; }
.imunify-progress-track {
  flex: 1;
  min-width: 4.5rem;
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.imunify-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .35s ease;
}
.imunify-progress.is-queued .imunify-progress-bar { background: #c4b59a; }
.imunify-progress.is-done .imunify-progress-bar { background: #16a34a; }
.imunify-progress.is-indeterminate .imunify-progress-bar {
  width: 38%;
  transition: none;
  animation: imunify-indet 1.15s ease-in-out infinite;
}
.imunify-progress-label {
  font-size: .75rem;
  font-weight: 650;
  color: var(--muted);
  min-width: 3.2rem;
}
.imunify-progress.is-running .imunify-progress-label { color: var(--ink); }
.imunify-progress.is-done .imunify-progress-label { color: #15803d; }
.fm-btn:disabled, .imunify-scan-btn:disabled {
  opacity: .55;
  cursor: default;
}
@keyframes imunify-indet {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(270%); }
}

.speed-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.speed-check {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  gap: .35rem 0.75rem;
  align-items: start;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line, #ebe4d6);
}
.speed-check:last-child { border-bottom: 0; }
.speed-check-icon {
  width: 1.35rem; height: 1.35rem;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; line-height: 1;
  margin-top: .1rem;
}
.speed-check.pass .speed-check-icon { background: #dcfce7; color: #15803d; }
.speed-check.warn .speed-check-icon { background: #fef3c7; color: #92400e; }
.speed-check.fail .speed-check-icon { background: #fde8e8; color: #b91c1c; }
.speed-check.skip .speed-check-icon { background: #f3f0e8; color: #78716c; }
.speed-check-label { font-weight: 650; font-size: .95rem; }
.speed-check-value {
  font-variant-numeric: tabular-nums;
  font-size: .88rem;
  font-weight: 650;
  white-space: nowrap;
  text-align: right;
}
.speed-check.pass .speed-check-value { color: #15803d; }
.speed-check.warn .speed-check-value { color: #92400e; }
.speed-check.fail .speed-check-value { color: #b91c1c; }
.speed-check-advice {
  grid-column: 2 / -1;
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.45;
}
@media (max-width: 640px) {
  .speed-check { grid-template-columns: 1.6rem 1fr; }
  .speed-check-value { grid-column: 2; text-align: left; }
}

.subs-table { min-width: 980px; }
.subs-table .col-client-sub { min-width: 14rem; max-width: 22rem; }
.sub-client-actions {
  display: flex;
  gap: .4rem;
  margin-top: .45rem;
}
.sub-client-actions form { margin: 0; }
.subs-table .col-period { white-space: nowrap; min-width: 7.5rem; }
.subs-table .col-link,
.subs-table .col-notify { white-space: nowrap; }
.sub-notify-form {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-width: 10.5rem;
  margin: 0;
}
.sub-notify-form select {
  font-size: .82rem;
  max-width: 12rem;
}
.email-preview-modal { max-width: min(760px, calc(100% - 2rem)); width: 760px; }
.email-preview-card label { display: block; margin: .65rem 0; }
.email-preview-addrs {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: .75rem;
}
@media (max-width: 800px) {
  .email-preview-addrs { grid-template-columns: 1fr; }
}
.email-quill .ql-toolbar.ql-snow {
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  background: #f7f2e8;
}
.email-quill .ql-container.ql-snow {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #fff;
  min-height: 18rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  line-height: 1.55;
}
.email-quill .ql-editor { min-height: 18rem; }
@media (max-width: 1100px) {
  .subs-table .col-addons,
  .subs-table .col-emails { display: none; }
}

.portal-body .wrap { max-width: 980px; padding-top: 2rem; padding-bottom: 3rem; }
.portal-sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 2rem 2.1rem 1.6rem;
}
.portal-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding-bottom: 1.4rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}
.portal-party { font-size: .92rem; line-height: 1.45; color: var(--muted); }
.portal-party p { margin: 0 0 .15rem; }
.portal-party a { color: var(--ink); }
.portal-logo { display: block; height: 2.6rem; width: auto; margin-bottom: .75rem; }
.portal-kicker {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .4rem !important;
}
.portal-party-name { color: var(--ink); font-weight: 700; font-size: 1.05rem; margin-bottom: .25rem !important; }
.portal-party--client { text-align: right; }
.portal-intro h1 { margin: 0 0 .35rem; font-size: 1.25rem; }
.portal-intro { margin-bottom: 1.1rem; }
.portal-table-wrap { overflow-x: auto; }
.portal-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.portal-table th {
  text-align: left;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  padding: .55rem .45rem;
  border-bottom: 1px solid var(--line);
}
.portal-table td {
  padding: .7rem .45rem;
  border-bottom: 1px solid #eee7d8;
  vertical-align: top;
}
.portal-table tfoot td {
  border-bottom: 0;
  padding-top: .9rem;
  font-weight: 650;
}
.portal-pay-cell form { margin: 0; }
.portal-pay-cell .btn { padding: .4rem .75rem; font-size: .82rem; white-space: nowrap; }
.btn-viva {
  background: #1a1a2e;
  color: #fff;
  border: 0;
}
.btn-viva:hover { filter: brightness(1.12); }
.portal-pay-all {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.15rem;
  padding: 1rem 1.15rem;
  background: #f7f3ea;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.btn-viva-lg { padding: .75rem 1.25rem; font-size: 1rem; font-weight: 700; }
@media (max-width: 720px) {
  .portal-pay-all { flex-direction: column; align-items: stretch; }
  .portal-pay-all .btn { width: 100%; }
}
.portal-grace {
  margin-top: 1rem;
  padding: .75rem 1rem;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 10px;
  font-size: .88rem;
}
.portal-footnote {
  margin: 1.4rem 0 0;
  font-size: .82rem;
  color: var(--muted);
}
@media (max-width: 720px) {
  .portal-sheet { padding: 1.25rem 1rem 1.1rem; }
  .portal-parties { grid-template-columns: 1fr; gap: 1.25rem; }
  .portal-party--client { text-align: left; }
}
.dash-section { margin-bottom: 1.25rem; }
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 900px) {
  .dash-two-col { grid-template-columns: 1fr; }
}
.dash-month-list { display: flex; flex-direction: column; gap: .45rem; }
.dash-month-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 6.2rem 2.2rem;
  gap: .65rem;
  align-items: center;
}
.dash-month-row.is-current .dash-month-name { font-weight: 700; color: var(--accent); }
.dash-month-name { font-size: .85rem; }
.dash-month-bar-wrap {
  height: .7rem;
  background: #efe8da;
  border-radius: 999px;
  overflow: hidden;
}
.dash-month-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  min-width: 0;
}
.dash-month-row.is-current .dash-month-bar { background: #0b4d37; }
.dash-month-eur { text-align: right; font-size: .88rem; font-weight: 650; }
.dash-month-cnt { text-align: right; font-size: .78rem; }
.subs-table .col-days-left { white-space: nowrap; min-width: 7rem; }
.days-left { font-weight: 650; }
.days-left--soon { color: #b45309; }
.days-left--today,
.days-left--overdue { color: var(--danger); }

/* Domain chips in subscription client column */
.sub-domains-list {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .4rem;
  margin: .35rem 0 .1rem;
}
.sub-domain-chip {
  font-size: .72rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .05rem .35rem;
  white-space: nowrap;
}
.sub-domains-dd { position: static; display: inline-flex; }
.sub-domains-more {
  padding: .05rem .4rem !important;
  border: 1px solid var(--line) !important;
  background: #fff !important;
  border-radius: 5px !important;
  font-size: .72rem !important;
  font-weight: 650 !important;
  color: var(--ink) !important;
  gap: .15rem !important;
  line-height: 1.3;
}
.sub-domains-menu {
  min-width: 13rem;
  max-width: 22rem;
  max-height: min(70vh, 22rem);
  overflow-y: auto;
}
.sub-domain-menu-item {
  display: block;
  padding: .35rem .65rem;
  font-size: .78rem;
  color: var(--ink);
}
