/* Theme variables are loaded dynamically from Default.css, Dark.css, or Cyberpunk.css */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

[v-cloak] {
  display: none;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.small-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  text-decoration: none;
}

button:hover,
.ghost-button:hover {
  border-color: var(--brand);
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 10px;
  color: var(--text);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(253, 181, 40, 0.18);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

code {
  background: #edf1f2;
  border-radius: 4px;
  padding: 2px 5px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: #1f2d2f;
  color: #f7fbfa;
  padding: 22px 18px;
  max-height: 100vh;
  overflow-y: auto;
}

.client-shell {
  grid-template-columns: 270px minmax(0, 1fr);
}

.client-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  z-index: 30;
}

.client-main {
  grid-column: 2;
}

.progress-track {
  background: var(--surface-2);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
  margin: 16px 0;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.progress-bar {
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 8px;
}

.admin-sidebar {
  background: #263044;
}

.admin-shell {
  grid-template-columns: 270px minmax(0, 1fr);
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  z-index: 30;
}

.admin-main {
  grid-column: 2;
  min-height: 100vh;
}

.admin-main-auth {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.admin-main-content {
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
}

.admin-page-glyph {
  font-size: 14px;
  font-weight: 800;
}

.admin-main .topbar {
  justify-content: space-between;
}

.admin-main .topbar-context {
  max-width: 520px;
}

.admin-main .auth-panel {
  width: min(100%, 480px);
  margin: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--brand);
  color: #1e2528;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-section {
  display: grid;
  gap: 6px;
}

.nav-list a,
.nav-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  border: 0;
  background: transparent;
  text-decoration: none;
  border-radius: 6px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
}

.nav-group {
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  padding: 12px 12px 4px;
  text-transform: uppercase;
}

.nav-list a.active,
.nav-list button.active,
.nav-list a:hover,
.nav-list button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.account-switcher,
.site-switcher {
  position: relative;
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8125rem;
}

.account-select-button,
.site-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  text-align: left;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.account-select-button:hover,
.site-select-button:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.account-select-menu,
.site-select-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #1e2b2d;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  max-height: 280px;
  overflow-y: auto;
}

.account-menu-header {
  padding: 4px 8px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
}

.site-select-menu input {
  min-height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.site-select-menu input::placeholder {
  color: rgba(255, 255, 255, 0.56);
}

.account-option,
.site-option {
  display: grid;
  gap: 2px;
  justify-items: start;
  width: 100%;
  height: auto;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  padding: 8px 10px;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
}

.account-option-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
}

.account-plan-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(36, 150, 237, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.account-option small,
.site-option small {
  max-width: 100%;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.6);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-option.active,
.account-option:hover,
.site-option.active,
.site-option:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.user-menu-section {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-menu-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 4px 4px;
}

.user-menu-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, rgba(255, 255, 255, 0.5));
}

.user-menu-account-count {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2, rgba(255, 255, 255, 0.08));
  color: var(--muted, rgba(255, 255, 255, 0.7));
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
}

.user-menu-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-menu-account-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  color: var(--text, #fff);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-menu-account-btn:hover {
  background: var(--surface-3, rgba(255, 255, 255, 0.08));
  border-color: var(--line-subtle, rgba(255, 255, 255, 0.18));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-menu-account-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

.user-menu-account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted, rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.user-menu-account-avatar .icon {
  width: 16px;
  height: 16px;
}

.user-menu-account-btn.active .user-menu-account-avatar {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.45);
}

.user-menu-account-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.user-menu-account-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-menu-account-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-account-id {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted, rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.2;
}

.user-menu-account-btn.active .user-menu-account-id {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}

.user-menu-account-sub {
  font-size: 0.72rem;
  color: var(--muted, rgba(255, 255, 255, 0.55));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-account-active-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
  flex-shrink: 0;
}

.user-menu-check {
  width: 13px;
  height: 13px;
  color: #ffffff;
}

.main {
  padding: 0;
  min-width: 0;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line), 0 4px 12px rgba(0,0,0,0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Page context (left) ─────────────────────────────────────── */
.topbar-context {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 260px;
}

.topbar-page-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-tint);
  color: var(--brand-strong);
  flex-shrink: 0;
}

.topbar-page-icon .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.topbar-page-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.topbar-page-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar-page-title {
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.topbar-page-desc {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* ── Global search (center, grows) ──────────────────────────── */
.global-search {
  position: relative;
  flex: 1 1 auto;
  max-width: 480px;
  margin: 0 auto;
}

.search-icon-wrap {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  color: var(--muted);
  pointer-events: none;
}

.search-icon-wrap .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.search-input,
.global-search input {
  width: 100%;
  min-height: 36px;
  padding: 0 60px 0 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.search-input:focus,
.global-search input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.search-input::placeholder,
.global-search input::placeholder {
  color: var(--muted);
  font-size: 13px;
}

.search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-family: inherit;
  line-height: 1;
  pointer-events: none;
  letter-spacing: 0;
}

.search-results {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
}

.search-results button {
  display: grid;
  grid-template-columns: minmax(58px, auto) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border-radius: 6px;
  text-align: left;
  border: 0;
  background: transparent;
}

.search-results button:hover {
  background: var(--surface-2);
}

.search-result-type {
  grid-column: 1;
  grid-row: 1 / 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  width: auto;
  height: 26px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--brand-tint);
  color: var(--brand-strong);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.search-results button strong {
  grid-column: 2;
  grid-row: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
}

.search-results button small {
  grid-column: 2;
  grid-row: 2;
  font-size: 11px;
  color: var(--muted);
}

/* ── Topbar right actions ─────────────────────────────────────── */
.topbar-actions {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── User trigger button ─────────────────────────────────────── */
.user-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 10px 0 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  max-width: 220px;
}

.user-trigger:hover {
  border-color: var(--brand);
  background: var(--brand-tint);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent);
}

.user-avatar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: 0;
}

.user-trigger-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
}

.user-trigger-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  max-width: 140px;
}

.user-trigger-role {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.2;
}

.user-chevron-icon {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 2.5 !important;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── User dropdown menu ──────────────────────────────────────── */
.user-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  right: 0;
  width: 285px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18), 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
}

.user-avatar-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

.user-menu-info {
  min-width: 0;
}

.user-menu-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.user-menu-info small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.user-menu-divider {
  height: 1px;
  background: var(--line);
  margin: 0;
}

.user-menu-nav {
  padding: 6px;
  display: grid;
  gap: 2px;
}

.user-menu-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.user-menu-nav button:hover {
  background: var(--surface-2);
}

.user-menu-nav button .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.user-menu-signout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 0 16px;
  margin: 6px 0;
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.user-menu-signout:hover {
  background: var(--surface-2);
}

.user-menu-signout .icon {
  width: 15px;
  height: 15px;
}

/* page content below topbar */
.client-main-content {
  padding: 24px;
}



h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 28px;
}

h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

h3 {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 15px;
}

h3 .icon {
  color: var(--brand);
}

.section-head p,
.muted,
small {
  color: var(--muted);
}

.panel,
.metric,
.status-banner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
  margin-bottom: 18px;
}

.page-stack {
  display: grid;
  gap: 18px;
}

.anchor-panel {
  scroll-margin-top: 18px;
}

.auth-panel {
  max-width: 480px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* ── Premium Hosting Plan Cards ─────────────────────────────── */
.premium-plan-hero {
  padding: 32px 40px;
  background: linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--brand) 8%, var(--surface)) 100%);
  border-radius: 20px;
  border: 1px solid var(--line);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.premium-plan-hero .plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--brand-tint);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
  width: fit-content;
}

.premium-plan-hero .plan-badge .icon {
  width: 14px;
  height: 14px;
}

.premium-plan-hero h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.02em;
}

.premium-plan-hero p {
  color: var(--muted);
  font-size: 15px;
  max-width: 600px;
}

.premium-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}

.premium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s;
}

.premium-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.08);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}

.premium-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  background: color-mix(in srgb, var(--surface-2) 40%, transparent);
}

.premium-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 40%, transparent);
}

.premium-card-icon .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.premium-card-header h3 {
  font-size: 16px;
  font-weight: 650;
  margin: 0;
  color: var(--text);
  flex-grow: 1;
}

.premium-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
}

.premium-btn:hover {
  background: var(--brand);
  color: var(--brand-ink);
  border-color: var(--brand);
}

.premium-card-body {
  padding: 24px;
  flex-grow: 1;
}

.premium-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.premium-list.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 20px;
  column-gap: 16px;
}

.premium-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.premium-item.col-span-2 {
  grid-column: 1 / -1;
}

.premium-item-col {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.premium-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  flex-shrink: 0;
}

.premium-item-icon .icon {
  width: 16px;
  height: 16px;
}

.premium-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
  min-width: 0;
}

.premium-item-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.premium-item-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.premium-item-value a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s;
}

.premium-item-value a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.premium-item-metric {
  align-items: stretch;
  gap: 10px;
}

.premium-item-metric-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.premium-usage {
  width: 100%;
  display: grid;
  gap: 6px;
}

.premium-usage-track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 72%, transparent);
  overflow: hidden;
}

.premium-usage-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--usage-fill-start), var(--usage-fill-end));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--usage-fill-end) 22%, transparent);
  transition: width 0.35s ease;
}

.premium-usage-fill.is-empty {
  background: linear-gradient(90deg, color-mix(in srgb, var(--muted) 60%, transparent), color-mix(in srgb, var(--muted) 20%, transparent));
  box-shadow: none;
}

.premium-usage.low {
  --usage-fill-start: #4ade80;
  --usage-fill-end: #22c55e;
}

.premium-usage.warn {
  --usage-fill-start: #facc15;
  --usage-fill-end: #eab308;
}

.premium-usage.elevated {
  --usage-fill-start: #fb923c;
  --usage-fill-end: #f97316;
}

.premium-usage.critical {
  --usage-fill-start: #fb7185;
  --usage-fill-end: #ef4444;
}

.premium-usage.neutral {
  --usage-fill-start: #94a3b8;
  --usage-fill-end: #64748b;
}

.premium-usage-meta {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Make grid columns span nicely */
.premium-card.full-span {
  grid-column: 1 / -1;
}

.ns-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.files-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.file-access-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 40px 24px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  border: 1px solid var(--line);
}

.file-access-card:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  border-color: var(--brand);
}

.file-access-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.large-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--brand-tint);
  color: var(--brand-strong);
}

.large-icon .icon {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
}

.file-access-card h3 {
  font-size: 16px;
  margin: 0;
  line-height: 1.4;
}


.advanced-panel {
  margin-top: 18px;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.tool-tile {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.feature-panel {
  display: grid;
  gap: 10px;
  justify-items: start;
  max-width: 720px;
}

.feature-panel > .icon {
  width: 34px;
  height: 34px;
  color: var(--brand);
}

.resource-panel {
  display: grid;
  gap: 14px;
}

.performance-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.refresh-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--brand) 65%, var(--line));
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 30%, var(--surface)) 0%, color-mix(in srgb, var(--brand) 18%, var(--surface)) 100%);
  color: var(--brand);
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 16%, transparent), 0 6px 16px rgba(0,0,0,0.06);
}

.refresh-btn:hover:not(:disabled) {
  color: var(--brand-ink);
  border-color: color-mix(in srgb, var(--brand) 82%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 42%, var(--surface)) 0%, color-mix(in srgb, var(--brand) 28%, var(--surface)) 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 28%, transparent), 0 8px 20px rgba(0,0,0,0.08);
}

