/* Hostman — editorial / warm minimal UI
 * Urbanist: light display, regular UI, bold accents. */

:root {
  --font-sans: "Urbanist", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;

  --c-bg: #faf7f2;
  --c-bg-alt: #f3eee5;
  --c-surface: #ffffff;
  --c-surface-2: #f3eee5;
  --c-text: #141413;
  --c-text-sec: #5c5a55;
  --c-text-mut: #8b8882;
  --c-text-soft: #a8a49c;
  --c-line: #e8e2d5;
  --c-line-soft: #f0ebe3;
  --c-line-strong: #d4cdbe;

  /* Light shell: same family as page, not a dark rail */
  --c-side-bg: #f3eee5;
  --c-side-2: #ebe4d9;
  --c-side-text: #5c5a55;
  --c-side-mut: #8b8882;
  --c-side-act: #141413;

  --c-accent: #cc5500;
  --c-accent-h: #a84500;
  --c-accent-w: #f5ebe0;
  --c-ok: #2e6f40;
  --c-ok-w: #e8f0ea;
  --c-warn: #8a5a1c;
  --c-warn-w: #f5ead8;
  --c-danger: #9b2d1f;
  --c-danger-w: #f7e8e5;
  --c-info: #5a6b7a;
  --c-info-w: #e8ecef;

  --r-sm: 6px;
  --r-md: 6px;
  --r-lg: 6px;

  --prose-max: 680px;

  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: none;

  --side-w: 220px;
  --topbar-h: 64px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hm-backup-progress__bar {
    animation: none !important;
    transform: none !important;
    width: 100%;
    opacity: 0.55;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--c-surface);
  color: var(--c-accent);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 17px/1.65 var(--font-sans);
  font-weight: 400;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease, text-decoration-thickness 0.15s ease;
}
a:hover { text-decoration-thickness: 2px; }

h1, .font-display {
  font-family: var(--font-sans);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0 0 16px; }

h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--c-text);
  text-transform: none;
  margin: 32px 0 16px;
}
h2:first-child { margin-top: 0; }

h3 { font-family: var(--font-sans); font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin: 0 0 10px; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}
code {
  background: var(--c-bg-alt);
  color: var(--c-text);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--c-line);
}
pre {
  background: #1c1b19;
  color: #f4f0ea;
  padding: 16px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line-strong);
  overflow: auto;
  line-height: 1.55;
  font-size: 13px;
  margin: 8px 0;
}
pre .muted { color: #8b8882; }

/* ------------- App shell ------------- */

.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--c-side-bg);
  color: var(--c-side-text);
  border-right: 1px solid var(--c-line);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 20px 28px;
  color: var(--c-side-act);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.sidebar .brand > span:not(.logo) { font-family: var(--font-sans); font-weight: 600; }
.sidebar .brand .logo {
  width: 36px; height: 36px;
  background: var(--c-surface);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  color: var(--c-accent);
  font-weight: 800;
  font-size: 1rem;
  font-family: var(--font-sans);
  box-shadow: none;
}
.sidebar nav {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  min-height: 44px;
  color: var(--c-side-text);
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sidebar nav a:hover {
  background: var(--c-bg);
  color: var(--c-side-act);
  text-decoration: none;
}
.sidebar nav a.active {
  background: var(--c-bg);
  color: var(--c-side-act);
  border-color: var(--c-line);
  box-shadow: inset 3px 0 0 var(--c-accent);
}
.sidebar nav a svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: 0.85; }
.sidebar nav .label-group {
  display: none;
}
.sidebar .footer {
  padding: 20px 20px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-side-mut);
  border-top: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar .footer .row { display: flex; justify-content: space-between; }
.sidebar .footer .row b { color: var(--c-side-text); font-weight: 600; }

