/* Hostman — editorial / warm minimal UI
 * Google Sans Flex: light display, regular UI, bold accents.
 * Google Sans Code: monospace (code, terminals, credentials). */

:root {
  --font-sans: "Google Sans Flex", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Google Sans Code", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --c-bg: #faf7f2;
  --c-bg-alt: #f3eee5;
  --c-surface: #ffffff;
  /* Page canvas: a touch deeper/greyer than the cards so white surfaces read as
     raised "islands". Kept separate from --c-bg (which many components fill with). */
  --c-page: #eeebe3;
  --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: 284px;
  --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-page);
  -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-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: var(--font-mono);
  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: #fff;
  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;
}
/* Subtle "My account" icon by the logo — deliberately not a main-nav item. */
.sidebar .brand .acct-btn {
  margin-left: auto;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  color: inherit; opacity: .55;
}
.sidebar .brand .acct-btn:hover { opacity: 1; background: var(--c-surface); }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.topbar-actions .acct-btn {
  display: grid; place-items: center;
  min-width: 44px; min-height: 44px;
  border-radius: var(--r-sm); color: inherit;
}
.topbar-actions .acct-btn:hover { background: var(--c-bg-alt); }
.acct-btn svg { display: block; }
/* My-account details grid */
.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: 600;
  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);
  font-weight: 700;
  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 a .nav-update-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 8px;
}
.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; }
.sidebar .footer .server-loc-flag {
  font-size: 1.15em;
  line-height: 1;
  margin-right: 4px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  vertical-align: -0.05em;
}
.sidebar .footer .server-loc-name { 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: clamp(1.625rem, 3.5vw, 2.35rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.crumbs a { color: var(--c-text-sec); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--c-accent); text-decoration: underline; }
.crumbs .sep {
  color: var(--c-text-soft);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.crumbs .sep svg {
  width: 1.05em !important;
  height: 1.05em !important;
}

/* 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; }
  .menu-drawer a .nav-update-badge { margin-left: auto; flex-shrink: 0; font-size: 11px; padding: 2px 8px; }
  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], input[type=url], 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,
input[type=url]:focus,
textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px var(--c-accent);
}
textarea {
  font-family: var(--font-mono);
  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; }

/* 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; }

/* ===================== All accounts (fleet) ===================== */
/* Filter sits alone in the header row, centered. */
.fleet-head { justify-content: center; }
.fleet-search__input {
  flex: 0 0 auto;
  width: 280px;
  max-width: 48%;
  padding: 8px 13px;
  font-size: 14px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-text);
}
.fleet-search__input:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(204, 85, 0, 0.15);
}
/* A–Z quick filter: one full-width row under the search, letters spread evenly
   to fill the container; letters without sites dimmed. */