.refresh-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.refresh-btn.is-loading {
  animation: refreshPulse 1.4s ease-in-out infinite;
}

.refresh-btn.is-loading .icon {
  animation: refreshSpin 0.8s linear infinite;
  transform-origin: 50% 50%;
}

.refresh-btn .icon {
  width: 16px;
  height: 16px;
}

@keyframes refreshSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes refreshPulse {
  0%, 100% {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 16%, transparent), 0 6px 16px rgba(0,0,0,0.06);
  }
  50% {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 28%, transparent), 0 0 18px color-mix(in srgb, var(--brand) 18%, transparent);
  }
}

.range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.range-tabs button {
  min-height: 32px;
  padding: 0 10px;
}

.range-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.resource-chart-wrap {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
  padding: 16px;
}

.resource-chart {
  width: 100%;
  height: 230px;
  display: block;
}

.resource-chart line {
  stroke: var(--line);
  stroke-width: 1;
}

.resource-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.resource-fill {
  fill: currentColor;
  opacity: 0.08;
}

.resource-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.resource-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.resource-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.analytics-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.analytics-toolbar h2 {
  margin-bottom: 4px;
}

.analytics-toolbar p {
  margin-bottom: 0;
  color: var(--muted);
}

.analytics-domain-control {
  width: min(320px, 100%);
}

.analytics-metrics .metric strong {
  overflow-wrap: anywhere;
}

.analytics-panel {
  display: grid;
  gap: 14px;
}

.analytics-ranking {
  counter-reset: analytics-rank;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.analytics-ranking li {
  counter-increment: analytics-rank;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.analytics-ranking li::before {
  content: counter(analytics-rank);
  color: var(--muted);
  font-weight: 700;
}

.analytics-ranking span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.analytics-summary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.analytics-summary-list div {
  display: grid;
  gap: 6px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.analytics-summary-list span {
  color: var(--muted);
}

.analytics-summary-list strong {
  font-size: 24px;
}

.metric {
  padding: 16px;
  display: grid;
  gap: 5px;
}

.metric > .icon {
  width: 24px;
  height: 24px;
  color: var(--brand);
}

.metric span,
.metric small {
  color: var(--muted);
}

.metric strong {
  font-size: 24px;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 12px;
}

.inline-form,
.incident-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
}

.git-deploy-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted, var(--surface));
}

.git-deploy-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.git-deploy-form input,
.git-deploy-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.git-deploy-form small { color: var(--muted); font-weight: 400; }
.git-deploy-form-actions { display: flex; align-items: end; }

@media (max-width: 760px) {
  .git-deploy-form { grid-template-columns: 1fr; }
}

.database-crud-grid {
  display: grid;
  gap: 20px;
}

.database-table-card {
  width: 100%;
  min-width: 0;
}

.database-table-card .table-wrap {
  width: 100%;
  overflow-x: auto;
}

.database-page-header { justify-content: flex-start; margin-bottom: 1.5rem; text-align: left; }
.database-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  flex-wrap: wrap;
}
.database-table-actions { display: flex; align-items: flex-end; justify-content: flex-end; gap: .75rem; flex-wrap: wrap; }
.database-domain-filter { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.database-domain-filter select { min-height: 38px; min-width: 180px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.database-website-label { color: var(--text); font-size: 13px; }

@media (max-width: 700px) {
  .database-page-actions { width: 100%; justify-content: stretch; }
  .database-page-actions button { flex: 1 1 180px; justify-content: center; }
  .database-table-card > div:first-child { align-items: stretch !important; flex-direction: column; }
  .database-table-actions { justify-content: stretch; }
  .database-domain-filter, .database-domain-filter select, .database-table-actions .primary-button { width: 100%; }
}

.premium-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0,0,0,0.02);
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.premium-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0,0,0,0.03);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.05);
  border-radius: 16px;
  padding: 24px;
}

.pill-tabs {
  display: flex;
  gap: 8px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.pill-tabs button {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s;
  flex: 1;
}

.pill-tabs button:hover {
  color: var(--text);
}

.pill-tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.db-inline-form {
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto;
}

.grant-form {
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) 150px auto;
}

.primary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.danger-button .icon {
  width: 16px;
  height: 16px;
}

.incident-form {
  grid-template-columns: 1.2fr 150px 1.4fr auto;
}

.admin-create-form {
  grid-template-columns: 1fr 1fr 150px 1fr auto;
  margin-bottom: 14px;
}

.client-selector {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 4px 0 18px;
}

.client-selector label {
  display: grid;
  gap: 6px;
  min-width: min(520px, 100%);
}

.client-selector small {
  padding-bottom: 10px;
}

.plan-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
}

.plan-dns-provider-picker {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--brand) 12%);
}

