/* ============================================================
   WHServer — EC2 Service Launch Portal
   ============================================================ */

/* --- Reset & Base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
.field-example { display: block; font-size: .78rem; color: var(--text-muted); margin-top: .25rem; user-select: text; }
.field-example code { user-select: all; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0 .3rem; }
.field-example button { border: 0; background: none; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; padding: 0 .2rem; }

:root {
  --primary:    #0066dd;   /* 5.0:1 on the page background, 4.7:1 on the pale blue of active items */
  --primary-dk: #0052b3;
  --danger:     #d73a49;
  --success:    #22863a;
  --text:       #1a1a2e;
  --text-muted: #57606a;
  --bg:         #f6f8fa;
  --surface:    #ffffff;
  --border:     #d0d7de;   /* lines between things (decorative) */
  --border-input: #8c959f; /* form fields' edges: 3:1 against white, so they can be seen */
  --radius:     8px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10);
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: .875em;
  background: #f0f2f4;
  padding: 1px 4px;
  border-radius: 4px;
}

/* --- Navbar ---------------------------------------------- */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.nav-brand:hover { text-decoration: none; color: var(--primary); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-link {
  color: var(--text-muted);
  font-size: .9rem;
}
.nav-link:hover { color: var(--primary); text-decoration: none; }
/* Divider between the shared-hosting links and secondary sections (EC2) */
.nav-sep { width: 1px; height: 1.1rem; background: var(--border); }
.nav-link-secondary { font-size: .85rem; }

/* Dashboard sections: shared hosting first, other services de-emphasised */
.dash-section { margin-bottom: 2rem; }
.section-title {
  margin: 0 0 .75rem; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted);
}
.dash-section-secondary { padding-top: 1.5rem; border-top: 1px solid var(--border); }
.nav-user { font-size: .9rem; color: var(--text-muted); }
.logout-form { display: inline; }

/* --- Container ------------------------------------------- */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* --- Page header ----------------------------------------- */
.page-header { margin-bottom: 2rem; }
.page-header h2 { font-size: 1.6rem; margin-bottom: .35rem; }
.page-header p  { color: var(--text-muted); }

/* --- Breadcrumb ------------------------------------------ */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb-sep { color: var(--text-muted); user-select: none; }
.breadcrumb-current { color: var(--text); font-weight: 500; }

/* --- Buttons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dk); border-color: var(--primary-dk); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding: .4rem .75rem;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-block { width: 100%; justify-content: center; margin-top: .25rem; }

/* --- Auth page ------------------------------------------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #e8f0fe 0%, #f6f8fa 100%);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow-md);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 420px;
}
.auth-header { text-align: center; margin-bottom: 1.75rem; }
.auth-header h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.auth-header p  { color: var(--text-muted); font-size: .9rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .875rem; color: var(--text-muted); }

/* --- Forms ----------------------------------------------- */
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.form-group label { font-size: .875rem; font-weight: 500; }
.form-group small { font-weight: 400; color: var(--text-muted); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: .5rem .75rem;
  border: 1px solid var(--border-input);
  border-radius: var(--radius);
  font-size: .9rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,112,243,.15);
}

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem .25rem;
  margin-bottom: 1.25rem;
}
legend {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  padding: 0 .4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}
.form-group-half { max-width: 50%; }
@media (max-width: 600px) { .form-group-half { max-width: 100%; } }

.launch-form { max-width: 760px; }

.form-actions {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin-top: .5rem;
}

/* --- Alerts ---------------------------------------------- */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .9rem;
}
.alert-error   { background: #ffeef0; border: 1px solid #ffc1c1; color: var(--danger); }
.alert-warning { background: #fff8e1; border: 1px solid #f0d58a; color: #7a5300; }
.alert-success { background: #e6ffed; border: 1px solid #9be9a8; color: var(--success); }

/* --- Action cards ---------------------------------------- */
.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
  margin-bottom: 2rem;
}
.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  text-align: left;
  color: var(--text);
  transition: box-shadow .15s, transform .15s;
  text-decoration: none;
}
.action-card:hover {
  text-decoration: none;
  border-color: var(--primary);
}
.action-icon { display: inline-flex; width: 1.9rem; height: 1.9rem; align-items: center; justify-content: center; border-radius: 6px; background: #e8f1fe; color: var(--primary-dk); margin-bottom: .5rem; }
.action-icon .ico { width: 18px; height: 18px; }
.action-card h3 { margin-bottom: .25rem; font-size: .98rem; }
.action-card p  { font-size: .85rem; color: var(--text-muted); }

/* --- Data table ------------------------------------------ */
.launches-section h3 { margin-bottom: 1rem; }

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: .875rem;
  background: var(--surface);
}
.data-table th {
  padding: .65rem 1rem;
  text-align: left;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  white-space: nowrap;
}
.data-table td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fbff; }

/* --- Badges ---------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-launched, .badge-running { background: #e6ffed; color: #22863a; }
.badge-pending  { background: #fff8e1; color: #9a6700; }
.badge-failed, .badge-terminated, .badge-stopped { background: #ffeef0; color: #d73a49; }

.empty-state { color: var(--text-muted); font-size: .9rem; padding: 1.5rem 0; }

/* --- Marketplace plan cards ------------------------------- */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: .75rem 0 .5rem;
}
.plan-card {
  display: flex;
  cursor: pointer;
}
.plan-card input[type="radio"] { display: none; }
.plan-card-body {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.plan-card:hover .plan-card-body { border-color: var(--primary); }
.plan-card input[type="radio"]:checked + .plan-card-body {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,112,243,.15);
}
.plan-name  { font-weight: 700; font-size: 1rem; }
.plan-desc  { font-size: .8rem; color: var(--text-muted); }
.plan-price { font-size: 1.1rem; font-weight: 600; color: var(--primary); margin-top: .25rem; }

.input-narrow { max-width: 200px; }

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  font-size: .9rem;
}
.checkbox-label input[type="checkbox"] { width: auto; }

/* ── Shared hosting (admin) ─────────────────────────────────────────────── */
.btn-sm     { padding: .3rem .7rem; font-size: .85rem; }
.btn-danger { background: var(--surface); color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: #ffeef0; }

.hs-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
}
.hs-card-head {
  display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap;
  padding-bottom: .75rem; margin-bottom: .25rem; border-bottom: 1px solid var(--border);
}
.hs-card-head h3 { margin: 0; font-size: 1.15rem; }
.hs-owner { color: var(--text-muted); font-size: .9rem; }
.hs-section { margin-top: 1.25rem; }
.hs-section h4 {
  margin: 0 0 .5rem; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted);
}
.hs-inline { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; margin: 0; }
.hs-inline .form-group { margin-bottom: 0; }
.hs-inline input, .hs-inline select, .hs-inline textarea { width: auto; min-width: 11rem; }
.hs-inline-row { display: inline-flex; gap: .5rem; align-items: center; margin: 0; }
.hs-inline-row select { width: auto; min-width: 5.5rem; padding-top: .3rem; padding-bottom: .3rem; }
.hs-chip {
  display: inline-block; background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: .15rem .65rem; margin: 0 .4rem .4rem 0;
  font-family: ui-monospace, monospace; font-size: .85rem;
}
.hs-hint { color: var(--text-muted); font-size: .85rem; margin: .4rem 0 0; }
.hs-remove { text-align: left; display: inline-block; }
.hs-remove > summary { text-align: right; }
.hs-remove .hs-inline-row { display: flex; margin-top: .4rem; justify-content: flex-end; }
.hs-remove input[type=text] { width: 14rem; }
.hs-danger > summary { cursor: pointer; color: var(--danger); font-weight: 600; font-size: .9rem; }
.hs-danger[open] > summary { margin-bottom: .5rem; }
.hs-danger .hs-inline { margin-top: .75rem; }
.field-hint { font-size: .8rem; color: var(--text-muted); }
.mono { font-family: ui-monospace, monospace; font-size: .85rem; }