.fleet-head { flex-wrap: wrap; gap: 12px; }
.az-bar { display: flex; flex-wrap: nowrap; gap: 6px; width: 100%; }
.az-bar .az {
  flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 4px;
  font-size: 14.5px; font-weight: 700; line-height: 1;
  color: var(--c-text-sec); background: var(--c-surface);
  border: 1px solid var(--c-line-strong); border-radius: 7px;
  cursor: pointer; user-select: none; text-decoration: none;
  transition: background .12s, color .12s, border-color .12s;
}
.az-bar .az:hover { color: var(--c-text); border-color: var(--c-accent); }
.az-bar .az.is-active { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.az-bar .az.is-off { opacity: .3; cursor: default; pointer-events: none; }
.fleet-src { display: inline-flex; align-items: center; gap: 6px; color: var(--c-text-sec); text-decoration: none; }
.fleet-src:hover { color: var(--c-accent); }
.fleet-src svg { opacity: .6; flex: 0 0 auto; }
.fleet-src.is-local { color: var(--c-ok); font-weight: 600; }
.fleet-src.is-local svg { opacity: 1; }
.fleet-src.is-local:hover { color: var(--c-ok); text-decoration: underline; }

/* ===================== Login (immersive split) ===================== */
body.login-bg:has(.login-shell) { padding: 0; background: var(--c-page); place-items: stretch; }

.login-shell {
  min-height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

/* --- Left: dark, warm brand hero --- */
.login-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: clamp(40px, 5vw, 76px);
  color: #f4ece2;
  background:
    radial-gradient(120% 120% at 10% 15%, #3a2418 0%, rgba(58,36,24,0) 58%),
    radial-gradient(90% 90% at 92% 90%, #a5430a 0%, rgba(165,67,10,0) 55%),
    linear-gradient(150deg, #1b1613 0%, #241d17 55%, #15110d 100%);
}
.login-hero::before {          /* fine grid texture, faded toward edges */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(85% 80% at 28% 22%, #000 25%, transparent 100%);
          mask-image: radial-gradient(85% 80% at 28% 22%, #000 25%, transparent 100%);
}
.login-hero::after {           /* slow floating glow */
  content: ""; position: absolute; pointer-events: none;
  width: 480px; height: 480px; right: -130px; top: -140px;
  background: radial-gradient(circle, rgba(255,140,55,0.34), transparent 66%);
  animation: loginGlow 16s ease-in-out infinite alternate;
}
@keyframes loginGlow {
  from { transform: translate(0,0) scale(1);       opacity: .65; }
  to   { transform: translate(-46px,60px) scale(1.18); opacity: 1; }
}
.login-hero__brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.login-hero__logo {
  width: 52px; height: 52px; border-radius: 13px;
  display: grid; place-items: center;
  font: 800 1.5rem/1 var(--font-sans); color: #fff;
  background: linear-gradient(135deg, #ff8f42, #cc5500);
  box-shadow: 0 10px 26px rgba(204,85,0,0.45);
}
.login-hero__brand b { font: 600 1.3rem var(--font-sans); letter-spacing: -0.02em; }
.login-hero__body { position: relative; z-index: 1; margin: auto 0; }
.login-hero h2 {
  margin: 0 0 18px;
  font: 300 clamp(2rem, 3.3vw, 3rem)/1.08 var(--font-sans);
  letter-spacing: -0.03em;
  color: #fff;
}
.login-hero h2 b { font-weight: 600; color: #ffb27a; }
.login-hero__body > p { margin: 0; max-width: 36ch; font-size: 1.05rem; line-height: 1.6; color: #cbbdaf; }
.login-hero__foot { position: relative; z-index: 1; display: flex; gap: 18px; color: #8f8477; font: 0.78rem var(--font-mono); }

/* --- Right: sign-in panel --- */
.login-panel {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(32px, 5vw, 64px);
  background: var(--c-page);
}
.login-auth {
  width: 100%; max-width: 384px;
  animation: loginRise .5s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes loginRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.login-auth__brand { display: none; align-items: center; gap: 11px; margin-bottom: 26px; }
.login-auth__brand .logo {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  font: 800 1.2rem var(--font-sans); color: #fff;
  background: linear-gradient(135deg, #ff8f42, #cc5500);
  box-shadow: 0 8px 20px rgba(204,85,0,0.4);
}
.login-auth__brand b { font: 600 1.15rem var(--font-sans); }
.login-auth__head { margin-bottom: 26px; }
.login-auth__head h1 { margin: 0 0 6px; font: 300 1.95rem var(--font-sans); letter-spacing: -0.02em; }
.login-auth__head p { margin: 0; color: var(--c-text-sec); font-size: 0.95rem; }

.login-auth .btn { width: 100%; }
.login-auth .btn.login-primary {
  min-height: 52px; font-size: 15px;
  box-shadow: 0 8px 22px rgba(204,85,0,0.26);
}
.login-auth .btn.login-primary:hover { box-shadow: 0 10px 26px rgba(204,85,0,0.34); }
.login-auth .login-form { margin-top: 4px; }
.login-auth .login-form .btn { min-height: 48px; }

/* Boxed inputs on the login panel */
.login-bg input[type=text],
.login-bg input[type=password] {
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  background: var(--c-surface);
}
.login-bg input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(204,85,0,0.15);
  outline: none;
}

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-auth__brand { display: flex; }
}

/* Misc */
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.kbd {
  font: 12px var(--font-mono);
  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; }
/* Utilities from v0.9+ */
.field--mb0 { margin-bottom: 0; }
.field--confirm { max-width: 420px; }
.pw { font-family: var(--font-mono); font-size: 13px; }
.hint--tight { margin-top: -2px; }
.hint--flush { margin-top: 0; }
.hint--manual { display: none; margin-top: 1rem; }
.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; }
.login-remember { display: flex; align-items: center; gap: 8px; margin: 16px 2px 0; font-size: 14px; color: var(--c-text-sec); cursor: pointer; }
.login-remember input { width: 16px; height: 16px; accent-color: var(--c-accent); cursor: pointer; }
.login-alt { text-align: center; margin: 16px 0 4px; }
.login-alt a { color: var(--c-text-sec); font-size: 14px; text-decoration: none; }
.login-alt a:hover { color: var(--c-accent); text-decoration: underline; }
.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);
}

.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: none;
}
.fm-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.fm-sidebar {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 14px;
}
.fm-sidebar__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.fm-sidebar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  font: 600 14px/1 var(--font-sans);
  color: var(--c-text);
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.fm-sidebar__btn:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}
.fm-sidebar__upload {
  width: 100%;
  justify-content: center;
}
.fm-sidebar .fm-upload-card {
  padding: 0;
  margin-bottom: 12px;
}
.fm-sidebar .fm-dropzone__inner {
  padding: 14px 10px;
}
.fm-sidebar .fm-dropzone__sub {
  font-size: 12px;
  line-height: 1.4;
  max-width: none;
}
.fm-sidebar .fm-tech-details {
  margin-top: 0;
}
.fm-main {
  min-width: 0;
}
.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;
  }
}

/* Add account — layout (sections keep Restore vs App stack out of nested hidden panels) */
.hm-add-block {
  margin: 0;
}
.hm-add-h2 {
  margin: 0 0 6px;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hm-add-block__lead {
  margin: 0 0 10px;
  color: var(--c-text-sec);
  font-size: 14px;
  line-height: 1.5;
}
.hm-add-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.hm-restore-url-hint-list {
  margin: 8px 0 0;
  padding-left: 1.15rem;
  line-height: 1.45;
}
.hm-restore-url-hint-list li {
  margin: 3px 0;
}

/* Add account — restore from URLs */
.hm-restore-url-panel {
  max-width: 42rem;
  padding: 18px 18px 16px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-surface-2) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.hm-restore-url-fetch-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hm-restore-url-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.hm-restore-url-in {
  flex: 1 1 16rem;
  min-width: 0;
}
.hm-restore-fetch-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.hm-restore-fetch-status {
  margin-top: 4px;
  min-height: 1.35em;
  font-size: 13px;
  color: var(--c-text-sec);
}
.hm-restore-fetch-live-wrap {
  margin-top: 6px;
}
.hm-restore-fetch-live {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--c-text);
  word-break: break-all;
}
.hm-restore-fetch-livebar {
  margin-top: 6px;
  height: 5px;
  border-radius: 3px;
  background: var(--c-line);
  overflow: hidden;
}
.hm-restore-fetch-livebar__inner {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--c-accent);
  transition: width 0.15s ease-out;
}
.hm-restore-url-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--c-line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.hm-restore-staged-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
}
.hm-restore-clear-staged {
  font-size: 13px;
}
.hm-restore-fetch-debug {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 12px;
  overflow: auto;
  max-height: 16rem;
  background: var(--c-surface-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  white-space: pre-wrap;
  word-break: break-word;
}
.hm-restore-url-panel .field {
  margin-bottom: 14px;
}
.hm-restore-url-panel .field:last-of-type {
  margin-bottom: 0;
}
.hm-restore-url-panel input[type="url"],
.hm-restore-url-panel .hm-restore-url-in {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.hm-restore-url-panel .hm-restore-url-hint {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--c-line-soft);
  font-size: 13px;
  color: var(--c-text-sec);
  line-height: 1.55;
}

.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;
}

/* AJAX loading state for the swappable file region */
#fm-main.fm-loading { opacity: 0.55; pointer-events: none; transition: opacity 0.12s ease; }
.fm-hint-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.fm-hint-tip { color: var(--c-text-mut); font-size: 12.5px; }

/* Right-click context menu */
.fm-ctx {
  position: fixed;
  z-index: 1000;
  min-width: 200px;
  max-width: 264px;
  padding: 6px;
  background: var(--c-surface);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(20, 18, 15, 0.18), 0 2px 8px rgba(20, 18, 15, 0.1);
  font-size: 14px;
  animation: fmCtxIn 0.09s ease;
}
@keyframes fmCtxIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.fm-ctx__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-text);
  font: inherit;
  cursor: pointer;
}
.fm-ctx__item:hover, .fm-ctx__item:focus-visible { background: var(--c-bg-alt); outline: none; }
.fm-ctx__item--danger { color: var(--c-danger); }
.fm-ctx__item--danger:hover { background: var(--c-danger-w); }
.fm-ctx__sep { height: 1px; margin: 5px 6px; background: var(--c-line); }
.fm-ctx__header { padding: 6px 12px 9px; }
.fm-ctx__header-name { display: block; font-weight: 600; font-size: 13.5px; color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-ctx__header-type { display: block; margin-top: 2px; font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-text-mut); }
/* The row the context menu is acting on */
.fm-table tbody tr.fm-row--menu td { background: var(--c-accent-w); }
.fm-table tbody tr.fm-row--menu td:first-child { box-shadow: inset 3px 0 0 var(--c-accent); }