.plan-dns-provider-picker .form-label {
  font-weight: 700;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.checkbox-option input {
  width: auto;
}

.form-help {
  color: var(--muted);
  font-size: 0.82rem;
}

.dns-provider-switch-modal {
  max-width: 520px;
}

.plan-submit {
  min-height: 38px;
}

.plan-account-update {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.plan-account-update input {
  width: auto;
}

@media (max-width: 720px) {
  .premium-list.grid-2 {
    grid-template-columns: 1fr;
  }
}

.plan-table {
  margin-top: 16px;
}

.client-table select,
.client-table input {
  min-width: 150px;
}

.client-edit {
  display: grid;
  gap: 8px;
}

.account-manage-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
}

.account-manage-row + .account-manage-row {
  border-top: 1px solid var(--line);
}

.client-actions {
  display: flex;
  gap: 8px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.primary-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.danger-button {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.danger-button:hover {
  background: #8f1f19;
  border-color: #8f1f19;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 0 12px;
  text-decoration: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td small {
  display: block;
  margin-top: 4px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.website-table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}

.website-table-toolbar > small { color: var(--muted); white-space: nowrap; }

.website-table-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 460px);
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 11px;
}

.website-table-search .icon { width: 17px; height: 17px; }
.website-table-search input { min-height: 38px; border: 0; padding: 0; background: transparent; }
.website-table-search input:focus { box-shadow: none; }
.nameserver-list small + small { margin-top: 5px; }
.website-status-detail { color: var(--muted); }
.website-status-error { color: var(--color-danger, #ef4444); }
.website-status-error-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 2px 5px;
  border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 28%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--danger, #dc2626) 8%, transparent);
  color: var(--danger, #dc2626);
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.website-status-error-button .icon { width: 14px; height: 14px; flex: 0 0 auto; }
.website-status-error-button:hover,
.website-status-error-button:focus-visible { background: color-mix(in srgb, var(--danger, #dc2626) 16%, transparent); border-color: var(--danger, #dc2626); }
.website-error-overlay { z-index: 1300; }
.website-error-panel { max-width: 720px; }
.website-error-summary { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--danger, #dc2626); }
.website-error-summary .icon { width: 19px; height: 19px; flex: 0 0 auto; }
.website-error-detail {
  max-height: 330px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 24%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--danger, #dc2626) 5%, var(--surface-2));
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.55 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

.table-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
}

.table-icon-button .icon { width: 16px; height: 16px; }
.table-icon-button:hover { border-color: var(--brand); color: var(--brand); }
.table-icon-button-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.table-icon-button-primary:hover { background: var(--brand-dark, var(--brand)); border-color: var(--brand-dark, var(--brand)); color: #fff; }
.table-icon-button-active { background: var(--success, #16a34a); border-color: var(--success, #16a34a); color: #fff; }
.table-icon-button-active:hover { background: var(--success-ink, #15803d); border-color: var(--success-ink, #15803d); color: #fff; }
.table-icon-button-danger:hover { color: var(--color-danger, #ef4444); border-color: var(--color-danger, #ef4444); }

.client-js-tooltip {
  position: fixed;
  z-index: 100000;
  max-width: 240px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #172033;
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  white-space: normal;
}

/* Let the website table use all available space in its container. */
.website-table {
  width: 100%;
  table-layout: auto;
  min-width: 0;
}
.website-table th,
.website-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.website-table .actions {
  align-items: center;
  flex-wrap: wrap;
  white-space: normal;
}

.website-table .table-icon-button {
  flex: 0 0 auto;
}

.table-action-menu { position: relative; display: inline-block; }
.table-action-menu > summary { list-style: none; }
.table-action-menu > summary::-webkit-details-marker { display: none; }
.table-action-menu-ellipsis { font-size: 21px; line-height: 1; font-weight: 700; }
.table-action-menu-panel { position: absolute; z-index: 20; top: calc(100% + 5px); right: 0; min-width: 120px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.table-action-menu-panel button { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 32px; padding: 5px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--color-danger, #ef4444); cursor: pointer; font: inherit; text-align: left; }
.table-action-menu-panel button:hover { background: color-mix(in srgb, var(--color-danger, #ef4444) 10%, transparent); }
.table-action-menu-panel .icon { width: 15px; height: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.website-list-row { cursor: pointer; }
.website-list-row:focus { outline: 2px solid var(--brand); outline-offset: -2px; }
.website-list-row:hover > td { background: var(--surface-muted); }
.website-domain-link { color: inherit; text-decoration: none; }
.website-domain-link:hover,
.website-domain-link:focus { color: var(--brand); text-decoration: underline; }

.website-detail-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.website-detail-header h2 { margin: 4px 0; }
.website-detail-header p { margin: 0; color: var(--muted); }
.website-detail-back { padding: 0; font-size: 13px; }
.website-detail-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.website-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.website-detail-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--surface); }
.website-detail-card h3, .website-detail-actions h3 { margin: 0 0 14px; font-size: 15px; }
.website-detail-card dl { margin: 0; display: grid; gap: 12px; }
.website-detail-card dl > div { display: grid; gap: 3px; }
.website-detail-card dt { color: var(--muted); font-size: 12px; }
.website-detail-card dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.site-ssl-detail-list { margin: 0; display: grid; gap: 14px; }
.site-ssl-detail-list > div { display: grid; gap: 4px; }
.site-ssl-detail-list dt { color: var(--muted); font-size: 12px; }
.site-ssl-detail-list dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.website-detail-path { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px !important; }
.website-detail-subdomain-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 9px; }
.website-detail-subdomain-list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.website-detail-subdomain-list small { display: block; color: var(--muted); margin-top: 2px; }
.website-detail-subdomain-list .ghost-button { min-height: 30px; padding: 0 8px; font-size: 12px; }
.website-detail-subdomains > .muted { min-height: 39px; margin: 0 0 12px; }
.website-detail-actions { margin-top: 22px; }
.website-detail-action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.website-detail-action-grid > button { display: grid; grid-template-columns: 21px 1fr; column-gap: 8px; align-items: center; text-align: left; min-height: 74px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; color: var(--text); }
.website-detail-action-grid > button:hover { border-color: var(--brand); color: var(--brand); }
.website-detail-action-grid .icon { width: 18px; height: 18px; }
.website-detail-action-grid span { font-weight: 650; }
.website-detail-action-grid small { grid-column: 2; color: var(--muted); font-size: 12px; line-height: 1.3; }
.website-detail-action-grid .website-detail-action-danger:hover { border-color: var(--color-danger, #ef4444); color: var(--color-danger, #ef4444); }

@media (max-width: 900px) { .website-detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .website-detail-header { flex-direction: column; } .website-detail-action-grid { grid-template-columns: 1fr; } }

@media (max-width: 640px) {
  .website-table-toolbar { align-items: flex-start; flex-direction: column; }
  .website-table-search { width: 100%; }
}

.service-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  text-decoration: none;
  color: var(--accent-dark);
  background: #f8fbfa;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 9px;
  font-size: 12px;
  white-space: nowrap;
}

.clean-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean-list li {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.clean-list strong {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.clean-list strong .icon {
  color: var(--accent);
}

.sync-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.sync-list small {
  grid-column: 1 / -1;
}

.activity-sync-grid {
  display: grid;
  gap: 16px;
}

.job-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 8px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.job-status-succeeded {
  background: #e9f7ef;
  border-color: #b8e3c8;
  color: #166534;
}

.job-status-running,
.job-status-queued {
  background: #eef6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.job-status-failed {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.clean-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.warning-panel {
  border-color: #f0c98d;
  background: #fff9ed;
}

/* ─── Backups page ─────────────────────────────────────────────── */
.backup-page { color: var(--text); padding: 4px 0 34px; }
.backup-breadcrumb { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 2px 0 34px; }
.backup-breadcrumb .icon { width: 20px; height: 20px; color: var(--brand-strong); }
.backup-breadcrumb strong { color: var(--text); }
.backup-page-title { font-size: clamp(30px, 4vw, 42px); font-weight: 650; letter-spacing: -.8px; margin: 0 0 32px; }
.backup-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin: 0 0 30px; padding: 0 8px; }
.backup-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 6px 6px 0 0; background: transparent; color: var(--muted); font-size: 15px; font-weight: 650; padding: 0 18px 16px; cursor: pointer; }
.backup-tabs button.active { color: var(--brand-strong); border-bottom-color: var(--brand); }
.backup-notice { display: flex; align-items: center; gap: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 22px; color: var(--text); }
.backup-notice > .icon { flex: 0 0 26px; width: 26px; height: 26px; }
.backup-notice strong { font-size: 16px; }
.backup-notice p { margin: 5px 0 0; color: var(--muted); }
.backup-notice-date { margin-left: auto; color: var(--muted); white-space: nowrap; }
.backup-notice-warning { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); background: color-mix(in srgb, var(--brand-tint) 55%, var(--surface)); }
.backup-summary-card, .backup-feature-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.backup-summary-card { display: flex; align-items: center; gap: 24px; padding: 24px 30px; margin-bottom: 22px; }
.backup-card-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); flex: 0 0 auto; }
.backup-card-icon .icon { width: 28px; height: 28px; color: var(--brand-strong); }
.backup-card-icon-gradient { background: var(--brand-tint); }
.backup-card-icon-gradient .icon { color: var(--brand-strong); }
.backup-summary-copy { flex: 1; }
.backup-summary-copy h2 { margin: 0 0 4px; font-size: 23px; }
.backup-summary-copy p, .backup-feature-card p { margin: 0; color: var(--muted); font-size: 15px; }
.backup-latest { color: var(--muted); font-size: 14px; white-space: nowrap; }
.backup-latest strong { color: var(--text); }
.backup-primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--brand-strong); border-radius: 8px; background: var(--brand); color: var(--text); padding: 10px 18px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.backup-primary-button:hover { filter: brightness(.96); }
.backup-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.backup-feature-card { min-height: 270px; padding: 26px 30px; display: flex; flex-direction: column; align-items: flex-start; }
.backup-feature-card h3 { margin: 22px 0 12px; font-size: 18px; }
.backup-feature-card p { line-height: 1.55; }
.backup-outline-button { margin-top: auto; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; color: var(--brand-strong); padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
.backup-outline-button:hover { border-color: var(--brand); background: var(--brand-tint); }
.backup-schedule-badge { display: inline-block; margin-left: 8px; padding: 4px 9px; border-radius: 999px; color: var(--brand-strong); background: var(--brand-tint); font-size: 12px; vertical-align: middle; }
.backup-next { margin-top: auto; color: var(--muted); font-size: 14px; }
.backup-next strong { color: var(--text); }
.backup-list-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.backup-list-header h2 { margin: 0 0 5px; font-size: 23px; }
.backup-list-header p { margin: 0; color: var(--muted); }
.backup-site-filter { display: block; max-width: 360px; margin-bottom: 18px; }
.backup-table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.backup-table-wrap table { margin: 0; }
.restore-error { display: block; max-width: 220px; margin-top: 4px; color: var(--danger, #dc2626); white-space: normal; }

.cron-page { color: var(--text); padding: 4px 0 34px; }
.cron-create-card, .cron-table-wrap, .cron-output-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.cron-card-heading { padding: 26px 30px 22px; border-bottom: 1px solid var(--line); }
.cron-card-heading h1, .cron-list-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 32px); font-weight: 650; letter-spacing: -.35px; }
.cron-card-heading p, .cron-list-heading p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.cron-form-body { padding: 28px 30px 30px; }
.cron-mode-toggle { display: flex; gap: 30px; margin-bottom: 28px; }
.cron-mode-toggle label { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 17px; cursor: pointer; }
.cron-mode-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.cron-radio { width: 20px; height: 20px; border: 2px solid var(--brand); border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 4px var(--surface); background: transparent; }
.cron-mode-toggle input:checked + .cron-radio { background: var(--brand); }
.cron-field-label { display: block; margin: 0 0 9px; color: var(--text); font-size: 15px; font-weight: 650; }
.cron-command-field { display: flex; min-height: 48px; margin-bottom: 25px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.cron-command-prefix { display: flex; align-items: center; padding: 0 16px; color: var(--muted); background: var(--surface-2); border-right: 1px solid var(--line); font: 14px var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); white-space: nowrap; }
.cron-command-field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 0 16px; font: inherit; outline: 0; }
.cron-common-select, .cron-schedule-grid select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); padding: 0 13px; font: inherit; }
.cron-schedule-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.cron-schedule-grid label { color: var(--text); font-size: 14px; font-weight: 650; }
.cron-schedule-grid select { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.cron-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 26px; }
.cron-form-footer code { color: var(--muted); font-size: 13px; }
.cron-list-heading { margin: 34px 0 16px; }
.cron-table-wrap { overflow: auto; }
.cron-table-wrap table { min-width: 860px; margin: 0; }
.cron-table-wrap td code { display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cron-table-wrap td small { display: block; margin-top: 4px; color: var(--muted); }
.cron-output-card { margin-top: 18px; padding: 18px 22px; }
.cron-output-card > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cron-output-card h3 { margin: 0; font-size: 16px; }
.cron-output-card pre { max-height: 280px; overflow: auto; margin: 14px 0 0; padding: 14px; border-radius: 8px; background: var(--surface-2); color: var(--text); white-space: pre-wrap; font: 13px/1.5 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); }
.ftp-page { color: var(--text); padding: 4px 0 34px; }
.ftp-access-card, .ftp-create-card, .ftp-list-card, .ftp-help-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.ftp-card-heading { padding: 26px 30px 22px; border-bottom: 1px solid var(--line); }
.ftp-card-heading h1, .ftp-card-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 32px); font-weight: 650; letter-spacing: -.35px; }
.ftp-card-heading h2 { font-size: 22px; }
.ftp-card-heading p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.ftp-detail-row { display: grid; grid-template-columns: minmax(180px, 42%) 1fr; align-items: center; min-height: 72px; padding: 0 30px; border-bottom: 1px solid var(--line); }
.ftp-detail-row:last-child { border-bottom: 0; }
.ftp-detail-row > span { color: var(--muted); font-size: 16px; }
.ftp-detail-row strong { font-size: 16px; }
.ftp-copy-button { border: 0; background: transparent; color: var(--brand-strong); font-size: 22px; cursor: pointer; vertical-align: middle; }
.ftp-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 22px 0; }
.ftp-help-card { min-height: 190px; padding: 25px 28px; }
.ftp-help-card h2 { margin: 0 0 12px; font-size: 20px; }
.ftp-help-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.ftp-help-note { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 13px; }
.ftp-outline-button { margin-top: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--brand-strong); padding: 10px 15px; font-weight: 650; cursor: pointer; }
.ftp-outline-button:hover { border-color: var(--brand); background: var(--brand-tint); }
.ftp-form-body { padding: 26px 30px 30px; }
.ftp-form-body label { display: block; margin: 0 0 8px; color: var(--text); font-size: 14px; font-weight: 650; }
.ftp-path-field { display: flex; min-height: 48px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.ftp-path-field span { display: flex; align-items: center; padding: 0 14px; background: var(--surface-2); color: var(--muted); white-space: nowrap; font-size: 13px; }
.ftp-path-field input, .ftp-form-grid input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); padding: 0 14px; min-height: 48px; font: inherit; }
.ftp-path-field input { border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.ftp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ftp-form-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 25px; color: var(--muted); font-size: 13px; }
.ftp-account-list { padding: 6px 30px; }
.ftp-account-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.ftp-account-row:last-child { border-bottom: 0; }
.ftp-account-row strong, .ftp-account-row small { display: block; }
.ftp-account-row small { margin-top: 4px; color: var(--muted); }
.ftp-empty-state { padding: 28px 30px; color: var(--muted); }
@media (max-width: 720px) {
  .ftp-card-heading, .ftp-form-body, .ftp-account-list { padding-left: 20px; padding-right: 20px; }
  .ftp-detail-row { grid-template-columns: 1fr; gap: 5px; padding: 15px 20px; }
  .ftp-help-grid, .ftp-form-grid { grid-template-columns: 1fr; }
  .ftp-path-field span { max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
  .ftp-form-footer { align-items: flex-start; flex-direction: column; }
  .ftp-form-footer .primary-button { width: 100%; }
}
@media (max-width: 760px) {
  .cron-card-heading, .cron-form-body { padding-left: 20px; padding-right: 20px; }
  .cron-schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cron-form-footer { align-items: flex-start; flex-direction: column; }
  .cron-form-footer .primary-button { width: 100%; }
}

@media (max-width: 860px) {
  .backup-summary-card { align-items: flex-start; flex-wrap: wrap; padding: 24px; }
  .backup-summary-copy { min-width: calc(100% - 110px); }
  .backup-latest { margin-left: 104px; }
  .backup-card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .backup-page-title { margin-bottom: 26px; }
  .backup-breadcrumb { gap: 7px; margin-bottom: 26px; font-size: 12px; overflow-x: auto; white-space: nowrap; }
  .backup-tabs { gap: 0; padding: 0; margin-bottom: 26px; overflow-x: auto; }
  .backup-tabs button { font-size: 14px; padding: 0 14px 18px; white-space: nowrap; }
  .backup-notice { align-items: flex-start; flex-wrap: wrap; padding: 18px; border-radius: 12px; }
  .backup-notice-date { margin-left: 44px; white-space: normal; }
  .backup-summary-card { gap: 16px; border-radius: 12px; }
  .backup-summary-copy h2 { font-size: 22px; }
  .backup-summary-copy p, .backup-feature-card p { font-size: 15px; }
  .backup-latest { margin-left: 0; width: 100%; }
  .backup-primary-button { width: 100%; }
  .backup-feature-card { min-height: 260px; padding: 24px; border-radius: 12px; }
  .backup-list-header { align-items: flex-start; flex-direction: column; }
}

.message {
  color: var(--info);
  font-weight: 600;
}

.admin-alert {

    position: relative;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel, #f8fbfa);
    padding: 10px 40px 10px 12px;
    margin: 12px 0;
    position: fixed;
    width: 100%;
    top: 50px;
    right: 20px;
    max-width: 600px;
    transition: ease 500ms all;

}

.admin-alert .message {
  margin: 0;
  overflow-wrap: anywhere;
}

.alert-dismiss {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 2px 4px;
}

.alert-dismiss:hover {
  color: var(--text);
}

.secret-box {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 14px;
  margin: 14px 0;
  overflow-wrap: anywhere;
}

.secret-box span {
  color: var(--muted);
  font-size: 13px;
}

.status-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.status-header {
  align-items: center;
}

.back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
}

.status-banner {
  padding: 22px;
  margin-bottom: 18px;
  border-left: 6px solid var(--accent);
}

.status-banner span,
.status-line {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-weight: 800;
  text-transform: capitalize;
}

.status-banner.degraded_performance,
.status-banner.maintenance {
  border-left-color: var(--warning);
}

.status-banner.major_outage,
.status-banner.partial_outage {
  border-left-color: var(--danger);
}

.component-list {
  display: grid;
}

.component-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.component-row:last-child {
  border-bottom: 0;
}

.component-row small {
  display: block;
  margin-top: 4px;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .client-main {
    grid-column: 1;
  }

  .admin-main {
    grid-column: 1;
  }

  .sidebar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
  }

  .client-sidebar {
    position: sticky;
    top: 0;
    width: auto;
    max-height: none;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    width: auto;
    max-height: none;
  }

  .brand {
    margin-bottom: 0;
  }

  .nav-list {
    grid-auto-flow: column;
    overflow-x: auto;
  }

  .nav-section {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .nav-group {
    display: none;
  }

  .metric-grid,
  .two-column,
  .panel-grid,
  .plan-details-grid,
  .plan-list.two-cols {
    grid-template-columns: 1fr;
  }

  .section-head,
  .status-header,
  .analytics-toolbar {
    display: grid;
  }

  .topbar {
    gap: 10px;
    padding: 0 14px;
    height: 54px;
  }

  .topbar-page-desc {
    display: none;
  }

  .user-trigger-role {
    display: none;
  }

  .inline-form,
  .db-inline-form,
  .grant-form,
  .incident-form,
  .admin-create-form,
  .plan-form,
  .account-manage-row {
    grid-template-columns: 1fr;
  }

  .client-actions {
    display: grid;
  }
}

@media (max-width: 560px) {
  .main {
    padding: 18px;
  }

  .sidebar {
    align-items: flex-start;
    display: grid;
  }

  .nav-list {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clean-list li,
  .component-row {
    align-items: flex-start;
    display: grid;
  }
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 18px;
}

.modal-panel {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

/* The subdomain wizard swaps its contents for an absolutely positioned
   building screen while the site is being created. Keep the panel sized
   while that screen is active so the animation remains visible. */
.modal-panel.sw-building {
  height: min(600px, 90vh);
  flex: 0 0 auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.close-button {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
}

.close-button:hover {
  color: var(--text);
  border: none;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-body .form-grid {
  display: grid;
  gap: 12px;
}

.modal-body label {
  margin-bottom: 6px;
}

.modal-body input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  vertical-align: middle;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  flex: 0 0 auto;
}

/* Client dialogs also include a few older layouts that place a form directly
   below the header instead of inside .modal-body. Give those dialogs the same
   padded, independently scrollable content area. */
.client-shell .modal-panel,
.client-shell .modal-card {
  max-height: 90vh;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}

.client-shell .modal-panel > form,
.client-shell .modal-panel > .form-grid,
.client-shell .modal-panel > .modal-content,
.client-shell .modal-panel > .loading-state,
.client-shell .modal-card > form,
.client-shell .modal-card > .form-grid,
.client-shell .modal-card > .modal-content,
.client-shell .modal-card > .loading-state {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
}

.client-shell .modal-panel > .modal-body,
.client-shell .modal-card > .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.client-shell .collaborator-modal-panel > .modal-body {
  padding: 24px;
}

.client-shell .collaborator-modal-panel > .modal-footer {
  padding: 0 24px 24px;
}

.client-shell .tab-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 16px 24px 0;
  border-bottom: 1px solid var(--line);
}

.client-shell .tab-row button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  padding: 9px 12px;
}

.client-shell .tab-row button:hover,
.client-shell .tab-row button.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.client-shell .table-sort-button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 2px 4px;
}

.client-shell .table-sort-button:hover {
  color: var(--accent);
}

.client-shell .expiry-warning { color: #b45309; font-weight: 700; }
.client-shell .expiry-danger { color: #dc2626; font-weight: 700; }

.accent-button {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.accent-button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:disabled:hover {
  border-color: var(--line);
}

/* ─── Empty state ─────────────────────────────────────────── */
.empty-row {
  color: var(--muted);
  text-align: center;
  font-style: italic;
}

.website-table-loading > td {
  display: table-cell;
}

.website-table-loading > td > span {
  display: inline-flex;
  vertical-align: middle;
}

.website-table-loading .sw-spinner {
  margin-right: 8px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 3rem 1rem;
  color: var(--muted);
  text-align: center;
}

.empty-state .icon {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

/* ─── Link button ─────────────────────────────────────────── */
.link-button {
  background: none;
  border: none;
  color: var(--info);
  padding: 0;
  min-height: auto;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

/* ─── Dashboard Welcome Banner ───────────────────────────── */
.dashboard-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #1f2d2f 0%, #2d4246 100%);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 20px;
  color: #fff;
}

.welcome-text h2 {
  margin-bottom: 4px;
  font-size: 22px;
  color: #fff;
}

.welcome-text p {
  margin: 0;
  color: rgba(255,255,255,0.7);
}

.welcome-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.welcome-actions .primary-button {
  background: var(--brand);
  border-color: var(--brand);
  color: #1e2528;
  font-weight: 600;
}

.welcome-actions .primary-button:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

/* ─── Resource Summary Cards ─────────────────────────────── */
.resource-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.resource-summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.resource-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.resource-summary-header .icon {
  color: var(--brand);
  width: 16px;
  height: 16px;
}

.resource-bar-wrap {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.resource-bar {
  height: 100%;
  width: var(--pct, 0%);
  background: linear-gradient(90deg, #15835f, #22c55e);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.resource-bar.warn {
  background: linear-gradient(90deg, #b45309, #f59e0b);
}

.resource-bar.danger {
  background: linear-gradient(90deg, #b3261e, #ef4444);
}

.resource-summary-nums {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.resource-summary-nums strong {
  font-size: 18px;
  font-weight: 700;
}

.resource-summary-nums small {
  font-size: 12px;
}

/* ─── Subdomain DNS consent ─────────────────────────────── */
.subdomain-dns-fieldset {
  display: grid;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 4px 0 0;
}

.subdomain-dns-fieldset legend {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.subdomain-dns-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  background: var(--surface-2);
}

.subdomain-dns-option.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.subdomain-dns-option input {
  margin-top: 3px;
}

.subdomain-dns-option span {
  display: grid;
  gap: 3px;
}

.subdomain-dns-option small,
.subdomain-dns-details p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.subdomain-dns-details {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--brand);
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

.subdomain-dns-details > div:first-child {
  display: grid;
  gap: 4px;
}

.subdomain-dns-record {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.subdomain-dns-record span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.subdomain-dns-record small {
  color: var(--muted);
  font-size: 11px;
}

.subdomain-dns-record code {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .subdomain-dns-record {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ─── MangoPanel Icon Grid ───────────────────────────────────── */
.mangopanel-section-wrap {
  display: grid;
  gap: 24px;
}

.mangopanel-group-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.mangopanel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.mangopanel-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  min-height: 90px;
}

.mangopanel-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-color: var(--tile-color, var(--brand));
}

.mangopanel-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--tile-color, #888) 12%, transparent);
  color: var(--tile-color, var(--brand));
}

.mangopanel-tile-icon .icon {
  width: 22px;
  height: 22px;
}

.mangopanel-tile-label {
  font-size: 11.5px;
  font-weight: 500;
  text-align: center;
  color: var(--text);
  line-height: 1.3;
}

.feature-status-badge,
.mangopanel-tile-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 700;
  line-height: 1;
}

.feature-status-badge {
  min-height: 20px;
  padding: 0 8px;
  font-size: 10.5px;
}

.mangopanel-tile-status {
  min-height: 18px;
  padding: 0 7px;
  font-size: 9.5px;
}

.feature-status-functional {
  background: #e9f7ef;
  border-color: #b8e3c8;
  color: #166534;
}

.feature-status-simulated {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.feature-status-read_only {
  background: #eef6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.feature-status-disabled {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #6b7280;
}

.mangopanel-tile.disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.mangopanel-tile.disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line);
}

/* ─── PHP Switcher ───────────────────────────────────────── */
.php-switcher-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.php-version-select {
  min-width: 110px;
  font-size: 13px;
  background: var(--surface-2);
  border-color: var(--line);
}

.php-switching-indicator {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.php-switch-countdown {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.php-switch-notice {
  margin-top: 10px;
  max-width: 720px;
  font-size: 13px;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* PHP Configuration page */
.php-version-list {
  display: grid;
  gap: 14px;
}

.php-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.php-version-row:last-child {
  border-bottom: 0;
}

.php-version-site strong {
  display: block;
  margin-bottom: 2px;
}

.php-switcher-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.php-version-btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 999px;
  border-color: var(--line);
  background: var(--surface-2);
  font-weight: 500;
  transition: all 0.15s;
}

.php-version-btn.active {
  background: #1f2d2f;
  border-color: #1f2d2f;
  color: #fff;
}

.php-version-btn:hover:not(.active):not(:disabled) {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.php-version-btn.switching {
  opacity: 0.6;
}

/* ─── SSH Info ───────────────────────────────────────────── */
.ssh-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 1.5rem 0;
}

.ssh-info-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 6px;
}

.ssh-info-card label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ssh-info-card code {
  font-size: 14px;
  background: none;
  padding: 0;
  word-break: break-all;
}

.code-block {
  background: #1e2528;
  color: #c8e6d0;
  border-radius: 8px;
  padding: 14px 18px;
  font-family: monospace;
  font-size: 14px;
  overflow-x: auto;
  margin: 0;
}

/* ─── Advanced Tool Header ───────────────────────────────── */
.advanced-tool-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.advanced-tool-header .icon {
  width: 32px;
  height: 32px;
  color: var(--brand);
  flex-shrink: 0;
  margin-top: 4px;
}

.advanced-tool-header h2 {
  margin-bottom: 4px;
}

.advanced-tool-header p {
  margin: 0;
  color: var(--muted);
}

/* ─── Info Box ───────────────────────────────────────────── */
.info-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 14px;
  color: #1e40af;
}

.info-box .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #3b82f6;
}

/* ─── DNS Zone Editor ────────────────────────────────────── */
.dns-domain-bar {
  margin-bottom: 1.5rem;
}

.dns-domain-bar select {
  max-width: 360px;
}

.dns-add-form {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 1rem;
}

.dns-add-form h3 {
  margin-bottom: 12px;
  font-size: 14px;
}

.dns-form {
  grid-template-columns: 80px 1fr 1fr 80px auto;
}

.dns-type-pill {
  font-family: monospace;
  font-weight: 700;
  background: #f0f4ff;
  color: #1d4ed8;
}

.dns-value {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

/* Professional DNS zone editor */
.dns-editor-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.dns-editor-title { display: flex; align-items: center; gap: 14px; }
.dns-editor-title h2 { margin: 2px 0 4px; }
.dns-editor-title p { margin: 0; color: var(--muted); }
.dns-editor-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, #eff6ff, #eef2ff); color: #4f46e5; }
.dns-editor-icon .icon { width: 24px; height: 24px; }
.eyebrow { display: block; color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dns-domain-picker { width: min(100%, 300px); }
.dns-domain-picker span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }

.dns-zone-summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, var(--surface), var(--surface-2)); }
.dns-zone-summary-main { min-width: 0; }
.dns-zone-domain { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.dns-zone-domain .icon { width: 18px; height: 18px; color: var(--brand); }
.dns-zone-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 12px; }
.dns-provider-badge, .dns-state-badge, .dns-routing-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 9px; background: #eef2f7; color: #475569; font-size: 11px; font-weight: 700; }
.dns-provider-badge.cloudflare { background: #fff7ed; color: #c2410c; }
.dns-provider-dot, .dns-routing-pill span { width: 6px; height: 6px; border-radius: 50%; background: #64748b; }
.dns-provider-badge.cloudflare .dns-provider-dot { background: #f97316; }
.dns-state-badge { background: #ecfdf5; color: #047857; }
.dns-nameserver-summary { display: block; margin-top: 10px; color: var(--muted); overflow-wrap: anywhere; }
.dns-zone-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.dns-zone-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; }
.dns-zone-actions .icon { width: 15px; height: 15px; }
.dns-zone-warning { margin-bottom: 16px; }

.dns-add-form { margin: 0 0 24px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px rgba(15, 23, 42, .05); }
.dns-form-heading, .dns-records-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dns-form-heading h3, .dns-records-heading h3 { margin: 3px 0 0; }
.dns-form-hint, .dns-records-heading > span { color: var(--muted); font-size: 12px; }
.dns-form-grid { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(170px, 1fr) minmax(220px, 1.5fr) minmax(120px, .65fr) minmax(130px, .7fr); gap: 14px; align-items: start; }
.dns-form-grid label { color: var(--muted); font-size: 12px; font-weight: 700; }
.dns-form-grid input, .dns-form-grid select, .dns-form-grid textarea { margin-top: 6px; font-size: 13px; }
.dns-form-grid textarea { width: 100%; resize: vertical; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font: inherit; }
.dns-form-grid label small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.35; }
.dns-value-field-wide { grid-column: span 2; }
.dns-add-button { align-self: end; min-height: 38px; justify-content: center; white-space: nowrap; }
.dns-proxy-toggle { min-width: 150px; }
.dns-toggle { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; margin-top: 6px; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; }
.dns-toggle-track { display: inline-flex; align-items: center; width: 34px; height: 20px; padding: 2px; border-radius: 999px; background: #cbd5e1; transition: background .2s; }
.dns-toggle-track span { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.dns-toggle.active .dns-toggle-track { background: #f97316; }
.dns-toggle.active .dns-toggle-track span { transform: translateX(14px); }
.dns-proxy-note { grid-column: span 2; display: flex; align-items: center; gap: 7px; align-self: center; margin-top: 22px; color: var(--muted); font-size: 11px; font-weight: 400; }
.dns-proxy-note .icon { width: 15px; height: 15px; flex: 0 0 auto; }
.dns-records-heading { margin-top: 4px; margin-bottom: 10px; }
.dns-records-table table { min-width: 850px; }
.dns-records-table th, .dns-records-table td { vertical-align: middle; }
.dns-records-table .dns-value { max-width: 360px; overflow-wrap: anywhere; white-space: normal; }
.dns-routing-pill { background: #f1f5f9; color: #475569; font-weight: 600; }
.dns-routing-pill.proxied { background: #fff7ed; color: #c2410c; }
.dns-routing-pill.proxied span { background: #f97316; }
.dns-routing-pill:not(.proxied) span { background: #94a3b8; }
.dns-routing-toggle { border: 0; cursor: pointer; font: inherit; }
.dns-routing-toggle:hover { filter: brightness(.97); }
.dns-routing-toggle:disabled { cursor: wait; opacity: .65; }

@media (max-width: 1000px) {
  .dns-editor-header, .dns-zone-summary { align-items: flex-start; flex-direction: column; }
  .dns-domain-picker { width: 100%; }
  .dns-zone-actions { justify-content: flex-start; }
  .dns-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dns-value-field-wide, .dns-proxy-note { grid-column: span 2; }
  .dns-add-button { grid-column: span 2; justify-self: start; }
}

@media (max-width: 560px) {
  .dns-form-grid { grid-template-columns: 1fr; }
  .dns-value-field-wide, .dns-proxy-note, .dns-add-button { grid-column: auto; }
  .dns-form-heading, .dns-records-heading { align-items: flex-start; flex-direction: column; }
}

/* ─── PHP Info page ──────────────────────────────────────── */
.php-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 1rem;
}

.php-info-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 8px;
}

.php-info-card label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.php-info-card strong {
  font-size: 15px;
  word-break: break-word;
}

/* ─── Cache Manager ──────────────────────────────────────── */
.cache-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 1.5rem;
}

.cache-status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.cache-status-card .icon {
  width: 28px;
  height: 28px;
  color: var(--brand);
}

.cache-status-card div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cache-status-card small {
  display: block;
  font-size: 12px;
}

@media (max-width: 620px) {
  .cache-status-grid {
    grid-template-columns: 1fr;
  }
}

.cache-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
}

.cache-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

/* ─── IP Manager ─────────────────────────────────────────── */
.ip-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 1rem;
}

.ip-rule-group h3 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--muted);
}

.pill.danger {
  background: #fef2f2;
  color: var(--danger);
}

.pill.warning {
  background: #fffbeb;
  color: #d97706;
}

.pill.missing {
  background: #f8fafc;
  color: var(--muted);
}

.pill.ok,
.pill.active {
  background: #f0fdf4;
  color: #16a34a;
}

/* ─── Hotlink Protection ─────────────────────────────────── */
.hotlink-toggle-row {
  margin-bottom: 1rem;
}

.analytics-toggle-row {
  margin: 0.75rem 0 1rem;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.toggle-switch {
  width: 44px;
  height: 24px;
  background: var(--surface-2);
  border: 2px solid var(--line);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.toggle-switch.active {
  background: #1f2d2f;
  border-color: #1f2d2f;
}

.toggle-switch.saving {
  box-shadow: 0 0 0 3px rgba(31, 45, 47, 0.12);
  animation: togglePulse 0.9s ease-in-out infinite alternate;
}

.toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

@keyframes togglePulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.03);
  }
}

.analytics-toggle-row small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.toggle-switch.active .toggle-knob {
  transform: translateX(20px);
}

.form-grid textarea {
  min-height: 100px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
  resize: vertical;
}

/* ─── Fix File Ownership ─────────────────────────────────── */
.fix-ownership-panel {
  max-width: 600px;
}

.fix-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 14px;
}

.fix-result.success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #16a34a;
}

.fix-result.error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: var(--danger);
}

.fix-result .icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* ─── Password Protect ───────────────────────────────────── */
.protect-form {
  grid-template-columns: 1fr 1fr 1fr auto;
  margin-bottom: 1rem;
}

/* ─── Service Access List ────────────────────────────────── */
.service-access-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── Admin PHP Versions Section ─────────────────────────── */
.php-versions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.php-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
}

.php-version-badge.supported {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
}

.php-version-badge.legacy {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

/* ─── Responsive tweaks for new components ───────────────── */
@media (max-width: 920px) {
  .dashboard-welcome {
    flex-direction: column;
    align-items: flex-start;
  }

  .php-version-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .cache-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .protect-form,
  .dns-form {
    grid-template-columns: 1fr;
  }

  .ip-rules-grid {
    grid-template-columns: 1fr;
  }
}
.section-subhead {
  grid-column: 1 / -1;
  font-size: 15px;
  margin-top: 16px;
  margin-bottom: -4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

/* Notifications */
.notification-bell {
  position: relative;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification-bell svg {
  width: 20px;
  height: 20px;
}
.notification-badge {
  position: absolute;
  top: 0px;
  right: 0px;
  background-color: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: bold;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  z-index: 1000;
  max-height: 400px;
  display: flex;
  flex-direction: column;
}
.notification-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notification-header h3 {
  margin: 0;
  font-size: 14px;
}
.notification-header button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
}
.notification-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}
.notification-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  transition: background-color 0.2s;
}
.notification-item:hover {
  background-color: var(--background);
}
.notification-item.unread {
  background-color: rgba(59, 130, 246, 0.05);
}
.notification-time {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.notification-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background-color: var(--surface);
  color: var(--text);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  pointer-events: auto;
  width: 300px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }
.toast-content {
  flex: 1;
  font-size: 13px;
}
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}
.toast-close:hover {
  color: var(--text);
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Preloader */
[v-cloak] {
  display: none !important;
}
#app-preloader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #0f172a;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.5s ease;
}
.mango-loader {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 50% 50% 50% 15%;
  transform: rotate(45deg);
  animation: mangoPulse 1.5s infinite ease-in-out;
  position: relative;
  box-shadow: inset -5px -5px 15px rgba(0,0,0,0.1), 0 10px 20px rgba(0,0,0,0.2);
}
.mango-loader::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 25px;
  height: 15px;
  background: #22c55e;
  border-radius: 50% 0 50% 0;
  transform: rotate(-10deg);
  box-shadow: inset 2px 2px 5px rgba(255,255,255,0.2);
}
@keyframes mangoPulse {
  0% { transform: scale(0.9) rotate(45deg); }
  50% { transform: scale(1.1) rotate(45deg); }
  100% { transform: scale(0.9) rotate(45deg); }
}
body.app-loaded #app-preloader {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Preloader Progress Bar */
.loader-progress {
  width: 150px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-top: 2rem;
  overflow: hidden;
  position: relative;
}
.loader-progress-bar {
  width: 50%;
  height: 100%;
  background-color: #fbbf24;
  border-radius: 4px;
  position: absolute;
  top: 0; left: 0;
  animation: indeterminateProgress 1.5s infinite ease-in-out;
}
@keyframes indeterminateProgress {
  0% { left: -50%; width: 50%; }
  50% { left: 25%; width: 100%; }
  100% { left: 100%; width: 50%; }
}

/* Website List Enhancements */
.site-info-cell {
  max-width: 250px;
}
.site-info-cell strong {
  display: block;
  font-size: 14px;
}
.path-info-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 4px;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: help;
  outline: none;
  vertical-align: text-bottom;
}
.path-info-tooltip:hover,
.path-info-tooltip:focus { color: var(--brand); background: var(--surface-muted); }
.path-info-tooltip .icon { width: 13px; height: 13px; }

.action-btn-group {
  display: inline-flex;
  align-items: center;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.action-btn {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.action-btn:last-child {
  border-right: none;
}
.action-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}
.action-btn:hover {
  background: var(--surface);
  color: var(--primary);
}

.connect-wizard-overlay { z-index: 1000; padding: 0; }
.connect-wizard-panel { width: min(100vw, 1100px); min-height: 100vh; max-height: 100vh; border-radius: 0; display: flex; flex-direction: column; }
.connect-wizard-panel .modal-body { flex: 1; overflow: auto; padding: clamp(1.25rem, 4vw, 4rem); }
.connect-method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 2rem 0; }
.connect-method-grid label { display: flex; flex-direction: column; gap: .55rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.connect-method-grid label.selected { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent); }
.connect-method-grid input { align-self: flex-start; }
.connect-method-grid small { color: var(--text-muted); line-height: 1.5; }
.connect-instructions {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  min-height: 130px;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.5;
}
.connect-instructions > app-icon,
.connect-instructions > .icon,
.connect-instructions > svg {
  display: inline-flex;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: .1rem;
  color: var(--info, #245a97);
}
.connect-instructions > div { min-width: 0; flex: 1 1 auto; }
.connect-instructions strong { display: block; color: inherit; }
.connect-instructions p { margin: .35rem 0 0; color: var(--muted); }
.connect-instructions p code {
  display: inline;
  margin: 0;
  width: auto;
  padding: .1rem .3rem;
}
.connect-instructions > div > code {
  display: inline-block;
  margin: .55rem 0 0;
  width: fit-content;
  padding: .35rem .6rem;
  border: 1px solid color-mix(in srgb, var(--info, #245a97) 22%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--info, #245a97) 8%, var(--surface));
  color: var(--text);
  font-size: .9em;
  word-break: break-all;
}
.connect-instructions small { display: block; margin-top: .5rem; color: var(--muted); }
.success-box { border-color: #16a34a; }
.warning-box { border-color: #d97706; }
.input-group { display: flex; align-items: stretch; }
.input-group input { min-width: 0; flex: 1; border-radius: 8px 0 0 8px; }
.input-group select { min-width: 0; flex: 1; border-radius: 0 8px 8px 0; }
.input-group-addon { display: inline-flex; align-items: center; padding: 0 .7rem; background: var(--surface-muted, #f3f4f6); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text-muted); }
@media (max-width: 760px) { .connect-method-grid { grid-template-columns: 1fr; } .connect-wizard-panel .modal-footer { flex-wrap: wrap; } }

/* ══════════════════════════════════════════════════════════════
   Site Wizard (sw-*) — Full-screen redesign
   ══════════════════════════════════════════════════════════════ */

/* Overlay */
.sw-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Panel */
.sw-panel {
  position: relative;
  width: min(760px, 100vw);
  height: min(88vh, 760px);
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sw-slide-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sw-slide-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.sw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.sw-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sw-badge {
  display: inline-block;
  background: var(--brand-tint);
  color: var(--brand-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 20px;
  width: fit-content;
}

.sw-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.sw-close {
  width: 36px;
  height: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.sw-close:hover {
  border-color: var(--brand);
  color: var(--text);
  background: var(--brand-tint);
}

.sw-close svg {
  width: 16px;
  height: 16px;
}

/* Progress bar */
.sw-progress-track {
  height: 3px;
  background: var(--line);
  flex-shrink: 0;
}

.sw-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Step pills */
.sw-steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 28px 0;
  flex-shrink: 0;
}

.sw-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sw-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.sw-step-dot svg {
  width: 13px;
  height: 13px;
}

.sw-step.active .sw-step-dot {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.sw-step.done .sw-step-dot {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: #fff;
}

.sw-step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.sw-step.active .sw-step-label,
.sw-step.done .sw-step-label {
  color: var(--text);
}

.sw-step-connector {
  flex: 1;
  height: 2px;
  background: var(--line);
  margin: 0 10px;
  min-width: 24px;
  transition: background 0.2s;
}

.sw-step-connector.done {
  background: var(--brand-strong);
}

/* Error box */
.sw-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 28px;
  padding: 14px 16px;
  background: rgba(179, 38, 30, 0.06);
  border: 1px solid rgba(179, 38, 30, 0.3);
  border-radius: 10px;
  flex-shrink: 0;
}

.sw-error svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--danger);
  margin-top: 1px;
}

.sw-error strong {
  display: block;
  font-size: 14px;
  color: var(--danger);
}

.sw-error p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

/* Body */
.sw-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px 8px;
}

.sw-step-content {
  animation: sw-fade-in 0.2s ease;
}

@keyframes sw-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sw-step-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.6;
}

/* Type grid */
.sw-type-grid {
  display: grid;
  gap: 10px;
}

.sw-type-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.sw-type-card:hover {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.sw-type-card.selected {
  border-color: var(--brand);
  background: var(--brand-tint);
  box-shadow: 0 0 0 3px rgba(253,181,40,0.18);
}

.sw-type-card > div:nth-child(3) {
  flex: 1;
}

.sw-type-card strong {
  display: block;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 2px;
}

.sw-type-card span {
  font-size: 13px;
  color: var(--muted);
}

.sw-type-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand-strong);
  transition: background 0.15s;
}

.sw-type-icon svg {
  width: 22px;
  height: 22px;
}

.sw-type-icon-cms {
  background: rgba(36, 90, 151, 0.08);
  color: #245a97;
}

.sw-type-card.selected .sw-type-icon {
  background: rgba(253,181,40,0.22);
}

.sw-type-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  opacity: 0;
}

.sw-type-check svg {
  width: 12px;
  height: 12px;
}

.sw-type-card.selected .sw-type-check {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: #fff;
  opacity: 1;
}

/* Domain step */
.sw-domain-wrap {
  max-width: 480px;
}

.sw-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.sw-domain-input-wrap {
  position: relative;
}

.sw-domain-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.sw-domain-input {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0 14px 0 42px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sw-domain-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(253,181,40,0.18);
}

.sw-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* DNS Existing Domain Alert & Choices */
.sw-dns-alert {
  margin-top: 18px;
  background: rgba(253, 181, 40, 0.08);
  border: 1px solid rgba(253, 181, 40, 0.3);
  border-radius: 12px;
  padding: 16px;
}

.sw-dns-alert-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.sw-dns-alert-icon {
  width: 20px;
  height: 20px;
  color: #f59e0b;
  flex-shrink: 0;
}

.sw-dns-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sw-dns-choice-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sw-dns-choice-card:hover {
  border-color: var(--brand);
}

.sw-dns-choice-card.selected {
  border-color: var(--brand);
  background: rgba(253, 181, 40, 0.06);
}

.sw-dns-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.sw-dns-choice-card.selected .sw-dns-radio-dot {
  border-color: var(--brand);
  background: var(--brand);
}

.sw-dns-choice-card.selected .sw-dns-radio-dot::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.sw-dns-choice-card strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.sw-dns-choice-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* CMS form grid */
.sw-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sw-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sw-field:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.sw-input {
  width: 100%;
  min-height: 40px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sw-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(253,181,40,0.18);
}

.sw-field-inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
}

.sw-field-inline input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.sw-label-inline {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  margin: 0;
}

/* Success banner */
.sw-step-done {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sw-success-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(114, 225, 40, 0.07);
  border: 1px solid rgba(114, 225, 40, 0.35);
  border-radius: 12px;
}

.sw-success-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(114, 225, 40, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--success-ink);
}

.sw-success-icon svg {
  width: 18px;
  height: 18px;
}

.sw-success-banner strong {
  display: block;
  font-size: 15px;
  color: var(--text);
}

.sw-success-banner p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* DNS Tabs */
.sw-dns-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--line);
}

.sw-dns-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 0;
  min-height: auto;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.sw-dns-tab svg {
  width: 15px;
  height: 15px;
}

.sw-dns-tab:hover {
  color: var(--text);
  border-color: var(--line);
}

.sw-dns-tab.active {
  color: var(--brand-ink);
  border-color: var(--brand);
}

.sw-dns-panel {
  animation: sw-fade-in 0.18s ease;
}

.sw-dns-intro {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.6;
}

/* DNS Table */
.sw-dns-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.sw-dns-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sw-dns-table thead {
  background: var(--surface-2);
}

.sw-dns-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.sw-dns-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.sw-dns-table tbody tr:last-child td {
  border-bottom: none;
}

.sw-dns-table tbody tr:hover {
  background: var(--surface-2);
}

.sw-muted {
  color: var(--muted);
  font-size: 12px;
}

.sw-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 7px;
  color: var(--text);
  white-space: nowrap;
}

/* DNS type badges */
.sw-badge-type {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}

.sw-type-a    { background: rgba(36,90,151,0.12); color: #245a97; }
.sw-type-cname { background: rgba(114,225,40,0.12); color: #4f9e12; }
.sw-type-mx   { background: rgba(167,93,18,0.12); color: #a75d12; }
.sw-type-txt  { background: rgba(44,49,54,0.1); color: var(--accent); }

/* Nameservers list */
.sw-ns-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sw-ns-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.sw-ns-item svg {
  width: 18px;
  height: 18px;
  color: var(--brand-strong);
  flex-shrink: 0;
}

.sw-ns-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  border: none;
  padding: 0;
}

/* Footer */
.sw-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  flex-shrink: 0;
}

.sw-footer-left,
.sw-footer-right {
  display: flex;
  gap: 10px;
}

/* Buttons */
.sw-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid transparent;
}

.sw-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.sw-btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.sw-btn-ghost:hover {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.sw-btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}

.sw-btn-primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.sw-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sw-btn:disabled:hover {
  border-color: inherit;
  background: inherit;
}

/* Spinner */
.sw-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: var(--brand-ink);
  border-radius: 50%;
  animation: sw-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes sw-spin {
  to { transform: rotate(360deg); }
}

/* ── Building / Crane animation ── */
.sw-building-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  z-index: 10;
  animation: sw-fade-in 0.25s ease;
}

.sw-crane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}

.sw-crane-stars {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 60px;
  background-image:
    radial-gradient(circle, rgba(253,181,40,0.5) 1px, transparent 1px),
    radial-gradient(circle, rgba(253,181,40,0.3) 1px, transparent 1px),
    radial-gradient(circle, rgba(253,181,40,0.4) 1px, transparent 1px);
  background-size: 80px 40px, 60px 30px, 100px 50px;
  background-position: 10px 5px, 40px 15px, 70px 8px;
  animation: sw-twinkle 3s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes sw-twinkle {
  from { opacity: 0.4; }
  to   { opacity: 1; }
}

.sw-crane-svg {
  width: 200px;
  height: 220px;
  filter: drop-shadow(0 8px 24px rgba(253,181,40,0.22));
}

/* Animate the hook cable oscillating */
.sw-cable {
  transform-origin: 160px 84px;
  animation: sw-cable-swing 2s ease-in-out infinite alternate;
}

.sw-hook,
.sw-load {
  transform-origin: 160px 84px;
  animation: sw-cable-swing 2s ease-in-out infinite alternate;
}

@keyframes sw-cable-swing {
  from { transform: rotate(-6deg); }
  to   { transform: rotate(6deg); }
}

.sw-building-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.sw-building-dots {
  display: flex;
  gap: 6px;
}

.sw-building-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  animation: sw-bounce-dot 1.2s ease-in-out infinite;
}

.sw-building-dots span:nth-child(2) { animation-delay: 0.2s; }
.sw-building-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes sw-bounce-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1.1); opacity: 1; }
}

/* Responsive */
@media (max-width: 600px) {
  .sw-panel {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .sw-form-grid {
    grid-template-columns: 1fr;
  }

  .sw-type-card {
    padding: 12px 14px;
  }

  .sw-dns-table th:last-child,
  .sw-dns-table td:last-child {
    display: none;
  }
}



/* ═══════════════════════════════════════════════════════════════════
   ADMIN SHELL POLISH — Refined professional light-mode
   All rules scoped to .admin-shell – client panel untouched
   ═══════════════════════════════════════════════════════════════════ */

/* ── Admin-specific token overrides ──────────────────────────────── */
.admin-shell {
  --admin-nav-text:     #374151;
  --admin-nav-hover:    #f3f4f6;
  --admin-nav-active:   #fff8e6;
  --admin-nav-accent:   #e8a417;
}

/* ── Sidebar ──────────────────────────────────────────────────────── */
.admin-shell .admin-sidebar {
  background: #ffffff;
  border-right: 1px solid #e8eaed;
  box-shadow: 1px 0 4px rgba(0,0,0,0.05);
  padding: 16px 12px;
}

/* Brand block */
.admin-shell .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 8px 16px;
  margin-bottom: 6px;
  border-bottom: 1px solid #f0f2f4;
}

.admin-shell .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fdb528, #e8a417);
  color: #1a0900;
  font-size: 17px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(253,181,40,0.3);
  flex-shrink: 0;
}