main {
  padding: 36px 28px 72px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.page-head .titles h1 { margin: 0; font-weight: 300; }
.page-head .titles .sub { color: var(--c-text-sec); font-size: 15px; margin-top: 8px; line-height: 1.5; }
.page-head .actions { display: flex; gap: 10px; }
.crumbs {
  color: var(--c-text-mut);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.crumbs a { color: var(--c-text-sec); text-decoration: none; }
.crumbs a:hover { color: var(--c-accent); text-decoration: underline; }
.crumbs .sep { color: var(--c-text-soft); }

/* Mobile top bar */
.topbar { display: none; }
.menu-drawer { display: none; }
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-h);
    padding: 0 20px;
    background: var(--c-bg);
    color: var(--c-text);
    border-bottom: 1px solid var(--c-line);
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 1.1rem; }
  .topbar .brand > span:not(.logo) { font-family: var(--font-sans); font-weight: 600; }
  .topbar .brand .logo {
    width: 32px; height: 32px;
    background: var(--c-surface);
    border: 1px solid var(--c-line-strong);
    color: var(--c-accent);
    border-radius: var(--r-sm);
    display: grid; place-items: center;
    font-size: 0.95rem;
    font-weight: 800;
    font-family: var(--font-sans);
  }
  .topbar button {
    background: transparent; color: inherit; border: 0;
    padding: 12px; min-width: 44px; min-height: 44px; cursor: pointer; border-radius: var(--r-sm);
  }
  .topbar button:hover { background: var(--c-bg-alt); }
  .topbar button:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
  .menu-drawer {
    background: var(--c-bg);
    color: var(--c-text);
    border-bottom: 1px solid var(--c-line);
    padding: 8px 12px 20px;
    display: none;
  }
  .menu-drawer.open { display: block; }
  .menu-drawer a {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 14px; min-height: 48px;
    font-size: 18px;
    color: var(--c-text-sec);
    border-radius: var(--r-sm);
    text-decoration: none;
  }
  .menu-drawer a:hover { background: var(--c-bg-alt); color: var(--c-text); }
  .menu-drawer a.active { color: var(--c-text); font-weight: 600; }
  .menu-drawer a svg { width: 20px; height: 20px; }
  main { padding: 24px 16px 56px; }
}

/* Cards */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: none;
  overflow: hidden;
}
.card + .card { margin-top: 24px; }
.card .head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--c-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--c-surface);
}
.card .head strong { font-size: 15px; font-weight: 700; }
.card .head .head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .body { padding: 22px; font-size: 16px; line-height: 1.65; }