/* Transient toast (copy / cut confirmations) */
.fm-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  z-index: 1100;
  padding: 9px 16px;
  background: var(--c-text);
  color: var(--c-bg);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(20, 18, 15, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.fm-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.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-col-unzip,
.fm-col-delfile,
.fm-col-delfolder,
.fm-col-rename {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}
.fm-col-unzip .btn,
.fm-col-delfile .btn,
.fm-col-delfolder .btn,
.fm-col-rename .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.fm-del-btn--icon,
.fm-del-folder-btn--icon,
.fm-rename-btn--icon {
  min-width: 40px;
  padding-left: 10px;
  padding-right: 10px;
}
.fm-rename-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-sec);
  margin-bottom: 6px;
}
.fm-rename-input {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-text);
}
.fm-rename-input:focus {
  outline: 2px solid var(--c-accent);
  outline-offset: 1px;
}
/* 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-sub__sep {
  margin: 0 0.35em;
  color: var(--c-text-mut);
}
.fm-edit-dirty {
  color: #b45309;
  font-weight: 600;
}
.fm-edit-inline-status {
  font-size: 13px;
  font-weight: 600;
  max-width: min(280px, 40vw);
  line-height: 1.35;
  color: var(--c-text-sec);
}
.fm-edit-inline-status--err {
  color: var(--c-danger);
}
.fm-save-btn {
  min-width: 148px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.fm-save-btn__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fm-save-btn__ico svg {
  display: block;
}
.fm-save-btn--clean {
  background: var(--c-surface);
  color: var(--c-text-sec);
  border-color: var(--c-line-strong);
  opacity: 1;
}
.fm-save-btn--clean[disabled] {
  opacity: 1;
  cursor: default;
}
.fm-save-btn--dirty {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}
.fm-save-btn--dirty[disabled] {
  opacity: 0.45;
}
.fm-save-btn--saving {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
  opacity: 0.92;
}
.fm-save-btn--saving .fm-save-btn__ico {
  animation: fm-save-spin 0.75s linear infinite;
}
.fm-save-btn--saved {
  background: var(--c-ok-w);
  border-color: #b8d4bf;
  color: #1e4a2a;
  opacity: 1;
}
.fm-save-btn--saved[disabled] {
  opacity: 1;
  cursor: default;
}
.fm-save-btn--error {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}
@keyframes fm-save-spin {
  to { transform: rotate(360deg); }
}
.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: var(--font-mono);
  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--err {
  background: var(--c-danger-w);
  color: #7d2418;
  border: 1px solid #e8c4bc;
}
.hm-toast__ico--err {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #7d2418;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  margin-top: 1px;
}
.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: 28px;
  height: 28px;
}
.fm-file-ico .fm-ft-logo,
.fm-file-ico svg {
  display: block;
}
.fm-file-ico--dir {
  color: #b8860b;
}
.fm-ft-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 8px 3px 3px;
  border-radius: 999px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line-soft);
  vertical-align: middle;
  max-width: 100%;
}
.fm-ft-badge__logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  line-height: 0;
}
.fm-ft-badge__logo svg {
  display: block;
  border-radius: 4px;
}
.fm-ft-badge__lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-ft-badge--dir .fm-ft-badge__lbl {
  color: #7a5c00;
}
.fm-type-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}
.fm-preview-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-mut);
  text-decoration: none;
  line-height: 0;
  padding: 2px;
  border-radius: 4px;
  transition: color 0.12s ease, background 0.12s ease;
}
.fm-preview-link:hover {
  color: var(--c-accent);
  background: var(--c-accent-w);
}
.fm-preview-link svg {
  display: block;
}
.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: var(--font-mono);
  font-size: 13px;
}

.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: 0%;
  height: 100%;
  border-radius: 3px;
  background: var(--c-accent);
  transition: width 0.35s ease;
}
.hm-backup-progress--indeterminate .hm-backup-progress__bar {
  width: 38%;
  transition: none;
  animation: hm-backup-indet 1.15s ease-in-out infinite;
}
.hm-backup-overlay__pct {
  margin: 0.5rem 0 0;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--c-text-sec);
  text-align: center;
}
@keyframes hm-backup-indet {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* --- Panel diagnostics (/diagnostics) --- */
.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-card--storage .diagnostics-storage-hint {
  font-size: 12px;
  max-width: 22rem;
  text-align: right;
}