.admin-shell .brand strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}

.admin-shell .brand small {
  display: block;
  font-size: 10.5px;
  color: #9ca3af;
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Nav sections */
.admin-shell .nav-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 6px;
}

.admin-shell .nav-section {
  margin-bottom: 2px;
}

.admin-shell .nav-group {
  color: #9ca3af;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 14px 10px 5px;
}

.admin-shell .nav-list button,
.admin-shell .nav-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  border: 0;
  background: transparent;
  text-decoration: none;
  border-radius: 7px;
  padding: 7px 10px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background 0.13s, color 0.13s;
  cursor: pointer;
  position: relative;
}

.admin-shell .nav-list button:hover,
.admin-shell .nav-list a:hover {
  background: #f3f4f6;
  color: #111827;
  border-color: transparent;
}

.admin-shell .nav-list button.active {
  background: #fff8e6;
  color: #92400e;
  font-weight: 600;
  border: none;
}

.admin-shell .nav-list button.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #e8a417;
}

.admin-shell .nav-item-icon {
  font-size: 13px;
  flex-shrink: 0;
  opacity: 0.75;
}

.admin-shell .nav-list button.active .nav-item-icon,
.admin-shell .nav-list button:hover .nav-item-icon,
.admin-shell .nav-list a:hover .nav-item-icon {
  opacity: 1;
}