/* Stat cards */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat .label {
  font-size: 13px;
  color: var(--c-text-sec);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat .label svg { width: 16px; height: 16px; color: var(--c-accent); }
.stat .value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--c-text);
  line-height: 1.1;
  font-family: var(--font-sans);
}
.stat .value--stack { font-size: 1.125rem; line-height: 1.35; font-weight: 700; }
.stat .sub { font-size: 13px; color: var(--c-text-mut); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-line);
  font-size: 15px;
  vertical-align: middle;
}
tr:last-child td { border-bottom: 0; }
th {
  background: var(--c-bg-alt);
  font-weight: 600;
  color: var(--c-text-sec);
  text-transform: none;
  font-size: 12px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--c-line-strong);
}
tbody tr:hover { background: var(--c-bg); }
.empty { padding: 48px 24px; text-align: center; color: var(--c-text-sec); }
.empty a { text-decoration: none; }
.empty a:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--c-accent);
  color: #fff;
  border: 1px solid var(--c-accent);
  padding: 14px 28px;
  min-height: 44px;
  border-radius: var(--r-sm);
  font: 600 15px/1 var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  box-shadow: none;
}
.btn:hover { background: var(--c-accent-h); border-color: var(--c-accent-h); color: #fff; text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.btn:active { background: #8e3a00; border-color: #8e3a00; }
.btn svg { width: 15px; height: 15px; }
.btn.ghost {
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-line-strong);
  padding: 14px 24px;
}
.btn.ghost:hover { border-color: var(--c-text); background: transparent; color: var(--c-text); }
.btn.danger {
  background: var(--c-surface);
  color: var(--c-danger);
  border: 1px solid var(--c-danger-w);
}
.btn.danger:hover { background: var(--c-danger-w); }
.btn.sm { padding: 8px 14px; min-height: 36px; font-size: 14px; }
.btn.lg { padding: 14px 28px; font-size: 16px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Forms */
label { display: block; font-weight: 500; font-size: 14px; margin: 0 0 8px; color: var(--c-text); }
input[type=text], input[type=password], input[type=email], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  font: 16px/1.4 var(--font-sans);
  background: var(--c-surface);
  color: var(--c-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type=text]:focus,
input[type=password]:focus,
input[type=email]:focus,
textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px var(--c-accent);
}
textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  background: var(--c-surface);
}
.field { margin-bottom: 20px; }
.field-row { display: flex; gap: 12px; align-items: end; }
.field-row .field { flex: 1; margin-bottom: 0; }
.hint { color: var(--c-text-mut); font-size: 14px; margin-top: 8px; line-height: 1.5; }
.checkbox-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.checkbox-row:hover { border-color: var(--c-line-strong); }
.checkbox-row input[type=checkbox] { margin-top: 4px; flex: 0 0 auto; width: 18px; height: 18px; }
.checkbox-row .ck-body { flex: 1; }
.checkbox-row .ck-title { font-weight: 600; font-size: 15px; }
.checkbox-row .ck-hint { font-size: 14px; color: var(--c-text-sec); margin-top: 4px; }
.fwk-stack { display: flex; flex-direction: column; gap: 10px; }

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--r-sm);
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.5;
  border: 1px solid var(--c-line);
  display: flex; align-items: flex-start; gap: 12px;
}
.alert svg { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; }
.alert.error { background: var(--c-danger-w); color: #6b2118; border-color: #d4a59e; }
.alert.ok    { background: var(--c-ok-w); color: #1e4a2a; border-color: #b8d4bf; }
.alert.warn  { background: var(--c-warn-w); color: #5c3d12; border-color: #e0c9a0; }
.alert.info  { background: var(--c-info-w); color: #3d4a55; border-color: #c5ced6; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  background: var(--c-info-w);
  color: var(--c-info);
  white-space: nowrap;
  vertical-align: middle;
  border: 1px solid var(--c-line);
}
.badge.muted     { background: var(--c-bg); color: var(--c-text-mut); }
.badge.ok        { background: var(--c-ok-w); color: var(--c-ok); border-color: #b8d4bf; }
.badge.warn,
.badge.suspended { background: var(--c-warn-w); color: var(--c-warn); border-color: #e0c9a0; }
.badge.danger    { background: var(--c-danger-w); color: var(--c-danger); border-color: #d4a59e; }
.badge.accent    { background: var(--c-accent-w); color: #8e3a00; border-color: #e0c4a8; }
.badge .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* Tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 22px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  text-align: left;
  text-decoration: none;
  color: var(--c-text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-shadow: none;
  width: 100%;
  font: 15px/1.45 var(--font-sans);
  min-height: 44px;
}
.tile:hover {
  border-color: var(--c-accent);
  text-decoration: none;
  background: var(--c-bg);
}
.tile:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.tile.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.tile .icon-wrap {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--c-bg-alt);
  color: var(--c-accent);
  display: grid; place-items: center;
  border: 1px solid var(--c-line);
}
.tile .icon-wrap svg { width: 20px; height: 20px; }
.tile .label { font-weight: 600; font-size: 16px; }
.tile .sub { font-size: 14px; color: var(--c-text-sec); }

/* Meta grid */
.meta-grid {
  display: grid;
  grid-template-columns: minmax(100px, 160px) 1fr;
  gap: 12px 20px;
  font-size: 15px;
  margin: 0;
  line-height: 1.6;
}
.meta-grid dt { color: var(--c-text-sec); font-weight: 500; }
.meta-grid dd { margin: 0; }
.meta-grid dd code { font-size: 12.5px; }

/* Hero (account) */
.hero {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 28px 28px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.hero .left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.hero .left .avatar {
  width: 56px; height: 56px;
  border-radius: var(--r-sm);
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line);
  color: var(--c-accent);
  display: grid; place-items: center;
  font-size: 1.35rem;
  font-weight: 200;
  font-family: var(--font-sans);
  flex: 0 0 56px;
}
.hero .left .titles h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 300; }
.hero .left .titles .sub {
  font-size: 14px; color: var(--c-text-sec); margin-top: 6px;
  display: flex; gap: 12px; flex-wrap: wrap;
  align-items: center;
}
.hero .right { display: flex; gap: 10px; flex-wrap: wrap; }

/* Login */
.login-bg {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--c-bg);
  padding: 24px 20px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: none;
  padding: 40px 36px;
}
.login-card .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-weight: 600;
  font-size: 1.25rem;
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--c-text);
}
.login-card .brand .logo {
  width: 40px; height: 40px;
  background: var(--c-bg);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--c-accent);
  font-weight: 800;
  font-size: 1.1rem;
  font-family: var(--font-sans);
  box-shadow: none;
}
.login-card h1 { font-size: 1.75rem; margin: 0 0 6px; font-weight: 300; }
.login-card .sub { color: var(--c-text-sec); font-size: 16px; margin-bottom: 28px; line-height: 1.55; }
.login-card .btn { width: 100%; }

/* Underline inputs in login: restore boxed feel on login card */
.login-bg input[type=text],
.login-bg input[type=password] {
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
}
.login-bg input:focus {
  border-color: var(--c-accent);
  border-bottom: 1px solid var(--c-accent);
  box-shadow: 0 0 0 1px var(--c-accent);
}

/* Misc */
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.kbd {
  font: 12px ui-monospace, monospace;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--c-text-sec);
}
.divider { height: 1px; background: var(--c-line); margin: 24px 0; }
.copy-input {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--c-surface);
}
.copy-input input { border: 0; flex: 1; padding: 10px 12px; }
.copy-input input:focus { border-bottom: 0; outline: none; box-shadow: inset 0 0 0 1px var(--c-accent); }
.copy-input button {
  background: var(--c-bg-alt);
  border: 0;
  border-left: 1px solid var(--c-line);
  padding: 0 16px;
  font: 500 13px var(--font-sans);
  color: var(--c-text-sec);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.copy-input button:hover { background: var(--c-line-soft); color: var(--c-text); }

/* Utilities from v0.9+ */
.field--mb0 { margin-bottom: 0; }
.field--confirm { max-width: 420px; }
form.form-inline { display: inline; margin: 0; }
.pw { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.hint--tight { margin-top: -2px; }
.hint--flush { margin-top: 0; }
.hint--manual { display: none; margin-top: 1rem; }
.hint--manual.is-visible { display: block; }
.checkbox-row:focus-within {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px rgba(204, 85, 0, 0.2);
}
.p--flush { margin-top: 0; }
.p--after { margin-top: 14px; }
.login-form .field { margin-bottom: 20px; }
.login-form .field:last-of-type { margin-bottom: 24px; }
.login-form .btn { width: 100%; min-height: 48px; }
.pma-launch { max-width: 520px; margin: 3rem auto; }
.danger-zone .body > p.p--flush { margin-bottom: 16px; }
/* Account page: space between Tools and Terminate */
.card.danger-zone.account-terminate-section {
  margin-top: 28px;
}
.danger-zone {
  border-color: #d4a59e;
}
.danger-zone .head { background: var(--c-danger-w); border-bottom: 1px solid #d4a59e; }
.danger-zone .head strong { color: var(--c-danger); }
.danger-zone .btn.ghost-danger {
  background: var(--c-surface);
  color: var(--c-danger);
  border: 1px solid #d4a59e;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: var(--r-sm);
  font: 600 15px var(--font-sans);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
  box-shadow: none;
}
.danger-zone .btn.ghost-danger:hover { background: #f0ddd9; border-color: var(--c-danger); }
.danger-zone .btn.ghost-danger:focus-visible { outline: 2px solid var(--c-danger); outline-offset: 2px; }
.danger-zone .btn.ghost-danger svg { width: 15px; height: 15px; }
.danger-zone .btn.danger {
  background: var(--c-danger);
  color: #fff;
  border: 1px solid var(--c-danger);
  box-shadow: none;
}
.danger-zone .btn.danger:hover    { background: #7d2418; border-color: #7d2418; }
.danger-zone .btn.danger[disabled]{ opacity: 0.45; cursor: not-allowed; }
.danger-zone .confirm-panel { margin-top: 20px; padding: 22px; border: 1px solid #d4a59e; border-radius: var(--r-sm); background: #fff; }
.danger-zone .confirm-panel p:first-child { margin-top: 0; }
.danger-zone .confirm-panel .lead { margin: 0 0 8px; font-weight: 600; color: var(--c-danger); }
.danger-zone .confirm-list { margin: 8px 0 18px 24px; padding: 0; color: #6b2118; font-size: 15px; line-height: 1.7; }
.danger-zone .confirm-panel .hint--danger { color: #6b2118; }
.danger-zone label.label--danger { color: var(--c-danger); }
.danger-zone input { border: 1px solid var(--c-line) !important; border-radius: var(--r-sm) !important; padding: 12px 14px !important; }
.danger-zone input:focus { border-color: var(--c-danger) !important; box-shadow: 0 0 0 2px rgba(155, 45, 31, 0.2) !important; }
.danger-zone .form-actions-terminate { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.card--notice { border-color: #e0c9a0; }
.card--notice .head { background: var(--c-warn-w); border-bottom-color: #e0c9a0; }

.icon-inline { vertical-align: -0.15em; }
.hm-icon { flex-shrink: 0; vertical-align: middle; }

/* Nav / in-content links: tables use .btn.ghost for actions */
table a:not(.btn) { font-weight: 700; text-decoration: none; color: var(--c-text); }
table a:not(.btn):hover { color: var(--c-accent); text-decoration: underline; }




/* Dashboard: manage column + external site link */
table .th-manage,
table .td-manage {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}
table a.table-site-link {
  font-weight: 600;
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
table a.table-site-link:hover {
  color: var(--c-accent-h);
  text-decoration-thickness: 2px;
}

/* Accounts table: numeric columns */
table .th-num,
table .td-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table .td-size {
  color: var(--c-text-sec);
}

table .th-backup,
table .td-backup {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.backup-age-line {
  display: inline-flex;
  align-items: baseline;
  gap: 0.12em;
  justify-content: center;
}
.backup-age-num {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--c-text);
  line-height: 1.05;
}
.backup-age-num--solo {
  font-size: 1.45rem;
}
.backup-age-rest {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-mut);
}
.backup-age-never {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-mut);
}

/* Reboot & services */
.reboot-card.reboot-hero { margin-bottom: 40px; }
.btn-reboot-master {
  padding: 16px 32px;
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 600;
}
.reboot-services { margin-top: 8px; }
.reboot-svc-title { margin: 0 0 8px; }
.reboot-svc-lead {
  color: var(--c-text-sec);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 24px;
  max-width: 52rem;
}
.reboot-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.reboot-svc-tile {
  margin: 0;
  height: 100%;
}
.reboot-svc-tile .reboot-svc-tile__inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 22px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}
.reboot-svc-tile .reboot-svc-tile__inner:hover { border-color: var(--c-line-strong); }
.reboot-svc-tile h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  color: var(--c-text);
}
.reboot-svc-tile__meta {
  font-size: 13px;
  color: var(--c-text-sec);
  line-height: 1.45;
  margin: 0 0 4px;
  flex: 1;
}
.reboot-svc-tile .btn-reboot-svc { margin-top: auto; }
.btn-reboot-svc { width: 100%; justify-content: center; }
/* Modal (reboot confirmation) */
.hm-modal[hidden] { display: none !important; }
.hm-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.hm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 19, 0.45);
  cursor: pointer;
}
.hm-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--c-surface);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  padding: 24px 26px 22px;
  box-shadow: 0 12px 40px rgba(20, 20, 19, 0.12);
}
.hm-modal__title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--c-text);
  line-height: 1.25;
}
.hm-modal__text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--c-text-sec);
  margin: 0 0 20px;
}
.hm-modal__text strong { color: var(--c-text); font-weight: 600; }
.hm-modal__form { margin: 0; }
.hm-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.hm-modal__actions .btn { min-height: 44px; }
@media (max-width: 480px) {
  .hm-modal__actions { flex-direction: column-reverse; }
  .hm-modal__actions .btn { width: 100%; }
}