.diagnostics-storage-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hm-disk-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.hm-disk-block__label {
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text);
}

.hm-disk-block__path {
  font-size: 12px;
  color: var(--c-text-mut);
  word-break: break-all;
  background: var(--c-bg-alt);
  padding: 2px 6px;
  border-radius: var(--r-sm);
}

/* Fixed-width meter: used (left of bar), total (right of bar) */
.hm-disk-meter {
  display: grid;
  grid-template-columns: minmax(3.75rem, max-content) var(--hm-disk-bar-w) minmax(3.75rem, max-content);
  column-gap: 10px;
  row-gap: 6px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  --hm-disk-bar-w: 200px;
}

.hm-disk-meter__used {
  justify-self: end;
  text-align: right;
}

.hm-disk-meter__total {
  justify-self: start;
  text-align: left;
}

.hm-disk-meter__num {
  display: block;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  line-height: 1.2;
  color: var(--c-text);
}

.hm-disk-meter__lbl {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  color: var(--c-text-mut);
}

.hm-disk-meter__track {
  grid-column: 2;
  grid-row: 1;
  width: var(--hm-disk-bar-w);
}

.hm-disk-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--c-line-soft);
  overflow: hidden;
  border: 1px solid var(--c-line);
}

.hm-disk-bar__fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c-accent) 0%, #d4692a 100%);
  transition: width 0.35s ease;
}

.hm-disk-bar__fill--warn {
  background: linear-gradient(90deg, var(--c-warn) 0%, #a87020 100%);
}

.hm-disk-bar__fill--crit {
  background: linear-gradient(90deg, var(--c-danger) 0%, #7a2419 100%);
}

.hm-disk-meter__sub {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--c-text-sec);
  line-height: 1.35;
}

.hm-disk-meter__subsep {
  color: var(--c-text-soft);
  margin: 0 0.2em;
}

@media (max-width: 520px) {
  .hm-disk-block__head {
    flex-direction: column;
    align-items: flex-start;
  }
  .diagnostics-card--storage .diagnostics-storage-hint {
    text-align: left;
    max-width: none;
  }
  .hm-disk-meter {
    --hm-disk-bar-w: 160px;
    column-gap: 8px;
  }
}
.processes-table-wrap {
  overflow: auto;
  max-height: min(72vh, 900px);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
}
.processes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.processes-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--c-surface-2, #f0f1f4);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-line-strong);
  font-weight: 600;
  white-space: nowrap;
}
.processes-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--c-line);
  vertical-align: top;
}
.processes-table tbody tr:hover {
  background: var(--c-surface-2, #f8f9fb);
}
.processes-table .proc-args {
  max-width: 36vw;
  word-break: break-word;
}
.processes-table .proc-args code {
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
}
.processes-col-actions {
  white-space: nowrap;
  width: 1%;
}

/* Dashboard: on-demand storage (eye reveal) */
.hm-storage-reveal[aria-busy="true"] {
  opacity: 0.55;
  cursor: wait;
}

/* =================================================================
   v0.9.52 polish — UX cleanup pass
   ================================================================= */

/* Login: center simple unauth pages (error/404). The immersive split login
   (.login-shell) manages its own full-bleed layout, so exclude it here. */
.login-bg:not(:has(.login-shell)) main#main { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 24px; }

/* Dashboard account filter (inline in Sites card head). */
.hm-acct-head .head-right {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}
.hm-acct-filter {
  width: 260px;
  max-width: min(260px, 100%);
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  border-radius: var(--r-sm);
  font: 14px var(--font-sans);
  color: var(--c-text);
}
.hm-acct-filter:focus {
  outline: none;
  border-color: var(--c-accent);
}
.hm-acct-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-mut);
  white-space: nowrap;
  min-width: 2.5em;
  text-align: right;
}
.hm-acct-row--hidden { display: none !important; }

/* Reboot: tighten min so 5 cards fit on a normal desktop. */
.reboot-service-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.svc-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; margin-left: 6px;
  border: 1px solid var(--c-line);
}
.svc-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-text-mut); }
.svc-status--active { background: rgba(22,163,74,0.10); border-color: rgba(22,163,74,0.30); color: #166534; }
.svc-status--active .dot { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.18); }
.svc-status--inactive { color: var(--c-text-mut); }
.svc-status--missing { color: var(--c-text-mut); font-style: italic; }

/* File-manager: single Actions column (was 5). Icons only, hover-revealed text. */
.fm-actions {
  display: inline-flex; gap: 4px; align-items: center;
  white-space: nowrap;
}
.fm-actions .btn.sm.fm-act {
  padding: 6px 8px; min-height: 30px;
  border-radius: 8px;
  background: transparent; border-color: transparent;
  color: var(--c-text-sec);
}
.fm-actions .btn.sm.fm-act:hover {
  background: var(--c-surface-2); border-color: var(--c-line); color: var(--c-text);
}
.fm-actions .btn.sm.fm-act.danger:hover {
  background: var(--c-danger-w); border-color: var(--c-danger); color: #fff;
}
.fm-actions .btn.sm.fm-act svg { width: 16px; height: 16px; }
.fm-actions .fm-act--off { opacity: 0.18; pointer-events: none; }

/* Inline "copy path" glyph at the end of each file/folder name — kept tiny and
   faint so it never competes with the name; just a hint that darkens on hover. */