/* ── Topbar ───────────────────────────────────────────────────────── */
.admin-shell .topbar {
  background: #fff;
  border-bottom: 1px solid #e8eaed;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  height: 60px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-shell .topbar-page-icon {
  background: #fff8e6;
  color: #e8a417;
  border: 1px solid #f5dfa0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-shell .topbar-page-title {
  color: #1e2528;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.admin-shell .topbar-page-desc {
  color: #6b7177;
  font-size: 11.5px;
}

.admin-shell .feature-status-functional {
  background: #fff8e6;
  color: #a07000;
  border: 1px solid #f0d078;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-shell .ghost-button {
  background: #fff;
  border: 1px solid #d1d5db;
  color: #374151;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  padding: 0 14px;
  min-height: 34px;
  transition: background 0.13s, border-color 0.13s;
}

.admin-shell .ghost-button:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* ── Main content area ────────────────────────────────────────────── */
.admin-shell .client-main-content {
  padding: 28px;
  background: #f4f6f8;
  min-height: calc(100vh - 60px);
}

/* ── Panel cards ──────────────────────────────────────────────────── */
.admin-shell .panel {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.03);
  padding: 22px 24px;
  margin-bottom: 20px;
}

/* ── Section header ───────────────────────────────────────────────── */
.admin-shell .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-shell .section-head h2 {
  font-size: 15.5px;
  font-weight: 700;
  color: #1e2528;
  margin-bottom: 3px;
  letter-spacing: -0.02em;
}