/* File manager */
.fm-status {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  min-height: 1.25em;
}
.fm-progress-wrap {
  margin-top: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--c-line-soft);
  border: 1px solid var(--c-line);
  overflow: hidden;
}
.fm-progress-bar {
  height: 100%;
  background: var(--c-accent);
  border-radius: 4px;
  /* No transition: smoother real-time progress during uploads */
}
.fm-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-sec);
}
.fm-upload-success {
  color: var(--c-ok);
  font-weight: 600;
  font-size: 15px;
}
.fm-upload-success-detail {
  color: var(--c-text-sec);
  font-size: 14px;
  line-height: 1.45;
}
.fm-upload-success-detail strong {
  color: var(--c-text);
  font-weight: 600;
}

/* Add account — per-file restore upload progress + success tick */
.hm-restore-slot-foot {
  margin-top: 10px;
}
.hm-restore-slot-bar {
  margin-top: 6px;
}
.hm-restore-slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  min-height: 1.5em;
}
.hm-restore-slot-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-sec);
}
.hm-restore-slot-status {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-danger);
  line-height: 1.35;
}
/* [hidden] must override display utilities (otherwise ticks show while "hidden") */
.hm-restore-uploads [hidden],
.hm-restore-combined [hidden] {
  display: none !important;
}
.hm-restore-tick:not([hidden]) {
  display: inline-flex;
  align-items: center;
  color: var(--c-ok);
  flex-shrink: 0;
}
.hm-restore-tick .hm-icon {
  display: block;
}
.hm-restore-combined {
  margin-top: 4px;
  max-width: 560px;
}
.hm-restore-combined__bar {
  margin-top: 6px;
}
.hm-restore-combined-meta {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-sec);
}