.fm-name-cell .fm-copypath-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px; margin-left: 2px;
  border: 0; background: none; color: inherit;
  cursor: pointer; opacity: 0.28;
  transition: opacity .12s, color .12s;
}
.fm-name-cell:hover .fm-copypath-btn { opacity: 0.5; }
.fm-name-cell .fm-copypath-btn:hover { opacity: 0.95; }
.fm-name-cell .fm-copypath-btn.fm-copied { opacity: 1; color: var(--c-ok); }
.fm-name-cell .fm-copypath-btn svg { width: 13px; height: 13px; display: block; }
.fm-col-actions { width: 1%; white-space: nowrap; text-align: right; padding-right: 18px; }

/* ---- Multi-select + Move ---- */
.fm-col-check { width: 1%; white-space: nowrap; padding-right: 0; text-align: center; }
.fm-check, #fm-check-all {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--c-accent);
  vertical-align: middle; margin: 0;
}
.fm-row--selected { background: var(--c-accent-w); }
.fm-row--selected:hover { background: var(--c-accent-w); }

.fm-selbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 14px; margin: 0 0 12px;
  background: var(--c-surface-2); border: 1px solid var(--c-line);
  border-radius: var(--r-sm); font-size: 13px;
}
.fm-selbar__count strong { color: var(--c-accent); }
.fm-selbar__actions { display: inline-flex; gap: 8px; }

.fm-move-browser {
  border: 1px solid var(--c-line); border-radius: var(--r-sm); overflow: hidden;
  background: var(--c-surface);
}
.fm-move-crumbs {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  padding: 8px 12px; background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-line); font-size: 13px;
}
.fm-move-crumb { color: var(--c-accent); text-decoration: none; cursor: pointer; }
.fm-move-crumb--here { color: var(--c-text); font-weight: 600; cursor: default; }
.fm-move-crumbsep { color: var(--c-text-mut); }
.fm-move-list { max-height: 280px; overflow-y: auto; }
.fm-move-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 12px; background: none; border: 0;
  border-bottom: 1px solid var(--c-line-soft);
  text-align: left; font: inherit; color: var(--c-text); cursor: pointer;
}
.fm-move-row:last-child { border-bottom: 0; }
.fm-move-row:hover:not(:disabled) { background: var(--c-bg-alt); }
.fm-move-row:disabled { opacity: 0.5; cursor: not-allowed; }
.fm-move-row--up { color: var(--c-text-sec); font-weight: 600; }
.fm-move-row__name { flex: 1 1 auto; word-break: break-all; }
.fm-move-row__note {
  flex: 0 0 auto; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--c-text-mut);
}
.fm-move-empty { padding: 14px 12px; color: var(--c-text-mut); font-size: 13px; }
.fm-move-dest { margin: 12px 0 0; font-size: 13px; color: var(--c-text-sec); word-break: break-all; }
.fm-move-dest code {
  background: var(--c-surface-2); border: 1px solid var(--c-line);
  border-radius: 4px; padding: 1px 6px;
}
.fm-move-dest__warn { color: var(--c-danger); }
/* File-manager: hide upload progress bar when not active. */
.fm-progress-wrap.fm-progress-wrap--idle { display: none; }
.fm-progress-meta.fm-progress-meta--idle { display: none; }

/* Server-path on file-manager bottom: read-only inline panel, not button-styled. */
.fm-tech-details {
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--c-surface-2);
  border: 1px dashed var(--c-line);
  border-radius: var(--r-sm);
  color: var(--c-text-mut);
  font-size: 12px;
}
.fm-tech-details summary { font-weight: 500; color: var(--c-text-mut); }
.fm-tech-path { background: transparent; border: 0; padding: 4px 0 0; font-size: 12px; }

/* Backups page — split codebase / database panes. */
.hm-backup-page-head { margin-bottom: 24px; }

.hm-backup-alert { margin-bottom: 1rem; }
.hm-backup-alert-pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  font-size: 12px;
}

.hm-backup-store-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  font-size: 14px;
}
.hm-backup-store-banner__label {
  font-weight: 600;
  color: var(--c-text-sec);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.hm-backup-store-banner__path {
  font-size: 13px;
  word-break: break-all;
}
.hm-backup-store-banner__hint {
  color: var(--c-text-mut);
  font-size: 13px;
  width: 100%;
}

.hm-backup-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 960px) {
  .hm-backup-split { grid-template-columns: 1fr; }
}

.hm-backup-pane {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hm-backup-pane--codebase {
  border-top: 3px solid var(--c-info);
}
.hm-backup-pane--database {
  border-top: 3px solid var(--c-ok);
}
.hm-backup-pane--running {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px var(--c-accent-w);
}

.hm-backup-pane__hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 16px;
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-line-soft);
}
.hm-backup-pane__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  color: var(--c-text-sec);
}
.hm-backup-pane--codebase .hm-backup-pane__icon { color: var(--c-info); }
.hm-backup-pane--database .hm-backup-pane__icon { color: var(--c-ok); }
.hm-backup-pane__intro { flex: 1; min-width: 0; }
.hm-backup-pane__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
}
.hm-backup-pane__tagline {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--c-text-mut);
}
.hm-backup-pane__count { flex-shrink: 0; margin-top: 4px; }

.hm-backup-pane__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 22px 22px;
}
.hm-backup-pane__desc {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text-sec);
}
.hm-backup-pane__desc code { font-size: 12.5px; }

.hm-backup-pane__artifact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.hm-backup-pane__artifact-label {
  font-weight: 600;
  color: var(--c-text-mut);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hm-backup-pane__running {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-accent);
  background: var(--c-accent-w);
  border-radius: var(--r-sm);
}
.hm-backup-pane__running svg { animation: hm-backup-spin 1.2s linear infinite; }
@keyframes hm-backup-spin {
  to { transform: rotate(360deg); }
}

.hm-backup-pane__form { margin-bottom: 12px; }
.hm-backup-pane__cta { width: 100%; justify-content: center; }
.hm-backup-pane__note { margin: 0 0 16px; font-size: 13px; }

.hm-backup-pane__list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--c-line-soft);
  font-size: 14px;
}
.hm-backup-pane__list-head strong { font-weight: 700; }