.admin-shell .section-head p {
  color: #6b7177;
  font-size: 13px;
  margin: 0;
}

/* ── Metric grid ──────────────────────────────────────────────────── */
.admin-shell .metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.admin-shell .metric {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s;
  position: relative;
  overflow: hidden;
}

.admin-shell .metric::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #fdb528, #e8a417);
  opacity: 0;
  transition: opacity 0.18s;
}

.admin-shell .metric:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-color: #d4d8dc;
  transform: translateY(-1px);
}

.admin-shell .metric:hover::after {
  opacity: 1;
}

.admin-shell .metric span:first-child {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9ca3af;
}

.admin-shell .metric strong {
  font-size: 26px;
  font-weight: 800;
  color: #1e2528;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.admin-shell .metric small {
  font-size: 11.5px;
  color: #9ca3af;
}

/* ── Tables ───────────────────────────────────────────────────────── */
.admin-shell .table-wrap {
  border-radius: 8px;
  border: 1px solid #e8eaed;
  overflow-y: auto;
  overflow-x: auto;
  max-height: 420px;
  background: #fff;
}

.admin-shell table {
  border-collapse: collapse;
  width: 100%;
}

.admin-shell th {
  background: #f8f9fb;
  color: #6b7177;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 11px 16px;
  border-bottom: 1px solid #e8eaed;
}