/* File manager — explorer-style layout */
.fm-shell {
  max-width: 960px;
}
.fm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 12px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  margin-bottom: 10px;
}
.fm-toolbar__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.fm-toolbar__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.fm-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--c-text-sec);
  text-decoration: none;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-bg-alt);
  line-height: 1;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.fm-nav-btn:hover {
  color: var(--c-text);
  border-color: var(--c-line-strong);
  background: var(--c-surface);
}
.fm-nav-btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.fm-icon-flip {
  transform: rotate(180deg);
  vertical-align: -3px;
}
.fm-pathbar {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 12px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  font-size: 14px;
}
.fm-pathbar__root {
  flex-shrink: 0;
  color: var(--c-accent);
  display: flex;
  align-items: center;
}
.fm-pathbar__track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 2px;
  min-width: 0;
}
.fm-pathbar__sep {
  color: var(--c-text-mut);
  display: inline-flex;
  align-items: center;
  opacity: 0.85;
}
.fm-pathbar__seg {
  color: var(--c-accent);
  font-weight: 600;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fm-pathbar__seg:hover {
  text-decoration: underline;
}
.fm-pathbar__here {
  font-weight: 700;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fm-hint-line {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--c-text-sec);
  line-height: 1.5;
}
.fm-item-count {
  font-weight: 600;
  color: var(--c-text);
}
.fm-hint-line__sep {
  margin: 0 6px;
  color: var(--c-text-mut);
}
.fm-hint-line__muted {
  color: var(--c-text-mut);
}
.fm-hint-line__muted strong {
  color: var(--c-text-sec);
  font-weight: 600;
}

.fm-upload-card {
  padding: 0 0 18px;
  margin-bottom: 8px;
}
.fm-input-hidden {
  display: none !important;
}
.fm-dropzone {
  border: 2px dashed var(--c-line-strong);
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  outline: none;
}
.fm-dropzone:hover,
.fm-dropzone:focus-visible {
  border-color: var(--c-accent);
  background: var(--c-accent-w);
}
.fm-dropzone--active {
  border-color: var(--c-accent);
  background: var(--c-accent-w);
  border-style: solid;
}
.fm-dropzone__inner {
  padding: 22px 20px;
  text-align: center;
}
.fm-dropzone__icon {
  display: inline-flex;
  color: var(--c-accent);
  margin-bottom: 8px;
  opacity: 0.9;
}
.fm-dropzone__text {
  font-size: 15px;
  color: var(--c-text);
  margin-bottom: 4px;
}
.fm-dropzone__text strong {
  font-weight: 600;
}
.fm-dropzone__sub {
  font-size: 13px;
  color: var(--c-text-mut);
  line-height: 1.45;
  max-width: 36rem;
  margin: 0 auto;
}
.fm-dropzone--account .fm-dropzone__inner {
  padding: 16px 14px;
}
.fm-dropzone--account .fm-dropzone__sub {
  max-width: none;
  word-break: break-word;
}
.hm-restore-uploads {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) {
  .hm-restore-uploads {
    grid-template-columns: 1fr 1fr;
  }
}
.fm-detail-line {
  margin-top: 10px;
}

.fm-table-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.fm-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.fm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: var(--font-sans);
}
.fm-table thead {
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-line);
}
.fm-table th {
  text-align: left;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-mut);
}
.fm-table td {
  padding: 10px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--c-line-soft);
}
.fm-table tbody tr:last-child td {
  border-bottom: none;
}
.fm-row {
  transition: background 0.1s ease;
}
.fm-row:hover {
  background: var(--c-bg-alt);
}
.fm-row--dir {
  cursor: default;
}
.fm-col-size {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--c-text-sec);
}
.fm-col-type {
  white-space: nowrap;
}
.fm-col-date {
  color: var(--c-text-mut);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 13px;
}
.fm-col-edit {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}
.fm-edit-na {
  color: var(--c-text-mut);
  font-size: 13px;
}