.hm-backup-pane__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 16px;
  min-height: 140px;
  color: var(--c-text-sec);
  border: 1px dashed var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-bg);
}
.hm-backup-pane__empty-icon {
  margin-bottom: 10px;
  opacity: 0.35;
  color: var(--c-text-mut);
}
.hm-backup-pane__empty p { margin: 0 0 6px; font-size: 14px; }
.hm-backup-pane__empty .hint { font-size: 13px; }

.hm-backup-snap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hm-backup-snap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
  background: var(--c-bg);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-sm);
}
.hm-backup-snap__top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 520px) {
  .hm-backup-snap__top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
@media (min-width: 520px) {
  .hm-backup-snap {
    gap: 12px;
  }
}
.hm-backup-snap__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.hm-backup-snap__name {
  font-size: 12px;
  line-height: 1.35;
  word-break: break-all;
}
.hm-backup-snap__when {
  font-size: 12px;
  color: var(--c-text-mut);
}
.hm-backup-snap__size {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-sec);
}
.hm-backup-snap__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}
.hm-backup-snap__actions form { display: inline; }

.hm-backup-snap__export {
  border-top: 1px solid var(--c-line-soft);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hm-backup-export-switch { margin-top: 0; }
.hm-backup-export-switch .hm-switch__label { max-width: none; }
.hm-backup-export-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hm-backup-export-panel--hidden,
.hm-backup-export-panel[hidden] { display: none !important; }
.hm-backup-export-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}
.hm-backup-export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.hm-backup-export-url {
  flex: 1 1 220px;
  min-width: 0;
  font-size: 12px;
  padding: 8px 10px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-xs);
  background: var(--c-surface);
  color: var(--c-text);
}
.hm-backup-export-wget {
  display: block;
  font-size: 11px;
  line-height: 1.45;
  word-break: break-all;
  padding: 8px 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-xs);
  color: var(--c-text-sec);
}
.hm-backup-export-ip {
  margin: 0;
  font-size: 12px;
}
.hm-backup-export-ip code {
  word-break: break-all;
}

.hm-backup-footnote {
  margin-top: 20px;
  max-width: var(--prose-max);
  line-height: 1.5;
}

/* Legacy snapshot table helpers (other pages). */
.bak-age-actions { display: flex; gap: 8px; align-items: center; }

/* SSH access: a small "Copy" button overlaid on every <pre>. */
.hm-pre-wrap { position: relative; }
.hm-pre-wrap pre { padding-right: 92px; }
.hm-pre-copy {
  position: absolute; top: 8px; right: 8px;
  padding: 4px 10px; min-height: 28px;
  font-size: 12px;
  background: rgba(255,255,255,0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px; cursor: pointer;
}
.hm-pre-copy:hover { background: rgba(255,255,255,0.14); }
.hm-pre-copy--ok { background: rgba(34,197,94,0.20); border-color: rgba(34,197,94,0.45); color: #d1fae5; }

/* Audit log table. */
.audit-table { font-size: 13px; }
.audit-table td.audit-action code { font-size: 12px; padding: 1px 6px; }
.audit-table td.audit-when { white-space: nowrap; color: var(--c-text-mut); }
.audit-action--ok { color: var(--c-success, #166534); }
.audit-action--fail { color: var(--c-danger); }

/* Hostman-update / publish: neutral card variant (was sharing the danger-zone red). */
.hm-update-card.hm-update-card--neutral { border-color: var(--c-line); }
.hm-update-card.hm-update-card--neutral .head { background: var(--c-surface-2); }

/* Suspend / unsuspend tiny banner. */
.hm-suspended-banner {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 16px;
  background: #fef3c7; border: 1px solid #fbbf24; border-radius: var(--r-sm);
  margin-bottom: 18px;
  color: #78350f;
  font-size: 14px;
}
.hm-suspended-banner svg { width: 18px; height: 18px; }

/* Log tail viewer modal-ish panel. */
.hm-log-viewer pre {
  max-height: 70vh; overflow: auto;
  font-size: 12px; line-height: 1.55;
}

/* New Account: collapsed Restore section (closed-by-default). */

/* Add Account: live preview of derived username. */
.hm-uname-preview {
  font-size: 12.5px; color: var(--c-text-mut);
  margin-top: 4px; height: 16px;
}
.hm-uname-preview code { font-size: 12px; }

/* Staged restore countdown. */
.hm-restore-countdown {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: var(--c-surface-2); border: 1px solid var(--c-line);
  font-size: 12px; color: var(--c-text-sec); margin-left: 8px;
}

/* Processes search. */
.hm-proc-toolbar {
  display: flex; gap: 12px; align-items: center;
  margin: 0 0 14px;
}
.hm-proc-toolbar input[type=search] {
  flex: 1; min-width: 0; max-width: 420px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--c-line); background: var(--c-surface);
  border-radius: var(--r-sm); font: 13px var(--font-sans); color: var(--c-text);
}
.hm-proc-toolbar input[type=search]:focus { outline: none; border-color: var(--c-accent); }
.hm-proc-row--hidden { display: none !important; }
.processes-table .processes-col-actions .btn.danger.sm { visibility: hidden; }
.processes-table tr:hover .processes-col-actions .btn.danger.sm { visibility: visible; }

/* Diagnostics: phpinfo link. */

/* Dashboard: replacement Stack stat — disk + last activity. */
.stat--disk .value { display: flex; align-items: baseline; gap: 4px; font-size: 1.2rem; }
.stat--disk .value b { font-weight: 700; }
.stat--disk .value span { font-weight: 400; color: var(--c-text-mut); font-size: 0.85em; }


/* =================================================================
   v0.9.54 — Add Account 5-card picker
   ================================================================= */

.hm-feat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 18px 0 6px;
}
@media (max-width: 1100px) {
  .hm-feat-grid { grid-template-columns: repeat(5, minmax(160px, 1fr)); overflow-x: auto; }
}

.hm-feat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 22px 12px 18px;
  background: var(--c-surface);
  border: 2px solid var(--c-line);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: var(--c-text);
  transition: border-color 0.12s, background 0.12s, transform 0.06s, box-shadow 0.12s;
  min-height: 168px;
}
.hm-feat-card:hover { border-color: var(--c-text-mut); background: var(--c-surface-2); }
.hm-feat-card:active { transform: translateY(1px); }
.hm-feat-card.is-selected {
  border-color: var(--c-accent);
  background: var(--c-surface);
  box-shadow: 0 0 0 4px rgba(199, 84, 22, 0.10), inset 0 0 0 1px var(--c-accent);
}
.hm-feat-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--c-surface-2);
  color: var(--c-text-sec);
}
.hm-feat-card.is-selected .hm-feat-card__icon {
  background: rgba(199, 84, 22, 0.10);
  color: var(--c-accent);
}
.hm-feat-card__title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.hm-feat-card__desc {
  font-size: 12.5px;
  color: var(--c-text-mut);
  line-height: 1.4;
  margin-top: 2px;
}