.admin-shell td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f3f5;
  color: #1e2528;
  font-size: 13.5px;
  vertical-align: middle;
}

.admin-shell tbody tr:last-child td {
  border-bottom: 0;
}

.admin-shell tbody tr {
  transition: background 0.1s;
}

.admin-shell tbody tr:hover {
  background: #fafbfc;
}

.admin-shell td small {
  display: block;
  color: #9ca3af;
  font-size: 11.5px;
  margin-top: 3px;
}

.admin-shell td strong {
  color: #1e2528;
  font-weight: 600;
}

.admin-shell .empty-row {
  text-align: center;
  color: #9ca3af;
  padding: 32px 16px !important;
  font-size: 13px;
}

/* ── Pills ────────────────────────────────────────────────────────── */
.admin-shell .pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 99px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: #f1f3f5;
  color: #6b7177;
  border: 1px solid #e8eaed;
  white-space: nowrap;
}

.admin-shell .pill.active,
.admin-shell .pill.healthy,
.admin-shell .pill.operational,
.admin-shell .pill.running {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.admin-shell .pill.suspended,
.admin-shell .pill.danger,
.admin-shell .pill.critical,
.admin-shell .pill.FAIL {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.admin-shell .pill.warning,
.admin-shell .pill.degraded,
.admin-shell .pill.WARNING {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.admin-shell .pill.info,
.admin-shell .pill.queued,
.admin-shell .pill.INFO {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.admin-shell .pill.PASS {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

/* ── Primary / Danger / Secondary buttons ─────────────────────────── */
.admin-shell .primary-button {
  background: #1e2528;
  border: 1px solid #1e2528;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  border-radius: 7px;
  padding: 0 16px;
  min-height: 34px;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-shell .primary-button:hover {
  background: #2c3136;
  border-color: #2c3136;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.admin-shell .primary-button:disabled {
  opacity: 0.45;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

.admin-shell .danger-button {
  background: #fff;
  border: 1px solid #fca5a5;
  color: #dc2626;
  font-weight: 600;
  font-size: 13px;
  border-radius: 7px;
  padding: 0 14px;
  min-height: 34px;
  transition: all 0.15s;
}

.admin-shell .danger-button:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.admin-shell .secondary-button {
  background: #f0f6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-weight: 600;
  font-size: 13px;
  border-radius: 7px;
  padding: 0 14px;
  min-height: 34px;
  transition: all 0.15s;
}

.admin-shell .secondary-button:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

/* Generic plain buttons */
.admin-shell button:not(.primary-button):not(.danger-button):not(.ghost-button):not(.secondary-button):not(.close-button):not(.admin-submit-btn):not(.alert-dismiss):not(.admin-alert-dismiss) {
  background: #fff;
  border: 1px solid #d1d5db;
  color: #374151;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  transition: background 0.13s, border-color 0.13s, box-shadow 0.13s;
}

.admin-shell button:not(.primary-button):not(.danger-button):not(.ghost-button):not(.secondary-button):not(.close-button):not(.admin-submit-btn):not(.alert-dismiss):not(.admin-alert-dismiss):hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* ── Inputs & selects (keep light) ────────────────────────────────── */
.admin-shell input,
.admin-shell select,
.admin-shell textarea {
  background: #fff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 7px !important;
  color: #1e2528 !important;
  font-size: 13.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-shell input:focus,
.admin-shell select:focus,
.admin-shell textarea:focus {
  border-color: #fdb528 !important;
  box-shadow: 0 0 0 3px rgba(253,181,40,0.15) !important;
  outline: none;
}

/* ── Labels ───────────────────────────────────────────────────────── */
.admin-shell label {
  color: #374151;
  font-size: 12.5px;
  font-weight: 600;
}

/* ── Two-column layout ────────────────────────────────────────────── */
.admin-shell .two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

/* ── Clean list ───────────────────────────────────────────────────── */
.admin-shell .clean-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.admin-shell .clean-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f3f5;
  font-size: 13.5px;
}

.admin-shell .clean-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.admin-shell .clean-list strong {
  color: #1e2528;
  font-weight: 600;
}

/* ── Modal ────────────────────────────────────────────────────────── */
.admin-shell .modal-overlay {
  background: rgba(30,37,40,0.45);
  backdrop-filter: blur(4px);
}

.admin-shell .modal-panel {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.14);
  max-height: 90vh;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}

/* Keep modal chrome fixed while the actual content remains usable on small
   screens and for long forms. Several older dialogs use a form directly
   below the header instead of .modal-body, so cover both structures here. */
.admin-shell .modal-panel > form,
.admin-shell .modal-panel > .modal-body,
.admin-shell .modal-panel > .modal-content,
.admin-shell .modal-card > form,
.admin-shell .modal-card > .modal-body,
.admin-shell .modal-card > .modal-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 22px;
  box-sizing: border-box;
}

.admin-shell .modal-panel > .modal-body,
.admin-shell .modal-card > .modal-body {
  padding: 22px;
}

.admin-shell .modal-panel > form.form-grid,
.admin-shell .modal-card > form.form-grid {
  align-content: start;
}

.admin-shell .modal-card {
  max-height: 90vh;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}

.admin-shell .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #e8eaed;
  background: #f8f9fb;
  border-radius: 12px 12px 0 0;
  flex: 0 0 auto;
}

.admin-shell .modal-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: #1e2528;
  margin: 0;
}

.admin-shell .modal-body {
  padding: 22px;
  overflow-y: auto;
}

.admin-shell .modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid #e8eaed;
  background: #f8f9fb;
  border-radius: 0 0 12px 12px;
  margin-top: 16px;
}

.admin-shell .close-button {
  background: transparent !important;
  border: 1px solid #e8eaed !important;
  color: #6b7177 !important;
  border-radius: 7px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  min-height: unset;
  transition: background 0.13s, border-color 0.13s;
}

.admin-shell .close-button:hover {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}

/* ── Plan form ────────────────────────────────────────────────────── */
.admin-shell .plan-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  align-items: end;
}

/* ── Form grid ────────────────────────────────────────────────────── */
.admin-shell .form-grid {
  display: grid;
  gap: 16px;
}

/* ── Incident / admin-create forms ────────────────────────────────── */
.admin-shell .incident-form {
  display: grid;
  grid-template-columns: 1.2fr 150px 1.4fr auto;
  gap: 10px;
  align-items: end;
}

.admin-shell .admin-create-form {
  display: grid;
  grid-template-columns: 1fr 1fr 150px 1fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
}

/* ── Client selector ──────────────────────────────────────────────── */
.admin-shell .client-selector {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 6px 0 20px;
}

.admin-shell .client-selector label {
  display: grid;
  gap: 6px;
  min-width: min(480px, 100%);
}

.admin-shell .client-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin: 6px 0 20px;
}

.admin-shell .client-toolbar label {
  display: grid;
  gap: 6px;
}

.admin-shell .client-search-field {
  flex: 1 1 360px;
  min-width: min(360px, 100%);
}

.admin-shell .client-result-count {
  padding-bottom: 10px;
}