/* In-browser file editor (Ace) */
.fm-edit-path {
  font-size: 13px;
  word-break: break-all;
}
.fm-edit-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.fm-edit-hint {
  margin: 0 0 14px;
  max-width: none;
}
.fm-edit-hint-kbd {
  display: inline-block;
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: ui-monospace, monospace;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  background: var(--c-bg-alt);
  color: var(--c-text-sec);
}
/* Full-width editor strip (cancels main horizontal padding) */
.fm-editor-fullbleed {
  margin-left: -28px;
  margin-right: -28px;
  width: calc(100% + 56px);
  max-width: none;
  box-sizing: border-box;
}
.fm-editor-ace {
  width: 100%;
  max-width: none;
  height: min(calc(100vh - 240px), 900px);
  min-height: 360px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
}
.fm-edit-status {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  min-height: 1.25em;
}
.fm-edit-status--ok {
  color: var(--c-ok);
}
.fm-edit-status--err {
  color: var(--c-danger);
}

/* Save success toaster */
.hm-toast-host {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 32px));
}
.hm-toast {
  pointer-events: auto;
  cursor: pointer;
  border-radius: var(--r-md);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
  animation: hm-toast-in 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.hm-toast--out {
  animation: hm-toast-out 0.28s ease forwards;
}
.hm-toast--ok {
  background: var(--c-ok-w);
  color: #1e4a2a;
  border: 1px solid #b8d4bf;
}
.hm-toast__inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  min-width: 0;
}
.hm-toast__ico {
  flex: 0 0 auto;
  display: flex;
  color: #1e4a2a;
  margin-top: 1px;
}
.hm-toast__ico svg {
  display: block;
}
.hm-toast__txt {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  min-width: 0;
}
@keyframes hm-toast-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes hm-toast-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 880px) {
  .fm-editor-fullbleed {
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
  }
  .hm-toast-host {
    left: 16px;
    right: 16px;
    max-width: none;
    align-items: stretch;
  }
}