.hm-feat-skip {
  display: flex; justify-content: center;
  margin: 10px 0 18px;
}
.hm-feat-skip-btn {
  background: transparent;
  border: 1px dashed var(--c-line);
  color: var(--c-text-mut);
  border-radius: 999px;
  padding: 6px 14px;
  font: 13px var(--font-sans);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.hm-feat-skip-btn:hover { border-color: var(--c-text-mut); color: var(--c-text-sec); }
.hm-feat-skip-btn.is-active {
  border-style: solid;
  border-color: var(--c-text-sec);
  color: var(--c-text);
  background: var(--c-surface-2);
}

.hm-feat-detail {
  margin-top: 6px;
  padding: 18px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 12px;
}
.hm-feat-detail[hidden] { display: none; }

/* Release notes (What's new / Updates page) rendered from docs/CHANGELOG.md */
.hm-changelog { line-height: 1.55; }
.hm-changelog h1 { font-size: 1.25rem; margin: 0 0 8px; }
.hm-changelog h2 { font-size: 1.1rem; margin: 18px 0 6px; }
.hm-changelog h3 { font-size: 0.98rem; margin: 14px 0 4px; color: var(--c-text-sec); }
.hm-changelog h1:first-child,
.hm-changelog h2:first-child { margin-top: 0; }
.hm-changelog p { margin: 6px 0; }
.hm-changelog ul { margin: 6px 0; padding-left: 20px; }
.hm-changelog li { margin: 4px 0; }
.hm-changelog li.sub { list-style: circle; margin-left: 18px; }
.hm-changelog code {
  background: var(--c-surface-2);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 0.88em;
}
.hm-changelog hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: 16px 0;
}

/* ----------------------------------------------------------------------
   Backup page polish — tasteful micro-interactions that keep the flat,
   warm aesthetic. Every animation below is auto-disabled by the global
   prefers-reduced-motion rule near the top of this file.
   ---------------------------------------------------------------------- */

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