/* ── Account manage row ───────────────────────────────────────────── */
.admin-shell .account-manage-row {
  display: block;
  padding: 10px 0;
}

.admin-shell .account-manage-row + .account-manage-row {
  border-top: 1px solid #f1f3f5;
}

.admin-shell .account-manage-row > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-shell .account-manage-row > div:first-child small {
  flex-basis: 100%;
}

.admin-shell .account-actions,
.admin-shell .account-dns-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.admin-shell .account-dns-controls {
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface-2);
}

.admin-shell .account-delete-button {
  margin-left: auto;
}

.admin-shell .client-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

/* ── Client / action cells ────────────────────────────────────────── */
.admin-shell .client-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-shell .client-edit {
  display: grid;
  gap: 8px;
}

.admin-shell .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── Secret box ───────────────────────────────────────────────────── */
.admin-shell .secret-box {
  background: #fffbf0;
  border: 1px solid #f5dfa0;
  border-radius: 9px;
  padding: 14px 18px;
  margin: 14px 0;
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
}

.admin-shell .secret-box span {
  color: #92400e;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-shell .secret-box strong {
  color: #1e2528;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

/* ── Admin toast alert ────────────────────────────────────────────── */
.admin-shell .admin-alert {
  position: fixed;
  top: 68px;
  right: 22px;
  max-width: 440px;
  width: auto;
  background: #fff;
  border: 1px solid #e8eaed;
  border-left: 3px solid #fdb528;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  padding: 12px 42px 12px 16px;
  margin: 0;
  z-index: 9999;
  animation: admin-toast-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes admin-toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-shell .admin-alert .message {
  color: #1e2528;
  font-size: 13.5px;
  font-weight: 500;
  margin: 0;
}

.admin-shell .alert-dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent !important;
  border: 0 !important;
  color: #9ca3af !important;
  width: 24px;
  height: 24px;
  min-height: unset;
  display: grid;
  place-items: center;
  font-size: 18px;
  padding: 0;
  cursor: pointer;
}

.admin-shell .alert-dismiss:hover {
  color: #6b7177 !important;
}

/* ── PHP version badges ───────────────────────────────────────────── */
.admin-shell .php-versions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.admin-shell .php-version-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid;
}

.admin-shell .php-version-badge.supported {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.admin-shell .php-version-badge.legacy {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

/* ── Metric / security score cards ───────────────────────────────── */
.admin-shell .metric-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.18s, transform 0.18s;
}

.admin-shell .metric-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.admin-shell .card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  flex-shrink: 0;
}

.admin-shell .dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

/* ── Data table (security page) ──────────────────────────────────── */
.admin-shell .table-responsive {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e8eaed;
}

/* ── Service links ────────────────────────────────────────────────── */
.admin-shell .service-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-shell .service-links a {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: #f0f6ff;
  border: 1px solid #bfdbfe;
  border-radius: 99px;
  color: #1d4ed8;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.13s, border-color 0.13s;
}

.admin-shell .service-links a:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

/* ── Code ─────────────────────────────────────────────────────────── */
.admin-shell code {
  background: #f4f6f8;
  border: 1px solid #e8eaed;
  border-radius: 5px;
  padding: 2px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #1e2528;
}

/* ── Headings ─────────────────────────────────────────────────────── */
.admin-shell h2 {
  color: #1e2528;
  letter-spacing: -0.02em;
}

.admin-shell h3 {
  color: #1e2528;
}

/* ── Status line ──────────────────────────────────────────────────── */
.admin-shell .status-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 14px;
}

.admin-shell .status-line.operational,
.admin-shell .status-line.healthy {
  color: #065f46;
}

.admin-shell .status-line.degraded,
.admin-shell .status-line.warning {
  color: #92400e;
}

.admin-shell .status-line.down,
.admin-shell .status-line.critical {
  color: #991b1b;
}

/* ── Page stack ───────────────────────────────────────────────────── */
.admin-shell .page-stack {
  display: grid;
  gap: 20px;
}

/* ── btn-spinner ──────────────────────────────────────────────────── */
.admin-shell .btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: admin-spin 0.7s linear infinite;
}

@keyframes admin-spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .admin-shell .admin-sidebar {
    position: sticky;
    top: 0;
    width: auto;
    max-height: none;
    padding: 12px 14px;
  }

  .admin-shell .brand {
    padding-bottom: 0;
    border-bottom: none;
    margin-bottom: 0;
  }

  .admin-shell .client-main-content {
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .admin-shell .incident-form,
  .admin-shell .admin-create-form,
  .admin-shell .plan-form,
  .admin-shell .account-manage-row {
    grid-template-columns: 1fr;
  }

  .admin-shell .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-shell .client-search-field {
    min-width: 100%;
  }

  .admin-shell .account-delete-button {
    margin-left: 0;
  }
}

/* ── Panel Max-Height, Scrolling & Minimizable Controls ───────────────────── */
.admin-shell .table-wrap,
.table-wrap,
.panel-scrollable {
  max-height: 420px !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  display: block;
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(253, 181, 40, 0.4) rgba(0, 0, 0, 0.1);
}
.table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.table-wrap::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(253, 181, 40, 0.4);
  border-radius: 4px;
}
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(253, 181, 40, 0.7);
}
.admin-shell table th,
.admin-shell table thead th,
.table-wrap table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f9fb !important;
  color: #475569 !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}
.sortable-th:hover {
  color: #fdb528 !important;
}

.panel-toggle-btn {
  font-size: 0.78rem;
  padding: 3px 8px;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.2s;
}
.panel-toggle-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.metric-clickable {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.metric-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(253, 181, 40, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.registrar-hero { align-items: flex-start; }
.registrar-hero p { max-width: 720px; }
.registrar-metrics { margin: 1.25rem 0; }
.registrar-account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 1rem 0 1.75rem; }
.registrar-account-card, .registrar-empty-card { border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg, var(--surface), rgba(253,181,40,.035)); padding: 16px; min-height: 158px; }
.registrar-card-top, .registrar-card-actions, .registrar-toolbar, .registrar-filters, .registrar-balance, .modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.registrar-card-top h3 { margin: 3px 0 0; }
.registrar-balance { justify-content: flex-start; margin: 18px 0 7px; }
.registrar-balances { align-items: stretch; flex-wrap: wrap; }
.registrar-balances > div { display: flex; align-items: baseline; gap: 7px; }
.client-picker-results { display: grid; gap: 6px; max-height: 190px; overflow: auto; }
.client-picker-option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.client-picker-option:hover { border-color: var(--primary); background: var(--surface-muted); }
.client-picker-option span { color: var(--muted); font-size: .78rem; }
.loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 180px; color: var(--muted); }
.loading-state .spinner { width: 30px; height: 30px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: mango-spin .8s linear infinite; }
@keyframes mango-spin { to { transform: rotate(360deg); } }
.connect-auto-dns-option { margin: 1rem 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); }
.connect-auto-dns-option label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.connect-auto-dns-option span { display: flex; flex-direction: column; gap: 3px; }
.connect-auto-dns-option small { color: var(--muted); }
.registrar-balance strong { font-size: 1.65rem; }
.registrar-balance span { color: var(--muted); font-size: .78rem; }
.registrar-card-actions { justify-content: flex-start; margin-top: 14px; }
.metric-balance-list { display: flex; flex-direction: column; gap: 2px; }
.metric-balance-list span { font-size: .95rem; line-height: 1.2; }
.admin-shell .expiry-warning { color: #b45309; font-weight: 700; }
.admin-shell .expiry-danger { color: #dc2626; font-weight: 700; }
.registrar-empty-card { display: flex; flex-direction: column; justify-content: center; gap: 9px; color: var(--muted); }
.registrar-empty-card strong { color: var(--text); font-size: 1rem; }
.registrar-empty-card .primary-button { align-self: flex-start; }
.registrar-toolbar { align-items: flex-end; margin: 1.25rem 0 12px; }
.registrar-bulk-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.02); margin-bottom: 8px; color: var(--muted); font-size: .8rem; }
.registrar-bulk-toolbar label { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 700; margin-right: auto; }
.select-column { width: 34px; text-align: center; }
.registrar-toolbar h3 { margin: 0 0 4px; }
.registrar-toolbar p { margin: 0; color: var(--muted); font-size: .82rem; }
.registrar-filters { flex-wrap: wrap; justify-content: flex-end; }
.registrar-filters input { min-width: 240px; }
.registrar-table td { vertical-align: middle; }
.registrar-table td small, .registrar-account-card > small { display: block; color: var(--muted); margin-top: 4px; }
.registrar-table .actions { white-space: nowrap; }
.registrar-note { display: flex; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(253,181,40,.25); border-radius: 9px; background: rgba(253,181,40,.06); color: var(--muted); font-size: .8rem; }
.registrar-note strong { color: var(--text); white-space: nowrap; }
.registrar-modal { max-width: 560px; }
.registrar-assign-panel { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.registrar-assign-panel summary { cursor: pointer; color: var(--text); font-weight: 700; }
.registrar-assign-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; align-items: end; }
.registrar-check { display: flex; align-items: center; gap: 8px; min-height: 38px; }
@media (max-width: 900px) { .registrar-assign-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .registrar-toolbar { align-items: stretch; flex-direction: column; } .registrar-filters { justify-content: flex-start; } .registrar-note { flex-direction: column; } }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 12px;
  margin-top: 8px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.checkbox-grid input[type="checkbox"] {
  width: auto;
}

/* Compact, consistently aligned choice controls across admin and client panels. */
input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px !important;
  height: 17px !important;
  min-width: 17px;
  min-height: 17px !important;
  margin: 0;
  padding: 0 !important;
  flex: 0 0 17px;
  border: 1px solid #aab4bf !important;
  border-radius: 4px !important;
  background: #fff !important;
  box-shadow: none !important;
  cursor: pointer;
  vertical-align: middle;
  display: inline-grid;
  place-content: center;
}

input[type="checkbox"]::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform .12s ease;
  margin-top: -2px;
}

input[type="checkbox"]:checked {
  background: var(--brand, #fdb528) !important;
  border-color: var(--brand, #fdb528) !important;
}

input[type="checkbox"]:checked::before {
  transform: rotate(-45deg) scale(1);
}

input[type="radio"] {
  border-radius: 50% !important;
}

input[type="radio"]::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand, #fdb528);
  transform: scale(0);
  transition: transform .12s ease;
}

input[type="radio"]:checked::before {
  transform: scale(1);
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand, #fdb528) 65%, transparent);
  outline-offset: 2px;
}

label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Configuration Page Tabs & Card Layout */
.config-subtabs {
  flex-wrap: wrap;
  align-items: center;
}

.config-subtabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.config-subtabs button .icon {
  width: 16px;
  height: 16px;
}

.config-card {
  background: var(--surface-1, var(--surface));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.config-card-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.config-card-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.config-card-header h3 .icon {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

.config-card-header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.config-grid.single-col {
  grid-template-columns: 1fr;
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.config-field input,
.config-field select,
.config-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2, var(--surface));
  color: var(--text);
  font-size: 14px;
}

.config-field small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.config-card-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.config-info-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text);
  margin-top: 8px;
}

.config-info-box.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
}

.config-info-box strong {
  display: block;
  margin-bottom: 6px;
}

.subdomain-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.subdomain-preview-list .pill {
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 10px;
}

.motd-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  white-space: pre !important;
  resize: vertical !important;
  line-height: 1.5;
}

.backup-schedule-card {
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.backup-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.backup-toggle span strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.backup-toggle span small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.last-run-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}