/* Admin: server list */
.hs-servers { display: flex; flex-direction: column; gap: .75rem; margin-bottom: .5rem; }
.hs-server {
  display: grid; grid-template-columns: minmax(12rem, 1.4fr) 2fr minmax(9rem, 1fr) auto;
  gap: 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem 1.25rem;
}
.hs-server-main { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.hs-server-name { font-weight: 600; font-size: 1.05rem; }
.hs-server-addr { color: var(--text-muted); font-size: .8rem; }
.hs-server-php .hs-chip { margin-bottom: .25rem; font-family: inherit; font-size: .8rem; }
.hs-chip-legacy { background: #fff8e1; border-color: #f0d58a; color: #9a6700; }
.hs-server-usage { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; color: var(--text-muted); }
.hs-server-usage strong { color: var(--text); }
.hs-meter { display: block; height: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.hs-meter > span { display: block; height: 100%; background: var(--primary); }
.hs-server-actions { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; }
.hs-server-actions form { margin: 0; }
@media (max-width: 800px) {
  .hs-server { grid-template-columns: 1fr; gap: .6rem; }
  .hs-server-actions { justify-content: flex-start; }
}

/* Admin: add-server panel */
.hs-add { margin-top: 1.5rem; }
.hs-add > summary { cursor: pointer; list-style: none; }
.hs-add > summary::-webkit-details-marker { display: none; }
.hs-add-title { font-weight: 600; font-size: 1.1rem; color: var(--primary); }
.hs-add[open] > summary { padding-bottom: .75rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.hs-add-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2rem; align-items: start; }
.hs-add-form textarea { resize: vertical; }
.hs-row { display: grid; grid-template-columns: 1fr 7rem; gap: 1rem; }
.hs-php { padding-bottom: .9rem; }
.hs-php-group { margin-bottom: .6rem; }
.hs-php-options { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.hs-php-opt {
  display: inline-flex; align-items: center; gap: .35rem; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; padding: .25rem .7rem; font-size: .85rem; background: var(--surface);
}
.hs-php-opt input { margin: 0; }
.hs-php-opt:has(input:checked) { border-color: var(--primary); background: rgba(0,112,243,.06); }
.hs-php-opt.legacy:has(input:checked) { border-color: #d4a72c; background: #fff8e1; }
.hs-steps { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; font-size: .875rem; }
.hs-steps h4 { margin: 0 0 .5rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.hs-steps ol { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .75rem; }
.hs-steps pre {
  margin: .4rem 0 0; padding: .5rem .65rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; font-size: .75rem; white-space: pre-wrap; word-break: break-all;
}
@media (max-width: 900px) {
  .hs-add-grid { grid-template-columns: 1fr; }
  .hs-steps { order: -1; }
}

/* Admin: server and account pages */
.hs-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.hs-page-head p .hs-chip { margin: 0 .25rem 0 0; }
.hs-stats { display: flex; gap: .5rem; flex-wrap: wrap; }
.hs-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .45rem .8rem; font-size: .85rem; color: var(--text-muted); }
.hs-stat strong { color: var(--text); font-size: 1.05rem; }
.hs-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.hs-toolbar h3 { margin: 0; }
.hs-search { width: 100%; max-width: 22rem; padding: .45rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .9rem; background: var(--surface); }
.hs-accounts td { vertical-align: top; }
.hs-domain { display: inline-flex; align-items: center; gap: .3rem; margin: 0 .75rem .25rem 0; white-space: nowrap; }
.hs-muted { color: var(--text-muted); font-size: .85rem; }
.hs-count { margin-top: .15rem; font-size: .75rem; }
.hs-chip-sm { font-size: .72rem; padding: .05rem .45rem; margin: 0; font-family: inherit; }
.hs-row-even { grid-template-columns: 1fr 1fr; }
.hs-detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); gap: 1.5rem; align-items: start; }
.hs-site-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.hs-site { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .75rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.hs-site-name { display: flex; flex-direction: column; min-width: 0; }
.hs-site-name strong { overflow-wrap: anywhere; }
.hs-site-meta { font-size: .8rem; color: var(--text-muted); }
.hs-site .hs-remove { justify-self: end; }
.hs-add-row { margin-top: 1rem; }
.hs-grow { flex: 1 1 14rem; }
.hs-grow input { width: 100%; }
.hs-prefixed { display: flex; align-items: stretch; }
.hs-prefixed span { display: flex; align-items: center; padding: 0 .6rem; background: var(--bg); border: 1px solid var(--border); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); font-family: ui-monospace, monospace; font-size: .85rem; color: var(--text-muted); }
.hs-prefixed input { border-radius: 0 var(--radius) var(--radius) 0; min-width: 0; }
@media (max-width: 900px) {
  .hs-detail-grid { grid-template-columns: 1fr; }
  .hs-site { grid-template-columns: 1fr; }
  .hs-site .hs-remove { justify-self: start; }
}

/* Admin: server overview (hero, health tiles, account list) */
.hs-hero {
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow); padding: 1.25rem 1.5rem; margin-bottom: 2rem;
}
.hs-hero-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.hs-hero-id { display: flex; gap: .9rem; align-items: center; }
.hs-hero-icon { font-size: 1.6rem; width: 3rem; height: 3rem; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; }
.hs-hero-id h2 { font-size: 1.45rem; margin: 0 0 .2rem; }
.hs-hero-sub { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.hs-hero-sub code { color: var(--text-muted); }
.hs-hero-php { text-align: right; }
.hs-hero-php .hs-chip { margin: .3rem 0 0 .3rem; }
.hs-label { display: block; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.hs-status { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.hs-dot { width: .5rem; height: .5rem; border-radius: 50%; background: #afb8c1; }
.hs-status[data-state="checking"] .hs-dot { animation: hs-pulse 1s ease-in-out infinite; }
.hs-status[data-state="up"] { background: #e6ffed; color: var(--success); border-color: #b4e5c0; }
.hs-status[data-state="up"] .hs-dot { background: #2da44e; box-shadow: 0 0 0 3px rgba(45,164,78,.2); }
.hs-status[data-state="down"] { background: #ffeef0; color: var(--danger); border-color: #ffc1c1; }
.hs-status[data-state="down"] .hs-dot { background: var(--danger); }
@keyframes hs-pulse { 50% { opacity: .3; } }

.hs-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin-top: 1.25rem; }
.hs-tile { display: flex; flex-direction: column; gap: .35rem; padding: .85rem 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.hs-tile-value { font-size: 1.35rem; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-tile-value small { font-size: .8rem; font-weight: 500; color: var(--text-muted); }
.hs-tile-note { font-size: .75rem; color: var(--text-muted); }
.hs-skeleton { color: #c4ccd4; }
.hs-bar { display: block; height: 6px; background: #e7ebef; border-radius: 999px; overflow: hidden; margin-top: auto; }
.hs-bar > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .4s ease; }
.hs-bar.is-mid > span { background: #d4a72c; }
.hs-bar.is-high > span { background: var(--danger); }
.hs-bar-sm { height: 5px; width: 4.5rem; margin: 0; flex: none; }

.hs-toolbar-actions { display: flex; gap: .5rem; align-items: center; flex: 1; justify-content: flex-end; }
.hs-toolbar-actions .hs-search { max-width: 20rem; }
.hs-count-pill { display: inline-block; font-size: .75rem; font-weight: 600; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: .05rem .5rem; vertical-align: middle; color: var(--text-muted); }

.hs-acct-list { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); box-shadow: var(--shadow); overflow: hidden; }
.hs-acct-head, .hs-acct {
  display: grid; grid-template-columns: minmax(11rem, 1.3fr) minmax(13rem, 2fr) minmax(6rem, .8fr) 4.5rem minmax(7.5rem, .9fr) 6.5rem;
  gap: 1rem; align-items: center; padding: .85rem 1.25rem;
}
.hs-acct-head { background: var(--bg); border-bottom: 1px solid var(--border); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding-top: .6rem; padding-bottom: .6rem; }
.hs-acct { border-bottom: 1px solid var(--border); align-items: start; transition: background .12s; }
.hs-acct:last-of-type { border-bottom: 0; }
.hs-acct:hover { background: #fafbfc; }
.hs-acct-id { display: flex; gap: .7rem; align-items: center; min-width: 0; }
.hs-avatar { width: 2.2rem; height: 2.2rem; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--primary); background: rgba(0,112,243,.1); }
.hs-acct-name { display: block; font-weight: 600; font-size: 1rem; }
.hs-acct-owner { font-size: .8rem; color: var(--text-muted); }
.hs-acct > div { align-self: center; }
.hs-acct-sites { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.hs-meter-row { display: flex; align-items: center; gap: .5rem; font-size: .8rem; }
.hs-primary-domain { font-weight: 500; overflow-wrap: anywhere; }
.hs-domains > summary { cursor: pointer; list-style: none; display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; }
.hs-domains > summary::-webkit-details-marker { display: none; }
.hs-more { font-size: .75rem; font-weight: 600; color: var(--primary); background: rgba(0,112,243,.08); border-radius: 999px; padding: .05rem .5rem; white-space: nowrap; }
.hs-domains[open] .hs-more { background: var(--primary); color: #fff; }
.hs-domains ul { list-style: none; margin: .5rem 0 0; padding: .4rem .6rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); max-height: 14rem; overflow: auto; }
.hs-domains li { display: flex; justify-content: space-between; gap: .75rem; padding: .25rem 0; font-size: .85rem; border-bottom: 1px dashed var(--border); }
.hs-domains li:last-child { border-bottom: 0; }
.hs-domains li > span:first-child { overflow-wrap: anywhere; }
.hs-acct-php { display: flex; flex-wrap: wrap; gap: .25rem; }
.hs-ssl { font-weight: 600; font-size: .85rem; padding: .1rem .5rem; border-radius: 999px; }
.hs-ssl.is-full { color: var(--success); background: #e6ffed; }
.hs-ssl.is-part { color: #9a6700; background: #fff8e1; }
.hs-ssl.is-none { color: var(--danger); background: #ffeef0; }
.hs-acct-go { justify-self: end; }
.hs-mobile-label { display: none; }
.hs-empty { display: flex; gap: 1rem; align-items: center; }
.hs-empty > span { font-size: 2rem; }

@media (max-width: 1000px) {
  .hs-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hs-acct-head { display: none; }
  .hs-acct { grid-template-columns: 1fr 1fr; }
  .hs-acct-id, .hs-acct-sites { grid-column: 1 / -1; }
  .hs-acct-go { grid-column: 1 / -1; justify-self: start; }
  .hs-mobile-label { display: block; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); width: 100%; }
  .hs-hero-php { text-align: left; }
  .hs-hero-php .hs-chip { margin: .3rem .3rem 0 0; }
}
@media (max-width: 560px) {
  .hs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hs-toolbar-actions { flex-wrap: wrap; justify-content: flex-start; }
  .hs-toolbar-actions .hs-search { max-width: none; }
}

/* Customer: databases with import / export */
.hs-db-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.hs-db { border-bottom: 1px solid var(--border); padding: .85rem 0; }
.hs-db:last-child { border-bottom: 0; }
.hs-db-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hs-db-name { display: flex; gap: .6rem; align-items: center; min-width: 0; }
.hs-db-name code { font-size: .95rem; font-weight: 600; }
.hs-db-status { display: block; font-size: .8rem; margin-top: .15rem; }
.hs-db-status.is-running, .hs-db-status.is-queued { color: var(--primary); }
.hs-db-status.is-done { color: var(--success); }
.hs-db-status.is-failed { color: var(--danger); }
.hs-db-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.hs-db-actions form { margin: 0; }
.hs-db-panel { margin-top: .85rem; padding: 1rem 1.1rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.hs-db-danger { border-color: #ffc1c1; background: #fff8f8; }
.hs-check { display: inline-flex; gap: .45rem; align-items: center; font-size: .88rem; margin: .6rem 0 0; cursor: pointer; }
.hs-conn th { width: 11rem; }
.hs-import-tabs a { padding: .45rem .75rem; font-size: .875rem; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.hs-import-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.hs-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1rem; max-width: 44rem; }
.hs-form-grid .span-2 { grid-column: 1 / -1; }
/* Required fields: a marker after the label (the field's own required attribute says so to screen readers). */
.hs-form-grid .form-group:has(:required) > label:not(:has(.req))::after, .req { content: " *"; color: var(--danger); font-weight: 600; }
.hs-form-grid input, .hs-form-grid select { width: 100%; }
@media (max-width: 640px) { .hs-form-grid { grid-template-columns: 1fr; } }
.hs-danger-card .hs-inline-row .btn { white-space: nowrap; }
.hs-check input { width: auto; min-width: 0; margin: 0; flex: none; }
.hs-import-tabs { display: flex; gap: .25rem; margin: .75rem 0 1rem; border-bottom: 1px solid var(--border); }
.hs-import-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: .45rem .75rem; font: inherit; font-size: .875rem; color: var(--text-muted); cursor: pointer; }
.hs-import-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.hs-import-form { max-width: 34rem; }
.hs-import-form input[type=file] { font-size: .85rem; }
.hs-progress { display: flex; align-items: center; gap: .75rem; margin-top: .75rem; }
.hs-progress .hs-bar { flex: 1; margin: 0; height: 8px; }
.hs-form-msg { margin-top: .75rem; font-size: .875rem; padding: .5rem .75rem; border-radius: var(--radius); }
.hs-form-msg.ok { background: #e6ffed; color: var(--success); }
.hs-form-msg.err { background: #ffeef0; color: var(--danger); }

/* Account security */
.hs-mfa-setup { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; margin-top: .75rem; }
.hs-mfa-setup img { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.hs-steps-list { margin: 0 0 1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; font-size: .9rem; }
.hs-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem; margin-top: .75rem; }

/* Admin: dynamic resources */
[data-memtext] { white-space: nowrap; }
.hs-membar { position: relative; height: 8px; background: #e7ebef; border-radius: 999px; margin: .35rem 0 .3rem; overflow: visible; }
.hs-membar-fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.hs-membar-fill.is-mid { background: #d4a72c; }
.hs-membar-fill.is-high { background: var(--danger); }
.hs-membar-mark { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text); border-radius: 1px; }

/* Admin: central mail queue */
.container-wide { max-width: 1280px; }
.hs-mail-servers { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.25rem; }
.hs-mail-server { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .9rem; border: 1px solid #b4e5c0; background: #f3fcf5; border-radius: var(--radius); font-size: .85rem; min-width: 14rem; }
.hs-mail-server span { color: var(--text-muted); }
.hs-mail-server.is-warn { border-color: #f0d58a; background: #fffbea; }
.hs-mail-server.is-down { border-color: #ffc1c1; background: #fff4f4; }
.hs-mail-filters select { width: auto; }
.hs-mail-bulk { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .6rem .9rem; margin-bottom: .75rem; background: #f0f7ff; border: 1px solid #b6d4fe; border-radius: var(--radius); }
.hs-mail-table td { vertical-align: top; font-size: .875rem; }
.hs-mail-addr div, .hs-mail-subj { overflow-wrap: anywhere; }
.hs-mail-subj { max-width: 22rem; }
.hs-qstate { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); }
.hs-chip-paused { background: #fff8e1; border-color: #f0d58a; color: #9a6700; }
.hs-qstate.is-hold { background: #fff8e1; border-color: #f0d58a; color: #9a6700; }
.hs-qstate.is-deferred { background: #ffeef0; border-color: #ffc1c1; color: var(--danger); }
.hs-qstate.is-active { background: #e6ffed; border-color: #b4e5c0; color: var(--success); }
.hs-qreason { font-size: .75rem; max-width: 14rem; margin-top: .2rem; }
.hs-mail-row-acts { white-space: nowrap; text-align: right; }
.hs-mail-msg { overflow-wrap: anywhere; min-width: 12rem; }
.hs-sd { border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem .9rem; margin-top: .75rem; }
.hs-sd > summary { cursor: pointer; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.hs-sd[open] > summary { margin-bottom: .5rem; }
.hs-dns-table td { font-size: .8rem; vertical-align: middle; }
.hs-dns-table code { word-break: break-all; }
.hs-copy { cursor: copy; }
.hs-plain-list { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-direction: column; gap: .3rem; font-size: .875rem; }
.hs-copy.is-copied { background: #e6ffed; }
.hs-mail-msg .hs-muted { font-size: .8rem; margin-top: .15rem; }
.hs-mail-row-acts .btn { margin-left: .25rem; }

/* Admin: backups panel and recovery key */
.hs-backups-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hs-backups-head form { margin: 0; }
.hs-bk-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.hs-bk-facts > div { display: flex; flex-direction: column; gap: .2rem; padding: .6rem .8rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); font-size: .9rem; }
.hs-bk-config { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .85rem; }
.hs-bk-config > summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--primary); }
.hs-recovery { border: 2px solid #d4a72c; background: #fffbea; }
.hs-recovery-table th { width: 15rem; white-space: nowrap; }
.hs-secret { font-size: 1rem; user-select: all; background: var(--surface); padding: .2rem .4rem; border: 1px solid var(--border); border-radius: 4px; word-break: break-all; }
@media (max-width: 860px) { .hs-bk-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Customer: per-site PHP settings */
.hs-settings-row > td { background: var(--bg); }
.hs-settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .25rem 1.25rem; }
.hs-settings-grid .form-group { margin-bottom: .6rem; }
.hs-settings-grid .form-group.is-changed label::after { content: " • changed"; color: var(--primary); font-weight: 600; font-size: .75rem; }
.hs-settings-grid .field-hint { font-size: .75rem; }

/* Customer: cron jobs */
.hs-cron-list { list-style: none; margin: 0 0 1.5rem; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); box-shadow: var(--shadow); }
.hs-cron { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); }
.hs-cron:last-child { border-bottom: 0; }
.hs-cron.is-off .hs-cron-main { opacity: .6; }
.hs-cron-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(10rem, 1fr) auto; gap: 1rem; align-items: center; }
.hs-cron-main { min-width: 0; overflow-wrap: anywhere; }
.hs-cron-when { font-size: .85rem; margin-top: .2rem; }
.hs-cron-last .hs-muted { font-size: .8rem; margin-top: .15rem; }
.hs-cron-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.hs-cron-actions form { margin: 0; }
.hs-radio-tab { display: inline-flex; gap: .4rem; align-items: center; padding: .45rem .75rem; font-size: .875rem; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.hs-radio-tab:has(input:checked) { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.hs-radio-tab input { margin: 0; }
.hs-cron-form { max-width: 40rem; }
@media (max-width: 860px) { .hs-cron-row { grid-template-columns: 1fr; } .hs-cron-actions { justify-content: flex-start; } }

/* Customer: backups timeline */
.hs-backup-head { display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.hs-backup-head > div:first-child { flex: 1 1 24rem; }
.hs-restore-status { display: flex; gap: .6rem; align-items: center; padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; border: 1px solid var(--border); background: var(--surface); font-size: .9rem; }
.hs-restore-status[data-state="running"] { border-color: #b6d4fe; background: #f0f7ff; color: var(--primary); }
.hs-restore-status[data-state="running"] .hs-restore-icon::before { content: "⏳"; }
.hs-restore-status[data-state="done"] { border-color: #b4e5c0; background: #e6ffed; color: var(--success); }
.hs-restore-status[data-state="done"] .hs-restore-icon::before { content: "✓"; font-weight: 700; }
.hs-restore-status[data-state="failed"] { border-color: #ffc1c1; background: #ffeef0; color: var(--danger); }
.hs-restore-status[data-state="failed"] .hs-restore-icon::before { content: "✗"; font-weight: 700; }
.hs-timeline { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); box-shadow: var(--shadow); }
.hs-snap { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); position: relative; }
.hs-snap:last-child { border-bottom: 0; }
.hs-snap-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hs-snap-when { display: flex; gap: .85rem; align-items: center; }
.hs-snap-when strong { margin-right: .35rem; }
.hs-snap-dot { width: .7rem; height: .7rem; border-radius: 50%; background: #c4ccd4; flex: none; box-shadow: 0 0 0 3px #eef1f4; }
.hs-snap-dot.is-latest { background: var(--success); box-shadow: 0 0 0 3px rgba(45,164,78,.18); }
.hs-chip-latest { background: #e6ffed; border-color: #b4e5c0; color: var(--success); margin-left: .35rem; }
.hs-snap-actions { display: flex; gap: .4rem; }
.hs-dl-options { display: flex; flex-wrap: wrap; gap: .4rem; }
.hs-import-tabs button[disabled] { opacity: .4; cursor: not-allowed; }

.hs-panel { max-width: 40rem; }
.hs-panel textarea { width: 100%; font-family: ui-monospace, monospace; font-size: .8rem; }
.hs-panel input[type="text"], .hs-panel input[type="number"] { width: 100%; }

/* Customer hosting: section tabs and log viewer */
.hs-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.hs-tabs a { padding: .55rem .9rem; color: var(--text-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: .95rem; }
.hs-tabs a:hover { color: var(--text); }
.hs-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.hs-log { background: #0d1117; color: #e6edf3; padding: 1rem; border-radius: var(--radius); overflow: auto; max-height: 28rem; font-size: .8rem; margin-top: 1rem; white-space: pre-wrap; word-break: break-all; }

/* ── Billing ─────────────────────────────────────────────────────────────── */
.bl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.bl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.bl-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; }
.bl-tile b { display: block; font-size: 1.35rem; margin-top: .15rem; }
.bl-tile span { color: var(--text-muted); font-size: .85rem; }
.bl-tile-warn b { color: var(--danger); }
.bl-subnav { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; }
.bl-subnav a { padding: .5rem .85rem; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.bl-subnav a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.bl-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.bl-filters a { padding: .25rem .7rem; border: 1px solid var(--border); border-radius: 999px; font-size: .85rem; color: var(--text-muted); }
.bl-filters a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.bl-status { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.bl-s-paid, .bl-s-active { background: #e6ffed; color: #22863a; }
.bl-s-unpaid, .bl-s-pending { background: #fff8e1; color: #9a6700; }
.bl-s-overdue, .bl-s-suspended { background: #ffeef0; color: #d73a49; }
.bl-s-cancelled, .bl-s-terminated, .bl-s-refunded { background: #eef1f4; color: #57606a; }
.bl-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bl-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.bl-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.bl-plan { position: relative; display: block; cursor: pointer; }
.bl-plan input { position: absolute; opacity: 0; }
.bl-plan-body { border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1rem 1.1rem; height: 100%; }
.bl-plan:hover .bl-plan-body { border-color: var(--primary); }
.bl-plan input:checked + .bl-plan-body { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,112,243,.15); }
.bl-plan input:focus-visible + .bl-plan-body { outline: 2px solid var(--primary); outline-offset: 2px; }
.bl-plan h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
.bl-plan ul { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--text-muted); font-size: .88rem; }
.bl-price { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.bl-price small { font-size: .8rem; font-weight: 400; color: var(--text-muted); }
.bl-acct-billing { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .8rem 1rem; }
.bl-card-on-file { display: flex; align-items: center; gap: .6rem; font-size: 1rem; }
.bl-kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; font-size: .92rem; }
.bl-kv dt { color: var(--text-muted); }
.bl-kv dd { margin: 0; }
.bl-lines { display: grid; gap: .5rem; }
.bl-lines .form-row { margin: 0; }

/* The invoice document: on screen as a card, on paper on its own. */
.bl-doc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; margin-bottom: 1.25rem; }
.bl-doc-top { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.bl-doc-top h1 { margin: 0; font-size: 1.6rem; }
.bl-doc-addr { white-space: pre-line; font-size: .9rem; line-height: 1.45; }
.bl-doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.bl-doc-parties h4 { margin: 0 0 .3rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.bl-doc table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.bl-doc th { text-align: left; border-bottom: 2px solid var(--border); padding: .5rem .4rem; font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.bl-doc td { border-bottom: 1px solid var(--border); padding: .55rem .4rem; vertical-align: top; }
.bl-doc tfoot td { border: 0; padding: .3rem .4rem; }
.bl-doc tfoot tr.bl-total td { font-weight: 700; font-size: 1.05rem; border-top: 2px solid var(--border); }
.bl-doc-stamp { font-size: 1.1rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bl-doc-stamp.bl-s-paid { color: #22863a; background: none; }
.bl-doc-stamp.bl-s-unpaid, .bl-doc-stamp.bl-s-overdue { color: #d73a49; background: none; }
.bl-doc-foot { margin-top: 1.25rem; font-size: .85rem; color: var(--text-muted); white-space: pre-line; }

@media (max-width: 760px) {
  .bl-grid, .bl-doc-parties { grid-template-columns: 1fr; }
  .bl-doc { padding: 1.1rem; }
}
@media print {
  .navbar, .breadcrumb, .bl-noprint, .alert { display: none !important; }
  body { background: #fff; }
  .container { max-width: none; padding: 0; }
  .bl-doc { border: 0; padding: 0; }
}
.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; }
.bl-cycles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-bottom: .5rem; }
.bl-cycles .bl-plan-body { padding: .8rem 1rem; }
.bl-cycles .bl-price { font-size: 1.2rem; }
.bl-cycles p { margin: .25rem 0 0; font-size: .85rem; }

/* Plan builder */
.bl-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.bl-inline { display: inline; margin: 0; }
.bl-nowrap { white-space: nowrap; }
.bl-badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 600; vertical-align: middle; }
.bl-plan-body .bl-badge { position: absolute; top: -.6rem; right: .9rem; }
.bl-builder { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.bl-builder .hs-card { margin-bottom: 1rem; }
.bl-preview { position: sticky; top: 1rem; }
.bl-preview .bl-plan { cursor: default; }
.bl-preview .bl-plan-body { border-color: var(--primary); }
.bl-chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
.bl-chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .15rem .6rem; font-size: .8rem; cursor: pointer; color: var(--text); }
.bl-chip:hover, .bl-chip[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); }
.bl-price-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.bl-price-table th { text-align: left; font-size: .78rem; color: var(--text-muted); font-weight: 500; padding: .3rem .4rem; border-bottom: 1px solid var(--border); }
.bl-price-table td { padding: .35rem .4rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.bl-price-table input { width: 6.5rem; margin: 0; }
.bl-price-table .bl-calc { color: var(--text-muted); font-size: .82rem; white-space: nowrap; }
.bl-fit { list-style: none; padding: 0; margin: .5rem 0 0; font-size: .85rem; }
.bl-fit li { padding: .2rem 0; }
.bl-fit .bl-bad { color: var(--danger); }
.bl-summary { font-size: .85rem; color: var(--text-muted); margin-top: .75rem; }
.bl-summary strong { color: var(--text); }
@media (max-width: 900px) { .bl-builder { grid-template-columns: 1fr; } .bl-preview { position: static; } }

/* Email accounts */
.hs-chip-ok { background: #e6ffed; border-color: #9be9a8; color: var(--success); }
.hs-mail-domain, .hs-mail-box { border: 1px solid var(--border, #e2e5ea); border-radius: 8px; padding: .6rem .9rem; margin: .5rem 0; }
.hs-mail-domain > summary, .hs-mail-box > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; overflow-wrap: anywhere; }
.hs-mail-box .form-row { flex-wrap: wrap; }

/* Cloudflare set-up preview */
.cf-plan { display: grid; gap: .5rem; margin: .5rem 0 1rem; }
.cf-item { display: flex; gap: .65rem; align-items: flex-start; padding: .65rem .8rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.cf-item input { margin-top: .25rem; }
.cf-item.is-same { cursor: default; opacity: .75; }
.cf-item.is-replace { border-color: #d4a72c; }
.cf-tick { color: var(--success); font-weight: 700; width: 13px; }
.cf-badge { display: inline-block; margin-left: .35rem; padding: 0 .4rem; border-radius: 999px; font-size: .72rem; background: #fff8c5; color: #7d4e00; vertical-align: middle; }

/* Alias domains under a website */
.hs-alias-row td { padding-top: 0; border-top: 0; }
.hs-aliases { display: grid; gap: .35rem; padding: .1rem 0 .4rem 1rem; border-left: 2px solid var(--border); }
.hs-alias { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.hs-alias-add summary { cursor: pointer; font-size: .85rem; color: var(--primary, #0969da); }
.hs-alias-add form { margin-top: .4rem; flex-wrap: wrap; }
.cf-row { border-top: 1px solid var(--border); padding: .85rem 0; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cf-state { font-weight: 600; }
.cf-ok { color: var(--success); }
.cf-wait { color: #9a6700; }
.cf-review { font-size: .85rem; white-space: nowrap; }

/* ============================================================
   Navigation shell (2026-11 redesign): top bar, account menu,
   and a left sidebar for a hosting account and for admin.
   ============================================================ */
.ico { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.navbar { padding: 0 1.25rem; height: 52px; gap: 1rem; }
.nav-left, .nav-right { display: flex; align-items: center; gap: 1.25rem; min-width: 0; }
.nav-links { gap: 1.1rem; }
.nav-link { color: var(--text-muted); font-size: .92rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav-link.is-active { color: var(--text); font-weight: 600; border-bottom-color: var(--primary); }
.nav-link-admin { display: inline-flex; align-items: center; gap: .35rem; color: var(--text); font-weight: 600; }
.nav-admin-pill { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--text); padding: .15rem .55rem; border-radius: 999px; }
.nav-menu { position: relative; }
.nav-menu summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; color: var(--text-muted); padding: .25rem .4rem; border-radius: var(--radius); }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover, .nav-menu[open] summary { background: var(--bg); color: var(--text); }
.nav-menu summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; background: #e8f0fe; color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.nav-menu-name { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-menu-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: .35rem; display: grid; z-index: 120; }
.nav-menu-list a, .nav-menu-list button { display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem; border-radius: 6px; color: var(--text); font: inherit; font-size: .9rem; text-align: left; background: none; border: 0; cursor: pointer; width: 100%; }
.nav-menu-list a:hover, .nav-menu-list button:hover { background: var(--bg); text-decoration: none; }
.nav-menu-list form { border-top: 1px solid var(--border); margin-top: .3rem; padding-top: .3rem; }
.nav-menu-list .ico { color: var(--text-muted); }

/* Sidebar: fixed under the top bar; the page's .container moves over beside it. */
.side-nav { position: fixed; top: 52px; bottom: 0; left: 0; width: 232px; overflow-y: auto; background: #fbfcfd; border-right: 1px solid var(--border); padding: .9rem .6rem 1.5rem; display: flex; flex-direction: column; gap: 1px; z-index: 50; }
.side-acct { padding: .2rem .65rem .8rem; margin-bottom: .4rem; border-bottom: 1px solid var(--border); }
.side-acct b { display: block; font-size: .95rem; overflow-wrap: anywhere; }
.side-acct small { color: var(--text-muted); font-size: .8rem; }
.side-acct a { font-size: .8rem; }
.side-grp { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); padding: .9rem .65rem .3rem; }
.side-link { display: flex; align-items: center; gap: .6rem; padding: .42rem .65rem; border-radius: 6px; color: var(--text); font-size: .9rem; }
.side-link .ico { color: var(--text-muted); }
.side-link:hover { background: #eef2f6; text-decoration: none; }
.side-link.is-active { background: #e8f1fe; color: var(--primary); font-weight: 600; }
.side-link.is-active .ico { color: var(--primary); }
.side-count { margin-left: auto; font-size: .7rem; font-weight: 700; background: #fff8e1; color: #9a6700; padding: 0 .45rem; border-radius: 999px; }
.side-plan { margin: 1rem .3rem 0; padding: .7rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: .8rem; color: var(--text-muted); display: grid; gap: .15rem; }
.side-plan b { color: var(--text); font-size: .85rem; }
body:has(> .side-nav) .container { margin: 0 0 0 232px; max-width: 1060px; padding: 1.75rem 2rem 3rem; }
body:has(> .side-nav) .container-wide { max-width: none; }
@media (max-width: 860px) {
  .navbar { height: auto; min-height: 52px; flex-wrap: wrap; padding: .5rem 1rem; }
  .nav-menu-name { display: none; }
  .side-nav { position: static; width: auto; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: .4rem .6rem; gap: .25rem; }
  .side-acct, .side-grp, .side-plan { display: none; }
  .side-link { white-space: nowrap; flex: none; }
  body:has(> .side-nav) .container { margin: 0 auto; padding: 1.25rem 1rem 2.5rem; }
}

/* Page heading inside the shells */
.shell-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.shell-head h2 { font-size: 1.5rem; margin: 0; overflow-wrap: anywhere; }
.shell-head p { color: var(--text-muted); width: 100%; margin: 0; font-size: .92rem; }
.shell-crumb { font-size: .82rem; color: var(--text-muted); margin-bottom: .35rem; }

/* Status chips (meaning only: ok / waiting / off / info) */
.st { display: inline-block; font-size: .75rem; font-weight: 600; padding: .08rem .55rem; border-radius: 999px; white-space: nowrap; line-height: 1.5; }
.st-ok { background: #e6ffed; color: #1a7f37; }
.st-wait { background: #fff8e1; color: #9a6700; }
.st-off { background: #eef1f4; color: var(--text-muted); }
.st-info { background: #e8f1fe; color: #0059c7; }

/* Sub-tabs inside one website */
.sub-tabs { display: flex; gap: .15rem; border-bottom: 1px solid var(--border); margin: 0 0 1.25rem; overflow-x: auto; }
.sub-tabs a { padding: .5rem .9rem; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: .92rem; white-space: nowrap; }
.sub-tabs a:hover { color: var(--text); text-decoration: none; }
.sub-tabs a.is-active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.site-row-link { font-weight: 600; color: var(--text); }
.site-row-link:hover { color: var(--primary); }
.why { display: block; font-size: .8rem; color: var(--text-muted); margin-top: .2rem; max-width: 34rem; }
.dom-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.dom-actions form { display: inline-flex; gap: .35rem; align-items: center; margin: 0; }

/* Overview usage row */
.ov-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.ov-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; display: grid; gap: .2rem; color: var(--text); min-width: 0; }
a.ov-stat:hover { border-color: var(--primary); text-decoration: none; }
.ov-stat small { font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.ov-stat b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ov-stat > div { margin-top: .1rem !important; }
.dom-actions .btn, .data-table .btn { white-space: nowrap; }
.dom-actions { flex-wrap: nowrap; }
.hs-card > .hs-hint + .table-wrapper { margin-top: .75rem; }
.data-table tr.why-row td { padding-top: 0; border-top: 0; }
.data-table tr:has(+ tr.why-row) td { border-bottom: 0; }
.why-row .why { max-width: none; padding-left: .1rem; }
.data-table td:has(> .st) { white-space: nowrap; }
body:has(> .side-nav) .container { max-width: 1180px; }
.dom-actions { flex-wrap: wrap; }

/* Overviews: the "needs attention" list */
.att-h { margin: 0 0 .4rem; font-size: 1.05rem; }
.att-list { list-style: none; margin: 0; padding: 0; }
.att-item { display: grid; grid-template-columns: 1rem 1fr auto; gap: .75rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--border); }
.att-item:first-child { border-top: 0; }
.att-dot { width: .6rem; height: .6rem; border-radius: 50%; justify-self: center; background: #2da44e; }
.att-warn .att-dot { background: #bf8700; }
.att-bad .att-dot { background: var(--danger); }
.att-text { min-width: 0; }
.att-text strong { display: block; font-weight: 600; }
.att-detail { display: block; font-size: .85rem; color: var(--text-muted); overflow-wrap: anywhere; }
.att-item .btn { white-space: nowrap; }
@media (max-width: 560px) { .att-item { grid-template-columns: 1rem 1fr; } .att-item .btn { grid-column: 2; justify-self: start; } }

/* A short list of labels and values */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; font-size: .92rem; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* The brand mark in the top bar */
.nav-brand { display: inline-flex; align-items: center; gap: .4rem; }
.nav-brand .ico { width: 20px; height: 20px; color: var(--primary); }
/* An icon beside text in a button or heading */
.btn .ico, h2 .ico, h3 .ico { vertical-align: -3px; }
h1 .ico { width: 1em; height: 1em; vertical-align: -.12em; color: var(--primary); }

/* ============================================================
   Brand: WHServer by 47 Cloud. Ink indigo, a cool off-white page, mint for what's live,
   Space Grotesk headings, Inter text, IBM Plex Mono for labels, names and buttons.
   Fonts are served from /fonts (no external loads). Contrast checked: body text 5.9:1 or
   more, links 8.4:1, sidebar text 6.3:1 or more, status text 5.2:1, field edges 3.2:1.
   ============================================================ */
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }

:root {
  --ink:        #23215e;
  --ink-2:      #2e2b74;
  --ink-line:   #3a3788;
  --mint:       #5fd3b3;
  --live:       #2fbf97;
  --live-text:  #1f6f58;
  --wait:       #e3a72f;
  --wait-text:  #8a5a00;
  --primary:    #23215e;
  --primary-dk: #17154a;
  --link:       #3b3894;
  --danger:     #b42318;
  --bg:         #eff0ef;
  --surface:    #ffffff;
  --text:       #1b1b1f;
  --text-muted: #585b63;
  --border:     #e0e2e1;
  --border-input: #8e9196;
  --radius:     8px;
  --ring:       0 0 0 3px rgba(59,56,148,.22);
  --font-text:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-head:  "Space Grotesk", "Inter", sans-serif;
  --font-mono:  "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
body { font-family: var(--font-text); -webkit-font-smoothing: antialiased; line-height: 1.5; background: var(--bg); color: var(--text); }
a { color: var(--link); }
h1, h2, h3, h4, .shell-head h2, .page-header h2 { font-family: var(--font-head); letter-spacing: -.02em; font-weight: 600; }
code, pre, kbd { font-family: var(--font-mono); }
code { background: #e9eae9; border-radius: 5px; padding: .05em .35em; }

/* Labels in the brand's spaced capitals */
.eyebrow, .side-grp, .data-table th, .ov-stat small, .hs-label, .bl-tile span {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted);
}
.eyebrow { display: flex; align-items: center; gap: .75rem; color: var(--live-text); margin: 0 0 .5rem; }
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: currentColor; }

/* Top bar */
.navbar { background: rgba(239,240,239,.9); backdrop-filter: saturate(1.3) blur(8px); border-bottom: 1px solid var(--border); box-shadow: none; }
.nav-brand { font-family: var(--font-head); font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.nav-brand .ico { width: 26px; height: 26px; padding: 5px; border-radius: 7px; background: var(--ink); color: #fff; stroke-width: 2.2; }
.nav-brand small { font-family: var(--font-mono); font-weight: 400; font-size: .68rem; color: var(--text-muted); letter-spacing: 0; margin-left: .15rem; }
.nav-link { font-family: var(--font-mono); font-size: .82rem; color: var(--text-muted); }
.nav-link.is-active { color: var(--text); border-bottom-color: var(--ink); }
.nav-admin-pill { background: var(--ink); font-family: var(--font-mono); letter-spacing: .1em; }
.nav-avatar { background: var(--ink); color: #fff; }

/* Sidebar: ink, with a white pill for the current page */
.side-nav { background: var(--ink); border-right: 0; color: #d9d8f2; }
.side-nav .side-grp { color: #a9a7d8; padding-top: 1rem; }
.side-link { color: #d9d8f2; border-radius: 8px; }
.side-link .ico { color: #a9a7d8; }
.side-link:hover { background: var(--ink-2); color: #fff; }
.side-link.is-active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: none; }
.side-link.is-active .ico { color: var(--ink); }
.side-count { background: transparent; color: #ffd27a; font-family: var(--font-mono); font-weight: 500; }
.side-link.is-active .side-count { color: var(--wait-text); }
.side-acct { background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 10px; padding: .6rem .75rem; margin: 0 0 .5rem; }
.side-acct b { color: #fff; }
.side-acct small { color: #b9b7e4; font-family: var(--font-mono); font-size: .72rem; }
.side-plan { background: transparent; border: 0; border-top: 1px solid var(--ink-line); border-radius: 0; color: #d9d8f2; }
.side-plan b { color: #fff; }
.side-plan span { font-family: var(--font-mono); font-size: .75rem; color: #b9b7e4; }
.side-plan a { color: var(--mint); font-family: var(--font-mono); font-size: .75rem; }

/* Cards and stats */
.hs-card, .ov-stat, .action-card, .att, .bl-tile, .hs-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: none; }
.hs-card { padding: 1.35rem 1.5rem; }
.hs-card-head { border-bottom: 0; padding-bottom: 0; margin-bottom: .6rem; }
.hs-card-head h3, .att-h { font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; }
.ov-stat b { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; }
.ov-stat.is-live { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 18px 36px -24px rgba(35,33,94,.55); }
.ov-stat.is-live small { color: #b9b7e4; }
.ov-stat.is-live .hs-muted { color: #b9b7e4; }
.ov-stat .meter { height: 6px; border-radius: 99px; background: #e6e7e6; overflow: hidden; margin-top: .5rem; }
.ov-stat.is-live .meter { background: var(--ink-line); }
.ov-stat .meter i { display: block; height: 100%; background: var(--mint); border-radius: 99px; }
a.ov-stat:hover, .action-card:hover { border-color: var(--ink); text-decoration: none; }
a.ov-stat.is-live:hover { border-color: var(--ink); filter: brightness(1.08); }
.action-icon { background: #ecebf8; color: var(--ink); }

/* Tables */
.hs-card .table-wrapper { border: 0; border-radius: 0; box-shadow: none; overflow-x: auto; }
.data-table th { background: transparent; border-bottom: 1px solid #ecedec; }
.data-table td { border-bottom: 1px solid #f0f1f0; }
.data-table tr:hover td { background: #fafbfa; }
.dom-name { font-family: var(--font-mono); font-weight: 500; font-size: .92rem; }
.dom-main { font-family: var(--font-mono); font-size: .68rem; font-weight: 500; color: var(--text-muted); background: #eeefee; border-radius: 999px; padding: .05rem .5rem; margin-left: .4rem; vertical-align: 1px; }

/* Status: a dot and a word, no pill */
.st { display: inline-flex; align-items: center; gap: .45rem; background: transparent !important; padding: 0; border-radius: 0; font-family: var(--font-mono); font-size: .8rem; font-weight: 500; }
.st::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; flex: none; }
.st-ok   { color: var(--live-text); } .st-ok::before   { background: var(--live); }
.st-wait { color: var(--wait-text); } .st-wait::before { background: var(--wait); }
.st-off  { color: var(--text-muted); } .st-off::before { background: #a7aaa9; }
.st-info { color: var(--ink); } .st-info::before { background: var(--ink); }
a.st:hover { text-decoration: underline; }
.att-ok .att-dot { background: var(--live); }
.att-warn .att-dot { background: var(--wait); }
.att-bad .att-dot { background: var(--danger); }

/* Buttons: monospace, ink for the main action */
.btn { font-family: var(--font-mono); font-weight: 500; border-radius: 8px; letter-spacing: 0; transition: background .12s, border-color .12s; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
.btn-primary:hover { background: var(--primary-dk); border-color: var(--primary-dk); }
.btn-secondary { background: var(--surface); border-color: #d6d8d7; color: var(--text); box-shadow: none; }
.btn-secondary:hover { background: #f6f7f6; border-color: #c4c7c6; }
.btn-quiet { background: transparent; border: 1px solid transparent; color: var(--text-muted); padding: .3rem .55rem; }
.btn-quiet:hover { background: #ecebf8; color: var(--ink); }
.btn-quiet.is-danger:hover { background: #fdecea; color: var(--danger); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: none; box-shadow: var(--ring); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], textarea, select { border-radius: 8px; border-color: var(--border-input); }

/* Page heads and tabs */
.shell-head h2 { font-size: 2.1rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; }
.sub-tabs { border-bottom-color: #d9dbda; }
.sub-tabs a { font-weight: 500; color: var(--text-muted); }
.sub-tabs a.is-active { color: var(--text); font-weight: 600; border-bottom-color: var(--ink); }
.breadcrumb a, .shell-crumb a { color: var(--link); }

/* A website's figures under its name */
.site-stats { display: flex; flex-wrap: wrap; gap: .75rem; width: 100%; margin: .4rem 0 .2rem; }
.site-stats .ov-stat { padding: .9rem 1rem; flex: 1 1 160px; max-width: 240px; }
.site-stats .ov-stat.is-live { flex: 2 1 300px; max-width: 460px; }

/* Domains table: what an alias does, saved with its own button */
.mode-select { border-color: transparent; background-color: transparent; padding-left: .45rem; color: var(--text); font-size: .9rem; width: auto; cursor: pointer; }
.mode-select:hover { border-color: var(--border-input); background-color: var(--surface); }
.js .mode-apply { display: none; }
.js .is-changed .mode-apply { display: inline-flex; }
.is-changed .mode-select { border-color: var(--ink); background-color: var(--surface); }
.why-row .why { display: inline-flex; align-items: center; gap: .4rem; color: var(--wait-text); font-size: .82rem; }
.why-row .why .ico { width: 14px; height: 14px; }
.cf-chip:hover { text-decoration: none; }
.shell-head .eyebrow { width: 100%; color: var(--live-text); margin: 0 0 -.35rem; font-size: .7rem; }
.ov-stat .hs-muted { font-size: .82rem; }

/* The main column fills the space beside the sidebar, up to a wide limit; long text stays readable. */
body:has(> .side-nav) .container { max-width: 1480px; }
.hs-hint, .att-detail, .page-header p { max-width: 75ch; }

/* The page's header: a card like the others on the page. */
.page-band { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.35rem 1.5rem; margin-bottom: 1.25rem; }
.page-band .shell-head { margin-bottom: 0; }
.page-band .shell-crumb { margin-bottom: .35rem; }
.page-band .site-stats { margin-bottom: 0; }
.page-band + .sub-tabs, .page-band ~ .sub-tabs { margin-top: -.25rem; }
.head-facts { margin: 0 0 0 auto; display: flex; gap: 2rem; align-self: flex-end; }
.head-facts dt { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.head-facts dd { margin: .15rem 0 0; font-size: .92rem; font-weight: 500; }
.head-facts dd code { margin-left: -.35em; }   /* the pill bleeds left so its text lines up with the label above */
.shell-head.is-summary p:not(.eyebrow) { width: auto; }
@media (max-width: 860px) {
  .page-band { padding: 1rem; }
  .head-facts { margin-left: 0; width: 100%; }
}
.page-band .sub-tabs { margin: 1.1rem -1.5rem -1.35rem; padding: 0 1.5rem; border-top: 1px solid var(--border); border-bottom: 0; }
.page-band .sub-tabs a { padding: .7rem .9rem; margin-bottom: 0; border-bottom-width: 2px; }
.head-facts .meter { display: block; width: 9rem; height: 4px; border-radius: 99px; overflow: hidden; background: var(--border); margin-top: .35rem; }
.head-facts .meter i { display: block; height: 100%; border-radius: 99px; background: var(--live); }
.page-band .shell-crumb { display: flex; align-items: center; gap: 0; white-space: pre; font-size: .82rem; margin-bottom: .5rem; }
.page-band .shell-crumb::before { content: ""; width: 2rem; height: 1px; background: var(--live-text); flex: none; margin-right: .75rem; }
.shell-head.is-summary p:not(.eyebrow) { font-size: .88rem; }
.hs-card-head .head-action { margin-left: auto; align-self: center; }
.add-domain { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--border); scroll-margin-top: 80px; }
.add-domain h4 { font-family: var(--font-head); font-size: 1rem; font-weight: 600; margin-bottom: .6rem; }
.add-domain-row { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.add-domain-row .form-group { margin-bottom: 0; }
.add-domain-row input { min-width: 16rem; }
.add-domain-row select { width: auto; }
.add-domain:target, .add-domain:focus-within { border-top-color: var(--ink); }
.hs-card-head .head-left { margin-left: auto; align-self: center; font-size: .85rem; }
.hs-card-head .head-left + .head-action { margin-left: .75rem; }

/* An (i) button that opens a short explanation in a pop-over, so help text stays out of the way. */
.info { display: inline-block; position: relative; vertical-align: middle; margin-left: .2rem; font-family: var(--font-text); }
.info > summary { list-style: none; cursor: pointer; display: inline-flex; color: var(--text-muted); border-radius: 50%; padding: 2px; }
.info > summary::-webkit-details-marker { display: none; }
.info > summary .ico { width: 16px; height: 16px; vertical-align: 0; }
.info > summary:hover, .info[open] > summary { color: var(--ink); background: #ecebf8; }
.info-pop {
  position: absolute; z-index: 40; left: -.5rem; top: calc(100% + .4rem); width: min(22rem, 80vw);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 30px -14px rgba(27,27,31,.3);
  padding: .75rem .9rem; font-size: .85rem; font-weight: 400; line-height: 1.5; color: var(--text); letter-spacing: 0; text-transform: none; white-space: normal;
}

/* Page headings outside the hosting shell (admin, billing, account, domains) as the same header card. */
.page-header { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.35rem 1.5rem; margin-bottom: 1.25rem; }
.page-header h2 { font-size: 2rem; letter-spacing: -.025em; line-height: 1.15; margin-bottom: .25rem; }
.page-header p { font-size: .92rem; }
.page-header.bl-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
/* Mail domains and mailboxes: rows in their card, not boxes inside it. */
.hs-mail-domain, .hs-mail-box { border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: .75rem 0; margin: 0; }
.hs-mail-domain[open], .hs-mail-box[open] { padding-bottom: 1rem; }
.hs-mail-domain > summary, .hs-mail-box > summary { font-family: var(--font-mono); font-size: .92rem; }
div.hs-hint .info, div.why .info { vertical-align: -3px; }
/* "Add …" forms that open from their head button */
.js [data-add-panel].is-collapsed { display: none; }
.js details[data-add-panel] > summary { display: none; }

/* Domains table: one quiet line per domain, the rest in a ••• menu */
.dom-note { display: flex; gap: .5rem; align-items: flex-start; background: #fdf6e7; color: var(--wait-text); border-radius: 10px; padding: .65rem .85rem; margin: .25rem 0 .75rem; font-size: .88rem; }
.dom-note .ico { margin-top: 2px; flex: none; }
.dom-note strong { font-weight: 600; }
.dom-table td { padding-top: .6rem; padding-bottom: .6rem; }
.dom-does { color: var(--text-muted); font-size: .88rem; white-space: nowrap; }
.dom-menu-cell { width: 1%; text-align: right; }
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; cursor: pointer; color: var(--text-muted); padding: .2rem .55rem; border-radius: 8px; letter-spacing: .08em; font-weight: 700; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu > summary:hover, .row-menu[open] > summary { background: #ecebf8; color: var(--ink); }
.row-menu-pop { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 40; width: 19rem; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 30px -14px rgba(27,27,31,.3); padding: .4rem; display: grid; gap: .1rem; }
.row-menu-pop form { margin: 0; }
.row-menu-item { display: flex; width: 100%; align-items: center; gap: .55rem; padding: .5rem .6rem; border: 0; background: none; border-radius: 8px; font: inherit; font-size: .88rem; color: var(--text); cursor: pointer; text-align: left; }
.row-menu-item:hover { background: #f3f3f6; text-decoration: none; }
.row-menu-item.is-danger { color: var(--danger); }
.row-menu-item.is-danger:hover { background: #fdecea; }
.row-menu-mode { padding: .5rem .6rem .7rem; border-bottom: 1px solid var(--border); margin-bottom: .25rem !important; }
.row-menu-mode fieldset { border: 0; padding: 0; margin: 0 0 .5rem; }
.row-menu-mode legend { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .35rem; padding: 0; }
.row-menu-mode label { display: flex; gap: .5rem; align-items: flex-start; font-size: .88rem; padding: .2rem 0; cursor: pointer; }
.row-menu-mode input { margin-top: .2rem; }
.hs-card .table-wrapper:has(> .dom-table) { overflow: visible; }

/* Cloudflare checklist: rows in the card, the detail beside the label */
.cf-plan { gap: 0; margin: .25rem 0 1rem; }
.cf-item { border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: .6rem .1rem; align-items: baseline; }
.cf-item:first-child { border-top: 0; }
.cf-item.is-same { opacity: 1; }
.cf-item.is-same strong { font-weight: 500; }
.cf-item strong { font-weight: 600; }
.cf-item small { margin-left: .5rem; }
.cf-item.is-replace { border-color: var(--border); }
.cf-item.is-replace strong { color: var(--wait-text); }
.cf-tick { color: var(--live); }
.cf-actions { display: flex; align-items: center; gap: 1rem; }
.row-menu-item.is-indented { padding-left: calc(.6rem + 16px + .55rem); }
.row-menu-sep { border: 0; border-top: 1px solid var(--border); margin: .25rem .2rem; }
.row-menu-pop { width: 20rem; }
.row-menu-pop > .row-menu-sep:first-child { display: none; }
.row-menu-item.is-armed { background: #fdecea; font-weight: 600; }
.dom-bulk { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: var(--text-muted); padding: .55rem .85rem; border: 1px solid var(--border); border-radius: 10px; margin: 0 0 .75rem; }
/* File manager inside the hosting layout */
.fm-card { padding: 1.1rem 1.25rem; }
.fm-card .fm-sidebar { border-right: 1px solid var(--border); padding-right: .9rem; }
.fm-card .fm-sidebar-title { font-family: var(--font-mono); font-weight: 500; font-size: .68rem; letter-spacing: .14em; }
.fm-card .fm-shortcut { border-radius: 8px; font-family: var(--font-mono); font-size: .82rem; }
.fm-card .upload-zone { border-radius: 12px; border-color: var(--border-input); background: #fafbfa; }
.fm-card .fm-table th { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); background: transparent; }
/* An email address field: local part @ domain, on one line */
.email-field { display: flex; align-items: center; gap: .35rem; flex-wrap: nowrap; }
.email-field input { width: 9rem; }
.email-field select { width: auto; min-width: 9rem; }
.add-domain-row .fwd-to { flex: 1 1 18rem; max-width: 30rem; }
.add-domain-row input[type="password"] { width: 13rem; }
.mail-apps > summary { cursor: pointer; color: var(--link); font-size: .9rem; }
.mail-apps[open] > summary { margin-bottom: .6rem; }
.mail-apps .kv { font-size: .88rem; }

/* Mail domain and mailbox rows that open: a clear "Manage" cue, hover and a tidy focus ring */
.hs-mail-domain, .hs-mail-box { padding: 0; }
.hs-mail-domain > summary, .hs-mail-box > summary {
  list-style: none; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  font-family: var(--font-text); font-size: .9rem; padding: .7rem .6rem; margin: 0 -.6rem; border-radius: 10px; cursor: pointer;
}
.hs-mail-domain > summary::-webkit-details-marker, .hs-mail-box > summary::-webkit-details-marker { display: none; }
.hs-mail-domain > summary strong, .hs-mail-box > summary strong { font-family: var(--font-mono); font-weight: 500; min-width: 14rem; }
.hs-mail-domain > summary:hover, .hs-mail-box > summary:hover { background: #f6f7f6; }
.hs-mail-domain > summary:focus-visible, .hs-mail-box > summary:focus-visible { outline: none; box-shadow: var(--ring); }
.sum-more { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; font-family: var(--font-mono); font-size: .78rem; color: var(--link); }
.sum-more::after { content: ""; width: .4rem; height: .4rem; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
details[open] > summary .sum-more::after { transform: translateY(1px) rotate(-135deg); }
details[open] > summary .sum-more { color: var(--text-muted); }
.hs-mail-domain[open], .hs-mail-box[open] { padding-bottom: 1rem; }
.also-at { margin: -.2rem 0 .5rem; }
.mirror-list { list-style: none; margin: .2rem 0 .75rem; padding: 0; display: grid; gap: .25rem; font-size: .88rem; }
.box-others { margin: .5rem 0 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.box-others h4 { font-family: var(--font-head); font-size: .95rem; font-weight: 600; margin: 0 0 .4rem; }
.box-others-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .15rem; }
.box-others-list li { display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.box-others-list form { margin: 0; }
.shell-head .head-cta { margin-left: auto; align-self: center; }
.side-ext { margin-left: auto; color: var(--on-ink-muted, #a9a7d8); font-size: .8rem; }