/* Delete modal: fade the backdrop, lift the panel in. */
.hm-modal:not([hidden]) .hm-modal__backdrop { animation: hm-fade-in 0.18s ease both; }
.hm-modal:not([hidden]) .hm-modal__panel {
  animation: hm-pop-in 0.22s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

/* "Creating backup" overlay: same entrance language. */
.hm-backup-overlay:not([hidden]) { animation: hm-fade-in 0.18s ease both; }
.hm-backup-overlay:not([hidden]) .hm-backup-overlay__panel {
  animation: hm-pop-in 0.24s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

/* Snapshot rows feel alive on hover, with a pane-keyed accent rail. */
.hm-backup-snap {
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.hm-backup-snap:hover {
  border-color: var(--c-line-strong);
  background: var(--c-surface);
}
.hm-backup-pane--codebase .hm-backup-snap:hover { box-shadow: inset 3px 0 0 var(--c-info); }
.hm-backup-pane--database .hm-backup-snap:hover { box-shadow: inset 3px 0 0 var(--c-ok); }

/* A soft light sweep across the determinate progress fill while it works. */
.hm-backup-progress__bar { position: relative; overflow: hidden; }
.hm-backup-progress__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(-100%);
  animation: hm-bar-sheen 1.6s ease-in-out infinite;
}
.hm-backup-progress--indeterminate .hm-backup-progress__bar::after { display: none; }
@keyframes hm-bar-sheen { to { transform: translateX(100%); } }

/* Copy buttons briefly confirm success in the success colour. */
.js-backup-export-copy.is-copied {
  color: var(--c-ok);
  border-color: var(--c-ok);
}

/* Terminal cards side by side (Claude + Cursor + Codex) — equal height, always
   three across in one row on desktop; collapse to one column when narrow.
   minmax(0,1fr) lets the columns shrink so long content never forces overflow. */
.term-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.term-cols > .card { margin-top: 0; display: flex; flex-direction: column; }
.term-cols > .card + .card { margin-top: 0; }
.term-cols > .card .body { flex: 1 1 auto; display: flex; flex-direction: column; }
/* pin the action row to the bottom so both cards' buttons line up across the pair */
.term-cols .term-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.term-cols .term-actions form { margin: 0; }

/* Header title with a brand-logo chip — normalises the two brands' visual weight,
   reusing the same chip language as .tile .icon-wrap / .hero .avatar. */
.card .head .head-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.term-logo {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line);
  display: grid; place-items: center;
  flex: none;
}
.term-logo .brand-logo { width: 19px; height: 19px; display: block; }

@media (max-width: 860px) {
  .term-cols { grid-template-columns: 1fr; }
}

/* Dashboard terminal columns (Claude / Cursor / Codex) — brand-logo header labels + open buttons */
.th-term-h { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.th-term-h .brand-logo { flex: none; display: block; }
.td-term { white-space: nowrap; }
.td-term .hm-term-open svg { width: 16px; height: 16px; }

/* ============================================================
   File manager — List / Grid view toggle + grid (thumbnail) view
   ============================================================ */
.fm-viewtoggle {
  display: inline-flex; flex: 0 0 auto; align-items: stretch;
  border: 1px solid var(--c-line); border-radius: var(--r-sm);
  overflow: hidden; background: var(--c-bg-alt);
}
.fm-viewtoggle__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13.5px; font-weight: 600;
  font-family: var(--font-sans); color: var(--c-text-sec);
  background: transparent; border: 0; line-height: 1; cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.fm-viewtoggle__btn + .fm-viewtoggle__btn { border-left: 1px solid var(--c-line); }
.fm-viewtoggle__btn:hover { color: var(--c-text); }
.fm-viewtoggle__btn.is-active { background: var(--c-surface); color: var(--c-accent); }
.fm-viewtoggle__btn svg { width: 16px; height: 16px; flex: none; }

.fm-grid-head { display: flex; align-items: center; padding: 2px 2px 12px; }
.fm-grid-selall {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--c-text-mut); cursor: pointer; user-select: none;
}

.fm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.fm-tile {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--c-line); border-radius: var(--r-md);
  background: var(--c-surface); overflow: hidden;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.fm-tile:hover { border-color: var(--c-line-strong); box-shadow: 0 4px 14px rgba(20, 18, 15, 0.08); }
.fm-tile.fm-row--selected { border-color: var(--c-accent); box-shadow: inset 0 0 0 1px var(--c-accent); background: var(--c-accent-w); }
.fm-tile.fm-row--menu { border-color: var(--c-accent); }

.fm-tile__thumb {
  display: flex; align-items: center; justify-content: center;
  height: 118px; background: var(--c-bg-alt);
  border-bottom: 1px solid var(--c-line-soft);
  text-decoration: none; overflow: hidden;
}
.fm-tile__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-tile__ico { display: flex; align-items: center; justify-content: center; }
.fm-tile__ico svg, .fm-tile__ico .fm-ft-logo { width: 44px; height: 44px; }

.fm-tile__body { padding: 9px 10px 10px; min-width: 0; }
.fm-tile__name {
  display: block; font-size: 13px; font-weight: 600; color: var(--c-text);
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
a.fm-tile__name:hover { color: var(--c-accent); text-decoration: underline; }
.fm-tile__meta {
  margin-top: 5px; display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--c-text-mut);
}
.fm-tile__size { font-variant-numeric: tabular-nums; white-space: nowrap; }

.fm-tile__check {
  position: absolute; top: 6px; left: 6px; z-index: 3;
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-sm);
  opacity: 0; transition: opacity 0.12s ease;
}
.fm-tile:hover .fm-tile__check,
.fm-tile.fm-row--selected .fm-tile__check { opacity: 1; }
.fm-tile__check input { margin: 0; }

.fm-tile__actions {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 60%;
  opacity: 0; transition: opacity 0.12s ease;
}
.fm-tile:hover .fm-tile__actions { opacity: 1; }
.fm-tile__actions .btn.sm,
.fm-tile__actions .fm-copypath-btn {
  padding: 5px; width: 28px; height: 28px; display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-sm);
  color: var(--c-text-sec); cursor: pointer; box-shadow: 0 1px 3px rgba(20, 18, 15, 0.12);
}
.fm-tile__actions .btn.sm:hover,
.fm-tile__actions .fm-copypath-btn:hover { color: var(--c-text); border-color: var(--c-line-strong); }
.fm-tile__actions .btn.sm.danger:hover { color: var(--c-danger); border-color: var(--c-danger); }
.fm-tile__actions .fm-copypath-btn.fm-copied { color: var(--c-ok); }
.fm-tile__actions svg { display: block; }

/* Touch: no hover, so keep the corner controls visible. */
@media (hover: none) {
  .fm-tile__check, .fm-tile__actions { opacity: 1; }
}

/* ============================================================
   File manager — full-width layout (options on top, list/grid below)
   ============================================================ */
.fm-topbar {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.fm-topbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px 14px;
}
.fm-topbar__actions { display: flex; flex: 0 0 auto; gap: 8px; }
.fm-topbar__actions .fm-sidebar__btn,
.fm-topbar__actions .fm-sidebar__upload { width: auto; }
.fm-topbar .fm-tech-details {
  flex: 0 0 auto; margin: 0; align-self: center; margin-left: auto;
}
/* Keep idle upload feedback from leaving empty gaps under the row. */
.fm-topbar .fm-status:empty,
.fm-topbar .fm-detail-line:empty { display: none; margin: 0; min-height: 0; }

/* Dropzone as a slim full-width bar (was a tall boxed card in the sidebar). */
.fm-dropzone--bar { flex: 1 1 280px; min-width: 200px; display: flex; align-items: center; }
.fm-dropzone--bar .fm-dropzone__inner {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; padding: 9px 16px;
}
.fm-dropzone--bar .fm-dropzone__icon { margin: 0; flex: none; }
.fm-dropzone--bar .fm-dropzone__text { margin: 0; font-size: 14px; }
.fm-dropzone--bar .fm-dropzone__sub { margin: 0; max-width: none; }

/* Grid sits inside the same white panel treatment as the list table. */
.fm-grid-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 14px;
}
.fm-grid-panel .fm-grid-head { padding: 0 2px 12px; }
/* Baseline lift so white tiles read as raised on the white panel. */
.fm-tile { box-shadow: 0 1px 2px rgba(20, 18, 15, 0.05); }

@media (max-width: 720px) {
  .fm-topbar__actions { flex: 1 1 100%; }
  .fm-topbar__actions .fm-sidebar__btn,
  .fm-topbar__actions .fm-sidebar__upload { flex: 1 1 auto; justify-content: center; }
  .fm-topbar .fm-tech-details { margin-left: 0; }
}