.fm-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.fm-file-ico {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--c-bg-alt);
  color: var(--c-text-sec);
}
.fm-file-ico--dir {
  color: #b8860b;
  background: #faf3e3;
}
.fm-file-ico--image {
  color: #1d6b52;
  background: var(--c-ok-w);
}
.fm-file-ico--code {
  color: #5a4fcf;
  background: #eceaf8;
}
.fm-file-ico--web {
  color: #c44d00;
  background: var(--c-accent-w);
}
.fm-file-ico--archive {
  color: #6b4c2a;
  background: var(--c-warn-w);
}
.fm-file-ico--doc {
  color: #3d5a73;
  background: var(--c-info-w);
}
.fm-file-ico--file {
  color: var(--c-text-sec);
}
.fm-name-link {
  font-weight: 600;
  color: var(--c-text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fm-name-link:hover {
  color: var(--c-accent);
  text-decoration: underline;
}
.fm-name-text {
  font-weight: 500;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 13px;
}
.fm-type-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--c-line-soft);
  color: var(--c-text-mut);
}
.fm-type-pill--dir {
  background: #faf3e3;
  color: #7a5c00;
}
.fm-type-pill--image {
  background: var(--c-ok-w);
  color: var(--c-ok);
}
.fm-type-pill--code {
  background: #eceaf8;
  color: #5a4fcf;
}
.fm-type-pill--web {
  background: var(--c-accent-w);
  color: var(--c-accent-h);
}
.fm-type-pill--archive {
  background: var(--c-warn-w);
  color: var(--c-warn);
}
.fm-type-pill--doc {
  background: var(--c-info-w);
  color: var(--c-info);
}
.fm-type-pill--file {
  background: var(--c-line-soft);
  color: var(--c-text-sec);
}

.fm-empty {
  padding: 48px 24px;
  text-align: center;
}
.fm-empty__icon {
  color: var(--c-line-strong);
  margin-bottom: 12px;
  opacity: 0.85;
}
.fm-empty__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-text);
}
.fm-empty__sub {
  margin: 0;
  font-size: 14px;
  color: var(--c-text-mut);
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.fm-tech-details {
  margin-top: 16px;
  font-size: 13px;
  color: var(--c-text-mut);
}
.fm-tech-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--c-text-sec);
  user-select: none;
}
.fm-tech-path {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  font-size: 12px;
  word-break: break-all;
  color: var(--c-text-sec);
}

@media (max-width: 640px) {
  .fm-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .fm-toolbar__actions {
    margin-left: 0;
  }
  .fm-toolbar__actions .btn {
    width: 100%;
    justify-content: center;
  }
  .fm-pathbar {
    order: 3;
    width: 100%;
  }
  .fm-col-type {
    display: none;
  }
}

/* Account page — HTTPS strip + certificate tools toggle */
.https-card .https-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}
.https-strip__text {
  flex: 1 1 240px;
  min-width: 0;
}
.https-strip__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.https-strip__heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
}
.https-strip__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-text-mut);
  max-width: 44rem;
}

.hm-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  margin-top: 2px;
}
.hm-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  clip: rect(0, 0, 0, 0);
}
.hm-switch__track {
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--c-line-strong);
  transition: background 0.2s ease;
  position: relative;
  border: 1px solid var(--c-line);
}
.hm-switch__track::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--c-surface);
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(20, 20, 19, 0.18);
}
.hm-switch input:checked + .hm-switch__track {
  background: var(--c-accent);
  border-color: var(--c-accent-h);
}
.hm-switch input:checked + .hm-switch__track::after {
  transform: translateX(18px);
}
.hm-switch input:focus-visible + .hm-switch__track {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}
.hm-switch__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  max-width: 11rem;
  line-height: 1.25;
}

.https-tools-panel {
  border-top: 1px solid var(--c-line);
}
.https-tools-panel__inner {
  padding: 18px 22px 22px;
}
@media (max-width: 520px) {
  .hm-switch {
    width: 100%;
    justify-content: space-between;
  }
  .hm-switch__label {
    max-width: none;
    flex: 1;
    padding-right: 8px;
  }
}

/* Backup in progress (AJAX) */
.hm-backup-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(20, 20, 19, 0.48);
  display: none;
}
.hm-backup-overlay:not([hidden]) {
  display: flex;
}
.hm-backup-overlay__panel {
  width: 100%;
  max-width: 420px;
  padding: 1.35rem 1.5rem 1.5rem;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: 0 12px 40px rgba(20, 20, 19, 0.12);
}
.hm-backup-overlay__title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-text);
}
.hm-backup-overlay__msg {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--c-text-sec);
}
.hm-backup-overlay__err {
  margin: 0.75rem 0 0;
  font-size: 14px;
  color: var(--c-danger);
}
.hm-backup-overlay__actions {
  margin-top: 1rem;
}
.hm-backup-progress {
  margin-top: 1rem;
  height: 6px;
  border-radius: 3px;
  background: var(--c-line);
  overflow: hidden;
}
.hm-backup-progress__bar {
  width: 38%;
  height: 100%;
  border-radius: 3px;
  background: var(--c-accent);
  animation: hm-backup-indet 1.15s ease-in-out infinite;
}
@keyframes hm-backup-indet {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* --- Panel diagnostics (/diagnostics) --- */
.diagnostics-warn {
  margin-bottom: 1rem;
}
.diagnostics-card .body--flush {
  padding: 0;
}
.diagnostics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.diagnostics-table th,
.diagnostics-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--c-line);
}
.diagnostics-table th {
  width: 38%;
  max-width: 280px;
  font-weight: 600;
  color: var(--c-text-sec);
}
.diagnostics-code {
  word-break: break-word;
  white-space: pre-wrap;
}
.diagnostics-ext {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}
.hm-phpinfo {
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.35;
  background: var(--c-surface-2, #f6f7f9);
}
.hm-phpinfo table {
  width: 100%;
  border-collapse: collapse;
}
.hm-phpinfo td,
.hm-phpinfo th {
  border: 1px solid var(--c-line);
  padding: 0.25rem 0.4rem;
  vertical-align: top;
}
.hm-phpinfo .h {
  background: var(--c-accent-soft, #e8ecf4);
  font-weight: 700;
}
.hm-phpinfo .e,
.hm-phpinfo .v {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}
.diagnostics-card--phpinfo .hm-phpinfo img {
  display: none;
}
