:root {
  --bg: #0a0a0a;
  --bg-elevated: #141a17;
  --ink: #e8efe9;
  --muted: #8a9a8e;
  --line: #243028;
  --accent: #c4f542;
  --accent-ink: #0c0f0e;
  --danger: #ff6b5a;
  --font-display: "Space Grotesk", "Avenir Next", sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: #0a0a0a;
  color: var(--ink);
  line-height: 1.5;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(920px, calc(100% - clamp(1.25rem, 4vw, 2.5rem)));
  margin: 0 auto;
  padding: clamp(1.75rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.shell.shell-wide {
  width: min(1180px, calc(100% - clamp(1rem, 3vw, 2rem)));
}

.shell.shell-apps {
  width: min(1040px, calc(100% - clamp(1.25rem, 4vw, 2.5rem)));
}

.shell.shell-catalog {
  width: min(1180px, calc(100% - clamp(1.25rem, 4vw, 2.5rem)));
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 0.75rem;
}

.brand a {
  color: inherit;
  text-decoration: none;
}

.brand a:hover {
  text-decoration: none;
}

.brand a:hover span {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.brand span {
  color: var(--accent);
}

.lede {
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  color: var(--muted);
  max-width: 36rem;
  font-size: clamp(0.95rem, 2.4vw, 1.05rem);
}

.lede code {
  word-break: break-word;
}

.panel {
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: clamp(0.85rem, 2vw, 1rem);
  padding: clamp(1.15rem, 3vw, 1.75rem);
  backdrop-filter: blur(8px);
  min-width: 0;
}

.panel h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.panel-head h2 {
  margin: 0;
}

.panel-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
}

.db-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 1rem;
}

.db-data-filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--bg-elevated) 80%, #000);
}

.db-data-filter .btn {
  border: 0;
  min-height: 1.9rem;
  padding: 0.3rem 0.75rem;
}

.db-data-filter .btn.is-active {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--ink);
}

.panel + .panel {
  margin-top: 1rem;
}

.panel-tools {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.panel-private {
  border-color: color-mix(in srgb, #7eb6ff 45%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, #7eb6ff 10%, transparent), transparent 42%),
    color-mix(in srgb, var(--bg-elevated) 88%, transparent);
}

.panel-private > summary {
  list-style: none;
  cursor: pointer;
}

.panel-private > summary::-webkit-details-marker {
  display: none;
}

.panel-private > summary:focus {
  outline: none;
}

.panel-private > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0.2rem;
  border-radius: 0.5rem;
}

.panel-private .panel-head {
  margin-bottom: 0;
}

.panel-private[open] .panel-head {
  margin-bottom: 0.55rem;
}

.panel-private .when-open {
  display: none;
}

.panel-private[open] .when-closed {
  display: none;
}

.panel-private[open] .when-open {
  display: inline;
}

.panel-collapse-btn {
  pointer-events: none;
}

.panel-public {
  border-color: color-mix(in srgb, #7dff9a 34%, var(--line));
}

.panel-api {
  border-color: color-mix(in srgb, #7dcdff 34%, var(--line));
}

.panel-catalog {
  border-color: color-mix(in srgb, #2dd4bf 34%, var(--line));
}

.panel-app {
  border-color: color-mix(in srgb, #c4b5fd 34%, var(--line));
}

.chip-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.chip-private {
  color: #9cc7ff;
}

.panel-cars {
  border-color: color-mix(in srgb, #f0b429 32%, var(--line));
}

.panel-scrapers {
  border-color: color-mix(in srgb, #a3e635 32%, var(--line));
}

.panel-data {
  border-color: color-mix(in srgb, #67e8f9 34%, var(--line));
}

.subhead {
  margin: 1.15rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 1.25rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--bg-elevated) 80%, #000);
}

.admin-tab {
  flex: 1 1 8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 0.55rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.admin-tab:hover {
  color: var(--ink);
}

a.admin-tab:visited {
  color: var(--muted);
}

a.admin-tab:visited:hover {
  color: var(--ink);
}

.admin-tab.is-active {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--ink);
}

.admin-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0.15rem;
}

.admin-tab-panel:not(.is-active) {
  display: none;
}

.admin-list-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0 0 1rem;
  padding: 0.15rem;
  max-width: 22rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--bg-elevated) 55%, #000);
}

.admin-list-tab {
  flex: 1 1 6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 2.15rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.admin-list-tab:hover {
  color: var(--ink);
}

.admin-list-tab.is-active {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--ink);
}

.admin-list-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0.15rem;
}

.admin-list-panel:not(.is-active) {
  display: none;
}

.admin-tab-panel .panel + .panel,
.admin-list-panel .panel + .panel {
  margin-top: 1rem;
}

.panel-users {
  border-color: color-mix(in srgb, #c4b5fd 34%, var(--line));
}

.admin-create-user {
  margin: 0 0 1rem;
}

.admin-create-user > summary {
  list-style: none;
  display: inline-flex;
  width: fit-content;
  cursor: pointer;
}

.admin-create-user > summary::-webkit-details-marker {
  display: none;
}

.admin-create-user-form {
  margin-top: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--bg-elevated) 70%, #000);
}

.admin-create-user-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem 1rem;
}

.admin-create-user-field {
  margin: 0;
}

.admin-create-user-field label {
  margin-bottom: 0.35rem;
}

.admin-create-user-form input[type="email"],
.admin-create-user-form input[type="password"],
.admin-create-user-form .db-select {
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.75rem;
  min-height: 2.4rem;
  font-size: 0.95rem;
}

.admin-create-user-form .btn {
  margin-top: 0.85rem;
}

.admin-mgmt-table-users .admin-col-users {
  width: 20%;
}

.admin-mgmt-table-users .admin-col-role,
.admin-mgmt-table-users .admin-col-status {
  width: 14%;
}

.admin-mgmt-table-users .admin-col-updated {
  width: 24%;
}

.admin-form .panel + .panel {
  margin-top: 1rem;
}

.admin-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.admin-save-status {
  margin: -0.5rem 0 1.1rem;
  min-height: 1.35rem;
  font-size: 0.88rem;
}

.admin-save-status-ok {
  color: #7dff9a;
}

.admin-save-status-busy {
  color: var(--muted);
}

.admin-save-status-err {
  color: var(--danger);
}

.admin-table-wrap {
  overflow-x: auto;
  margin: 0 -0.15rem;
  padding: 0 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.admin-mgmt-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.86rem;
}

.admin-mgmt-table th,
.admin-mgmt-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-mgmt-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: normal;
  line-height: 1.3;
}

.admin-mgmt-table tbody tr:hover {
  background: color-mix(in srgb, var(--bg-elevated) 55%, #0a0d0b);
}

.admin-mgmt-table .admin-col-host {
  width: 34%;
}

.admin-mgmt-table .admin-col-type {
  width: 12%;
}

.admin-mgmt-table .admin-col-users {
  width: 20%;
}

.admin-mgmt-table .admin-col-access {
  width: 22%;
}

.admin-mgmt-table .admin-col-archive-action {
  width: 12%;
  white-space: nowrap;
}

.admin-mgmt-table .admin-col-archive-meta {
  width: 28%;
}

.admin-archive-table .admin-col-host {
  width: 52%;
}

.admin-archive-when {
  color: var(--muted);
  font-size: 0.82rem;
  word-break: break-word;
}

.admin-mgmt-table-db .admin-col-host {
  width: 26%;
}

.admin-mgmt-table-db .admin-col-db-type,
.admin-mgmt-table-db .admin-col-status {
  width: 12%;
}

.admin-mgmt-table-db .admin-col-users {
  width: 16%;
}

.admin-mgmt-table-db .admin-col-hosts {
  width: 34%;
}

.admin-db-hosts {
  max-height: 9.5rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #0a0d0b;
}

.admin-db-hosts label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink);
  font-size: 0.8rem;
  cursor: pointer;
}

.admin-db-hosts input[type="checkbox"] {
  width: 0.9rem;
  height: 0.9rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.admin-mgmt-table tr.is-passive .admin-vis-name,
.admin-mgmt-table tr.is-archived .admin-vis-name {
  color: var(--muted);
}

.admin-host-cell {
  min-width: 0;
  max-width: 36rem;
}

.admin-host-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.admin-vis-name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  word-break: break-word;
}

.admin-inline-chip {
  vertical-align: middle;
}

.admin-host-desc {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-vis-owner {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-mgmt-select,
.admin-form .admin-mgmt-select.db-select {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  .admin-mgmt-table,
  .admin-mgmt-table thead,
  .admin-mgmt-table tbody,
  .admin-mgmt-table th,
  .admin-mgmt-table td,
  .admin-mgmt-table tr {
    display: block;
    width: 100%;
  }

  .admin-mgmt-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .admin-mgmt-table tr {
    margin-bottom: 0.85rem;
    padding: 0.85rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--bg-elevated) 40%, transparent);
  }

  .admin-mgmt-table td {
    padding: 0.45rem 0;
    border-bottom: 0;
  }

  .admin-mgmt-table td.admin-col-users,
  .admin-mgmt-table td.admin-col-access,
  .admin-mgmt-table td.admin-col-type,
  .admin-mgmt-table td.admin-col-db-type,
  .admin-mgmt-table td.admin-col-status,
  .admin-mgmt-table td.admin-col-hosts,
  .admin-mgmt-table td.admin-col-archive-action,
  .admin-mgmt-table td.admin-col-archive-meta,
  .admin-mgmt-table td.admin-col-role,
  .admin-mgmt-table td.admin-col-updated {
    display: grid;
    gap: 0.35rem;
  }

  .admin-mgmt-table td.admin-col-type::before {
    content: "Type";
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .admin-mgmt-table td.admin-col-db-type::before {
    content: "Type";
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .admin-mgmt-table td.admin-col-status::before {
    content: "Status";
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .admin-mgmt-table td.admin-col-hosts::before {
    content: "Virtual hosts";
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .admin-mgmt-table td.admin-col-users::before {
    content: "Group";
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .admin-mgmt-table-users td.admin-col-users::before {
    content: "Group";
  }

  .admin-mgmt-table td.admin-col-access::before {
    content: "General Visibility";
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .admin-mgmt-table td.admin-col-archive-action::before {
    content: "Archive";
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .admin-mgmt-table td.admin-col-archive-meta::before {
    content: "Archived";
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .admin-mgmt-table td.admin-col-role::before {
    content: "Role";
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .admin-mgmt-table td.admin-col-updated::before {
    content: "Updated";
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .admin-host-cell {
    max-width: none;
  }
}

.section-note {
  margin: -0.35rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 40rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: #0a0d0b;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  outline: none;
}

input[type="email"] {
  margin-bottom: 1rem;
}

input[type="email"]:focus,
input[type="password"]:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

label.remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1rem 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
}

label.remember input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.8rem 1.2rem;
  border: 0;
  border-radius: 0.65rem;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  min-height: 2.75rem;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-small {
  margin-top: 0;
  padding: 0.45rem 0.85rem;
  min-height: 2.15rem;
  font-size: 0.85rem;
  border-radius: 0.5rem;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  color: var(--ink);
  filter: none;
}

.error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: #ffb4ab;
  font-size: 0.92rem;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.topbar > div {
  min-width: 0;
  flex: 1 1 auto;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex: 0 0 auto;
}

.topbar .btn {
  margin-top: 0.35rem;
  flex: 0 0 auto;
}

.topbar-search {
  flex: 1 1 14rem;
  min-width: 11rem;
  max-width: 20rem;
  margin: 0.35rem 0 0;
}

.topbar-search input[type="search"] {
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.8rem;
  border: 1px solid #d4d4d4;
  border-radius: 0.55rem;
  background: #ffffff;
  color: #111111;
  font: inherit;
  font-size: 0.92rem;
  outline: none;
}

.topbar-search input[type="search"]::placeholder {
  color: #8b8b8b;
}

.topbar-search input[type="search"]:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, #c8c8c8);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.topbar-inline-form,
.panel-inline-form {
  display: inline-flex;
  margin: 0;
  align-items: center;
}

.topbar-inline-form .btn,
.panel-inline-form .btn {
  margin-top: 0.35rem;
}

.meta {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 2vw, 0.78rem);
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.4;
  word-break: break-word;
}

.app-grid {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0.15rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.4rem, 1fr));
  gap: 1.15rem 0.55rem;
  justify-items: center;
}

.app-grid > li {
  width: 100%;
  max-width: 8.6rem;
  position: relative;
  z-index: 0;
}

.app-grid-item:hover,
.app-grid-item:focus-within {
  z-index: 50;
}

.app-grid-hit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  border-radius: 1.05rem;
}

.app-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.42rem;
  width: 100%;
  padding: 0.7rem 0.45rem 0.55rem;
  border: 0;
  border-radius: 1.05rem;
  background: transparent;
  min-width: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.app-grid-item:hover a,
.app-grid-item:focus-within a {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  transform: translateY(-2px);
}

.host-avatar {
  position: relative;
  display: block;
  flex: 0 0 4.65rem;
  width: 4.65rem;
  height: 4.65rem;
}

.host-avatar svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 1.15rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.app-grid-item:hover .host-avatar svg,
.app-grid-item:focus-within .host-avatar svg {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.app-private .host-avatar::after {
  content: "";
  position: absolute;
  top: -0.12rem;
  right: -0.12rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #7eb6ff;
  box-shadow: 0 0 0 2px #0d1210;
}

.app-grid .host {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-grid .desc {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shell-apps .panel,
.shell-apps .app-grid,
.shell-apps .app-grid-item,
.shell-apps .app-grid-hit {
  overflow: visible;
}

.shell-apps .panel:has(.app-grid-item:hover),
.shell-apps .panel:has(.app-grid-item:focus-within) {
  position: relative;
  z-index: 40;
}

/* Invisible bridge keeps hover while the cursor moves onto the popover. */
.app-grid-item::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  width: min(17rem, calc(100vw - 1.5rem));
  height: 0;
  pointer-events: none;
}

.app-grid-item:hover::after,
.app-grid-item:focus-within::after {
  height: 14rem;
  pointer-events: auto;
}

.app-db-popover {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  z-index: 60;
  width: min(17rem, calc(100vw - 1.5rem));
  margin-top: 0.15rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--bg-elevated) 98%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  text-align: left;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .app-grid-item:hover .app-db-popover,
  .app-grid-item:focus-within .app-db-popover {
    display: block;
  }
}

.app-db-popover-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-db-popover-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.app-db-popover-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.app-db-popover-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
}

.app-db-popover-name {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  word-break: break-word;
}

.app-db-popover-engine {
  font-size: 0.68rem;
}

.app-db-popover-desc {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--muted);
}

.admin-host-with-avatar {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.admin-host-with-avatar .host-avatar {
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 2.2rem;
  margin-top: 0.05rem;
}

.admin-host-with-avatar .host-avatar svg {
  border-radius: 0.55rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1 1 auto;
}

.host {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.desc {
  color: var(--muted);
  line-height: 1.35;
}

.chip {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
  flex: 0 0 auto;
  white-space: nowrap;
}

.empty {
  color: var(--muted);
  margin: 0;
}

.panel-databases {
  margin-top: 1rem;
}

.panel-ftps {
  margin-top: 1rem;
}

.panel-ftps h2 {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.ftp-endpoint {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.panel-databases h2 {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.db-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.db-errors {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.db-table-wrap {
  overflow-x: auto;
  margin: 0 -0.15rem;
  padding: 0 0.15rem;
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 1100px;
}

.db-table th,
.db-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.db-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.db-table tbody tr:hover {
  background: color-mix(in srgb, var(--bg-elevated) 55%, #0a0d0b);
}

.db-table tbody tr[data-edit-href] {
  cursor: pointer;
}

.db-table tbody tr.db-row-editing {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.db-table .db-edit-hit {
  color: inherit;
  text-decoration: none;
  display: block;
  min-height: 1.2em;
}

.db-table .db-edit-hit:hover {
  color: var(--accent);
}

.db-table .num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.db-table .db-name {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  white-space: nowrap;
}

.db-table .db-name a {
  color: var(--ink);
}

.db-table .db-name a:hover {
  color: var(--accent);
}

.db-table .db-desc {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: 16rem;
}

.db-hosts-cell {
  vertical-align: middle;
}

.db-hosts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.db-hosts a {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #0d1210;
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.2;
}

.db-hosts a:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  color: var(--accent);
}

.db-table .db-meta {
  white-space: nowrap;
  font-size: 0.82rem;
}

.db-table .db-data {
  text-align: center;
  vertical-align: middle;
}

.db-table .db-icon-col {
  text-align: center;
  vertical-align: middle;
  width: 3.4rem;
}

.db-data-icon,
.db-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  opacity: 0.92;
}

.db-data-icon svg,
.db-status-icon svg {
  display: block;
}

.db-status-icon.is-active {
  color: #7dff9a;
}

.db-status-icon.is-passive,
.db-status-icon.is-archive {
  color: var(--muted);
}

.panel-archive {
  border-color: color-mix(in srgb, var(--muted) 45%, var(--line));
}

.db-table .db-copyright-open {
  color: #7dff9a;
  font-weight: 500;
}

.db-table .db-copyright-analysis {
  color: #ff6b5a;
  font-weight: 500;
}

.db-table .chip {
  display: inline-block;
}

.db-select,
.db-input {
  width: 100%;
  min-width: 7.5rem;
  max-width: 14rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.45rem;
  border: 1px solid var(--line);
  background: #0d1210;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
}

.db-input {
  max-width: 18rem;
  min-width: 10rem;
}

.db-select:focus,
.db-input:focus {
  outline: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.db-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.15rem;
}

.catalog-search {
  flex: 1 1 16rem;
  margin: 0;
}

.catalog-search input[type="search"] {
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: #0a0d0b;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
}

.catalog-search input[type="search"]:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.db-card-grid,
.ftp-card-grid {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 0.85rem;
}

.db-card a,
.ftp-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 100%;
  padding: 1rem 1.05rem 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid var(--line);
  background: #0d1210;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.db-card a:hover,
.ftp-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: #121815;
  transform: translateY(-2px);
}

.db-card-engine-maria a {
  border-left: 3px solid #fb923c;
}

.db-card-engine-ch a {
  border-left: 3px solid #fde047;
}

.db-card-engine-pg a {
  border-left: 3px solid #60a5fa;
}

.db-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.db-card-name {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.db-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.db-card-desc-empty {
  opacity: 0.55;
}

.db-card-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.db-card-copy {
  font-size: 0.78rem;
}

.db-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem 0.75rem;
  margin: 0.15rem 0 0;
}

.db-card-stats div {
  min-width: 0;
}

.db-card-stats dt {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.db-card-stats dd {
  margin: 0.1rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.ftp-hero {
  margin-bottom: 1rem;
}

.ftp-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
}

.ftp-hero-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ftp-hero-value {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.ftp-card {
  align-items: flex-start;
}

.ftp-card-icon {
  width: 2.6rem;
  height: 2.6rem;
}

.ftp-card-icon .host-avatar,
.ftp-card-icon .host-avatar svg {
  width: 2.6rem;
  height: 2.6rem;
  flex-basis: 2.6rem;
  border-radius: 0.7rem;
}

.ftp-card-name {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

.ftp-card-endpoint,
.ftp-card-home,
.ftp-card-access {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.ftp-card-home code,
.ftp-card-endpoint code,
.ftp-hero-value code {
  font-family: var(--font-mono);
}

.flash {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.55rem;
  font-size: 0.9rem;
}

.flash-ok {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
}

.flash-error {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: #ffb4ab;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line));
}

.section-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--muted);
  font-size: clamp(0.72rem, 2vw, 0.8rem);
  line-height: 1.45;
  word-break: break-word;
}

.footer-actions {
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-search,
  .topbar-search input[type="search"],
  .topbar .btn {
    width: 100%;
    max-width: none;
  }

  .app-grid {
    grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr));
    gap: 0.85rem 0.35rem;
  }

  .host-avatar {
    flex-basis: 4.1rem;
    width: 4.1rem;
    height: 4.1rem;
  }

  .chip {
    margin-top: 0.1rem;
  }

  .app-grid-item:hover a,
  .app-grid-item:focus-within a {
    transform: none;
  }
}

@media (max-width: 480px) {
  .panel {
    padding: 1.05rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-grid a,
  .host-avatar svg,
  .btn {
    transition: none;
  }

  .app-grid-item:hover a,
  .app-grid-item:focus-within a,
  .btn:hover {
    transform: none;
  }

  .app-grid-item:hover .host-avatar svg,
  .app-grid-item:focus-within .host-avatar svg {
    filter: none;
    transform: none;
  }
}

/* Worklab Soft Ops shell */
html.soft-ops-theme {
  --bg: #f3f4f6;
  --bg-elevated: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #16a34a;
  --accent-ink: #ffffff;
  --so-bg: #f3f4f6;
  --so-paper: #ffffff;
  --so-ink: #111827;
  --so-muted: #6b7280;
  --so-line: #e5e7eb;
  --so-sidebar: #eef0f3;
  --so-nav-hover: rgba(255, 255, 255, 0.7);
  --so-nav-active: #ffffff;
  --so-shadow: 0 10px 30px rgba(17, 24, 39, 0.05);
  --so-hover: #f1f3f4;
  --so-pill: #ffffff;
  --so-pill-border: #dadce0;
  --so-pill-active-bg: #e6f4ea;
  --so-pill-active-text: #137333;
  --so-rank: #80868b;
  --so-mark-bg: #111111;
  --so-mark-ink: #ffffff;
  --so-public: #16a34a;
  --so-avatar-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
  --font-display: "Figtree", "Space Grotesk", sans-serif;
  --font-body: "DM Sans", "IBM Plex Sans", sans-serif;
  color-scheme: light;
}

html:has(.shell-soft-ops)[data-theme="dark"],
html:has(.shell-soft-ops).theme-dark,
html.soft-ops-theme[data-theme="dark"],
html.soft-ops-theme.theme-dark {
  --bg: #141820;
  --bg-elevated: #1c2230;
  --ink: #eef2f8;
  --muted: #93a0b5;
  --line: #2c3548;
  --accent: #3dd68c;
  --accent-ink: #0b1220;
  --so-bg: #141820;
  --so-paper: #1c2230;
  --so-ink: #eef2f8;
  --so-muted: #93a0b5;
  --so-line: #2c3548;
  --so-sidebar: #10141c;
  --so-nav-hover: rgba(255, 255, 255, 0.06);
  --so-nav-active: #252d3d;
  --so-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
  --so-hover: #262f40;
  --so-pill: #252d3d;
  --so-pill-border: #3a455c;
  --so-pill-active-bg: rgba(61, 214, 140, 0.18);
  --so-pill-active-text: #7dffb3;
  --so-rank: #8490a6;
  --so-mark-bg: #eef2f8;
  --so-mark-ink: #141820;
  --so-public: #3dd68c;
  --so-avatar-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

html:has(.shell-soft-ops) body,
html.soft-ops-theme body {
  background: var(--so-bg);
  color: var(--so-ink);
  font-family: var(--font-body);
}

.shell.shell-soft-ops {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--so-bg);
  color: var(--so-ink);
  font-family: var(--font-body);
}

/* Kill legacy theme icon-grid chrome inside Soft Ops (light + dark). */
.shell-soft-ops .app-grid,
.shell-soft-ops .app-grid > li,
.shell-soft-ops .app-grid-hit,
.shell-soft-ops .app-grid a,
.shell-soft-ops .host-avatar,
.shell-soft-ops .host-avatar svg,
.shell-soft-ops .host-avatar img,
.shell-soft-ops .host-avatar-photo img {
  box-shadow: none;
  filter: none;
  transform: none;
}

.shell-soft-ops .app-grid-item::after {
  display: none;
}

.shell-soft-ops .app-grid-item:hover .host-avatar svg,
.shell-soft-ops .app-grid-item:focus-within .host-avatar svg,
.shell-soft-ops .app-grid-item:hover .host-avatar img,
.shell-soft-ops .app-grid-item:focus-within .host-avatar img {
  transform: none;
  filter: none;
}

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

.shell-soft-ops .soft-ops-sidebar {
  background: var(--so-sidebar);
  border-right: 1px solid var(--so-line);
  padding: 1.25rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.shell-soft-ops .soft-ops-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.35rem;
}

.shell-soft-ops .soft-ops-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--so-mark-bg);
  color: var(--so-mark-ink);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
}

.shell-soft-ops .soft-ops-mark-logo {
  flex: none;
  aspect-ratio: 1;
  background: #a7efcd;
  overflow: hidden;
  box-shadow: 0 6px 16px -8px rgba(20, 62, 52, 0.55);
}

.shell-soft-ops .soft-ops-mark-logo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
}

.shell-soft-ops .soft-ops-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.shell-soft-ops .soft-ops-brand span {
  font-size: 11px;
  color: var(--so-muted);
}

.shell-soft-ops .soft-ops-brand > div > span {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  color: var(--so-muted);
}

.shell-soft-ops .soft-ops-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  overflow: auto;
}

.shell-soft-ops .soft-ops-nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--so-muted);
}

.shell-soft-ops .soft-ops-nav-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  opacity: 0.72;
}

.shell-soft-ops .soft-ops-nav a.active .soft-ops-nav-icon,
.shell-soft-ops .soft-ops-nav a:hover .soft-ops-nav-icon {
  opacity: 1;
}

.shell-soft-ops .soft-ops-nav a:hover {
  color: var(--so-ink);
  background: var(--so-nav-hover);
}

.shell-soft-ops .soft-ops-nav a.active {
  background: var(--so-nav-active);
  color: var(--so-ink);
  box-shadow: var(--so-shadow);
}

.shell-soft-ops .soft-ops-n {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.65;
}

.shell-soft-ops .soft-ops-foot {
  display: flex;
  gap: 0.35rem;
}

.shell-soft-ops .soft-ops-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: color-mix(in srgb, var(--so-paper) 80%, transparent);
  color: var(--so-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
}

.shell-soft-ops .soft-ops-icon-btn:hover {
  background: var(--so-nav-active);
  color: var(--so-ink);
}

.shell-soft-ops .soft-ops-icon-btn .icon-sun {
  display: none;
}

html[data-theme="dark"] .shell-soft-ops .soft-ops-icon-btn .icon-moon,
html.theme-dark .shell-soft-ops .soft-ops-icon-btn .icon-moon,
html.soft-ops-theme[data-theme="dark"] .shell-soft-ops .soft-ops-icon-btn .icon-moon,
html.soft-ops-theme.theme-dark .shell-soft-ops .soft-ops-icon-btn .icon-moon {
  display: none;
}

html[data-theme="dark"] .shell-soft-ops .soft-ops-icon-btn .icon-sun,
html.theme-dark .shell-soft-ops .soft-ops-icon-btn .icon-sun,
html.soft-ops-theme[data-theme="dark"] .shell-soft-ops .soft-ops-icon-btn .icon-sun,
html.soft-ops-theme.theme-dark .shell-soft-ops .soft-ops-icon-btn .icon-sun {
  display: block;
}

.shell-soft-ops .soft-ops-main {
  padding: 1.25rem 1.35rem 2rem;
  min-width: 0;
}

.shell-soft-ops .soft-ops-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.shell-soft-ops .soft-ops-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.shell-soft-ops .soft-ops-meta {
  margin: 0.35rem 0 0;
  color: var(--so-muted);
  font-size: 0.88rem;
}

.shell-soft-ops .soft-ops-top-actions {
  flex: 1 1 16rem;
  max-width: 28rem;
}

.shell-soft-ops .topbar-search {
  width: 100%;
  margin: 0;
}

.shell-soft-ops .topbar-search input {
  width: 100%;
  height: 2.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--so-paper);
  box-shadow: var(--so-shadow);
  color: var(--so-ink);
  padding: 0 1rem;
}

.shell-soft-ops .soft-ops-card {
  background: var(--so-paper);
  border-radius: 24px;
  padding: 1.25rem 1.35rem 1.4rem;
  box-shadow: var(--so-shadow);
  border: 1px solid color-mix(in srgb, var(--so-line) 50%, transparent);
}

.shell-soft-ops .soft-ops-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.shell-soft-ops .soft-ops-card-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.03em;
}

.shell-soft-ops .soft-ops-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--so-muted);
  background: var(--so-bg);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.shell-soft-ops .soft-ops-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
}

.shell-soft-ops .soft-ops-pills button {
  appearance: none;
  border: 1px solid var(--so-pill-border);
  background: var(--so-pill);
  color: var(--so-muted);
  height: 2.15rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  font: 600 13px var(--font-body);
  cursor: pointer;
}

.shell-soft-ops .soft-ops-pills button:hover {
  color: var(--so-ink);
  background: var(--so-hover);
}

.shell-soft-ops .soft-ops-pills button.active {
  background: var(--so-pill-active-bg);
  border-color: var(--so-pill-active-bg);
  color: var(--so-pill-active-text);
}

.shell-soft-ops .app-charts {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3;
  column-gap: 1.75rem;
  display: block;
  grid-template-columns: none;
}

.shell-soft-ops .app-charts > li {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin: 0 0 0.15rem;
  max-width: none;
  width: 100%;
}

.shell-soft-ops .app-charts .app-grid-hit {
  display: block;
}

.shell-soft-ops .app-charts a {
  display: grid;
  grid-template-columns: 1.5rem 56px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 16px;
  text-align: left;
}

.shell-soft-ops .app-charts a:hover,
.shell-soft-ops .app-charts .app-grid-item:focus-within a {
  background: var(--so-hover);
  transform: none;
}

.shell-soft-ops .app-rank {
  font-size: 13px;
  font-weight: 500;
  color: var(--so-rank);
  text-align: center;
}

.shell-soft-ops .host-avatar-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  display: block;
  flex-shrink: 0;
}

.shell-soft-ops .app-charts .host-avatar,
.shell-soft-ops .app-charts .host-avatar-photo {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 14px;
}

.shell-soft-ops .app-charts .host-avatar img,
.shell-soft-ops .app-charts .host-avatar svg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: var(--so-avatar-shadow);
}

.shell-soft-ops .badge-public-corner {
  position: absolute;
  top: -4px;
  right: -6px;
  z-index: 2;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--so-public);
  padding: 0.18rem 0.38rem;
  border-radius: 999px;
  line-height: 1.1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.shell-soft-ops .badge-lock-corner {
  position: absolute;
  top: -4px;
  right: -6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #5a3d00;
  background: linear-gradient(145deg, #ffe27a 0%, #f5c242 45%, #d9a21b 100%);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(120, 80, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.shell-soft-ops .badge-lock-corner.badge-lock-private {
  color: #fff;
  background: linear-gradient(145deg, #ff7a7a 0%, #e5383b 50%, #b3141b 100%);
  box-shadow: 0 1px 2px rgba(120, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.shell-soft-ops .badge-lock-corner svg {
  display: block;
}

.shell-soft-ops .app-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.shell-soft-ops .app-charts .host {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--so-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-soft-ops .app-charts .desc {
  font-size: 0.78rem;
  color: var(--so-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shell-soft-ops .footer,
.shell-soft-ops .footer-actions {
  color: var(--so-muted);
}

.shell-soft-ops .btn-ghost {
  border-color: var(--so-line);
  color: var(--so-muted);
}

.shell-soft-ops .flash {
  margin-bottom: 0.85rem;
}

.shell-soft-ops .soft-ops.soft-ops-with-stats {
  grid-template-columns: 220px minmax(0, 1fr) 260px;
}

.shell-soft-ops .soft-ops-stats {
  background: var(--so-sidebar);
  border-left: 1px solid var(--so-line);
  padding: 1.25rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.shell-soft-ops .soft-ops-stats-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.35rem 0.35rem 0.25rem;
}

.shell-soft-ops .soft-ops-stats-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.shell-soft-ops .soft-ops-stats-host {
  font-size: 11px;
  color: var(--so-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-soft-ops [data-stat="cursor"] {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shell-soft-ops [data-stat="cursor"][hidden],
.shell-soft-ops [data-stat="cursor-head"][hidden] {
  display: none;
}

.shell-soft-ops .server-stat {
  background: var(--so-paper);
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  box-shadow: var(--so-shadow);
  border: 1px solid color-mix(in srgb, var(--so-line) 50%, transparent);
}

.shell-soft-ops [data-stat="disks"] {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shell-soft-ops .server-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.shell-soft-ops .server-stat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--so-muted);
}

.shell-soft-ops .server-stat-label code {
  text-transform: none;
  font-size: 11px;
  font-weight: 600;
}

.shell-soft-ops .server-stat-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.shell-soft-ops .server-stat-bar {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--so-line) 80%, transparent);
  overflow: hidden;
  margin: 0.45rem 0 0.4rem;
}

.shell-soft-ops .server-stat-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.6s ease;
}

.shell-soft-ops .server-stat-bar[data-level="warn"] span {
  background: #f59e0b;
}

.shell-soft-ops .server-stat-bar[data-level="crit"] span {
  background: #ef4444;
}

.shell-soft-ops .server-stat-sub {
  margin: 0;
  font-size: 11.5px;
  color: var(--so-muted);
  font-variant-numeric: tabular-nums;
}

.shell-soft-ops .soft-ops-stats-foot {
  margin: auto 0 0;
  padding: 0 0.35rem;
  font-size: 11px;
  color: var(--so-muted);
}

.shell-soft-ops .soft-ops-stats-foot[data-stale="1"] {
  color: #ef4444;
}

@media (max-width: 1200px) {
  .shell-soft-ops .app-charts {
    columns: 2;
  }
}

@media (max-width: 1080px) {
  .shell-soft-ops .soft-ops.soft-ops-with-stats {
    grid-template-columns: 200px minmax(0, 1fr) 220px;
  }
}

@media (max-width: 860px) {
  .shell-soft-ops .soft-ops,
  .shell-soft-ops .soft-ops.soft-ops-with-stats {
    grid-template-columns: 1fr;
  }

  .shell-soft-ops .soft-ops-stats {
    position: static;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--so-line);
    order: -1;
  }

  .shell-soft-ops [data-stat="disks"] {
    display: contents;
  }

  .shell-soft-ops .soft-ops-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--so-line);
  }

  .shell-soft-ops .soft-ops-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .shell-soft-ops .app-charts {
    columns: 1;
  }
}

/* —— Management in the Soft Ops shell —— */
.shell-admin .soft-ops-brand {
  color: inherit;
  text-decoration: none;
}

.shell-admin .soft-ops-pills button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.shell-admin .soft-ops-pill-n {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.6;
}

.shell-admin .section-note {
  margin: 0 0 1rem;
  max-width: 60rem;
  color: var(--so-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.shell-admin .admin-save-status {
  margin: 0 0 0.85rem;
}

.shell-admin .admin-save-status-ok {
  color: var(--accent);
}

.shell-admin .admin-table-wrap {
  margin: 0;
  padding: 0;
}

.shell-admin .admin-mgmt-table th,
.shell-admin .admin-mgmt-table td {
  border-bottom-color: var(--so-line);
  vertical-align: middle;
}

.shell-admin .admin-mgmt-table th {
  color: var(--so-muted);
  font-weight: 600;
}

.shell-admin .admin-mgmt-table tbody tr:hover {
  background: var(--so-hover);
}

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

.shell-admin .admin-mgmt-table .admin-col-host {
  width: 30%;
}

.shell-admin .admin-mgmt-table .admin-col-type {
  width: 30%;
}

.shell-admin .admin-mgmt-table .admin-col-users {
  width: 13%;
}

.shell-admin .admin-mgmt-table .admin-col-access {
  width: 16%;
}

.shell-admin .admin-mgmt-table .admin-col-archive-action {
  width: 11%;
  text-align: right;
}

.shell-admin .admin-host-with-avatar {
  align-items: center;
}

.shell-admin .admin-host-with-avatar .host-avatar {
  width: 2.6rem;
  height: 2.6rem;
  flex-basis: 2.6rem;
}

.shell-admin .admin-host-with-avatar .host-avatar svg,
.shell-admin .admin-host-with-avatar .host-avatar-photo img {
  border-radius: 0.7rem;
  box-shadow: none;
}

.shell-admin .admin-vis-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--so-ink);
}

.shell-admin .admin-inline-chip {
  color: var(--so-muted);
  font-size: 0.65rem;
}

.shell-admin .admin-host-desc {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--so-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shell-admin .db-select {
  height: 2.15rem;
  padding: 0 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--so-pill-border);
  background: var(--so-pill);
  color: var(--so-ink);
  font-size: 0.8rem;
}

.shell-admin .btn-small {
  border-radius: 999px;
  min-height: 2rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
}

.shell-soft-ops .admin-tabs,
.shell-soft-ops .admin-list-tabs,
.shell-soft-ops .db-data-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
}

.shell-soft-ops .admin-tab,
.shell-soft-ops .admin-list-tab {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.15rem;
  min-height: 2.15rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--so-pill-border);
  background: var(--so-pill);
  color: var(--so-muted);
  font: 600 13px var(--font-body);
  text-decoration: none;
}

.shell-soft-ops .admin-tab:hover,
.shell-soft-ops .admin-list-tab:hover,
.shell-soft-ops a.admin-tab:visited,
.shell-soft-ops a.admin-tab:visited:hover {
  color: var(--so-ink);
  background: var(--so-hover);
}

.shell-soft-ops .admin-tab.is-active,
.shell-soft-ops .admin-list-tab.is-active,
.shell-soft-ops .db-data-filter .btn.is-active {
  background: var(--so-pill-active-bg);
  border-color: var(--so-pill-active-bg);
  color: var(--so-pill-active-text);
}

.shell-soft-ops .panel {
  background: var(--so-paper);
  border: 1px solid color-mix(in srgb, var(--so-line) 50%, transparent);
  border-radius: 24px;
  box-shadow: var(--so-shadow);
  backdrop-filter: none;
}

.shell-soft-ops .lede,
.shell-soft-ops .section-note {
  color: var(--so-muted);
}

.shell-soft-ops .lede {
  max-width: 62rem;
}

.shell-soft-ops .panel h2,
.shell-soft-ops .panel-head h2 {
  color: var(--so-ink);
}

.admin-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.admin-type-chip {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.admin-type-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.admin-type-chip span {
  display: inline-flex;
  align-items: center;
  height: 1.75rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--so-pill-border, var(--line));
  background: var(--so-pill, transparent);
  color: var(--so-muted, var(--muted));
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.admin-type-chip:hover span {
  color: var(--so-ink, var(--ink));
}

.admin-type-chip input:checked + span {
  background: var(--so-pill-active-bg, color-mix(in srgb, var(--accent) 18%, transparent));
  border-color: var(--so-pill-active-bg, var(--accent));
  color: var(--so-pill-active-text, var(--accent));
}

.admin-type-chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (max-width: 820px) {
  .shell-admin .admin-mgmt-table tr {
    border-color: var(--so-line);
    background: var(--so-paper);
  }

  .shell-admin .admin-mgmt-table td.admin-col-type::before {
    content: "Keywords";
  }

.shell-admin .admin-keywords-panel {
  margin-bottom: 1rem;
}

.shell-admin .admin-keywords-list {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.shell-admin .admin-keyword-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.55rem;
  align-items: center;
}

.shell-admin .admin-keyword-row input[type="text"] {
  width: 100%;
  height: 2.25rem;
  border-radius: 10px;
  border: 1px solid var(--so-pill-border);
  background: var(--so-pill);
  color: var(--so-ink);
  padding: 0 0.75rem;
  font: 600 0.88rem var(--font-body);
}

.shell-admin .admin-keyword-id {
  font-size: 11px;
  color: var(--so-muted);
  font-family: var(--font-mono, ui-monospace, monospace);
  min-width: 6rem;
}

.shell-admin .admin-keyword-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.35rem;
}

.shell-admin .admin-keyword-add input[type="text"] {
  flex: 1 1 12rem;
  height: 2.25rem;
  border-radius: 10px;
  border: 1px solid var(--so-pill-border);
  background: var(--so-pill);
  color: var(--so-ink);
  padding: 0 0.75rem;
  font: 600 0.88rem var(--font-body);
}

.shell-admin .soft-ops-card-head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

  .shell-admin .admin-mgmt-table .admin-col-archive-action {
    text-align: left;
  }
}

/* —— Soft Ops signed-in user card + dropdown (sidebar, under the logo) —— */
.shell-soft-ops .so-user {
  --so-paper: #0a0a0b;
  --so-ink: #f4f4f5;
  --so-muted: #a1a1aa;
  --so-line: #27272a;
  --so-hover: #1c1c1f;
  --so-pill-border: #3f3f46;
  --so-pill-active-bg: rgba(61, 214, 140, 0.18);
  --so-pill-active-text: #7dffb3;
  --so-public: #3dd68c;
  --so-avatar-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  --so-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  position: relative;
  margin: -0.35rem 0 -0.2rem;
  color: var(--so-ink);
  color-scheme: dark;
}

.shell-soft-ops .so-user-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid var(--so-line);
  border-radius: 14px;
  background: var(--so-paper);
  box-shadow: var(--so-avatar-shadow);
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.shell-soft-ops .so-user-card::-webkit-details-marker {
  display: none;
}

.shell-soft-ops .so-user-card:hover,
.shell-soft-ops .so-user[open] .so-user-card,
.shell-soft-ops .so-user.is-current .so-user-card {
  border-color: var(--so-pill-border);
  box-shadow: var(--so-shadow);
}

.shell-soft-ops .so-user-card:focus-visible {
  outline: 2px solid var(--so-pill-active-text);
  outline-offset: 2px;
}

.shell-soft-ops .so-user-avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.shell-soft-ops .so-user-avatar-lg {
  width: 42px;
  height: 42px;
  font-size: 15px;
}

.shell-soft-ops .so-user-avatar {
  overflow: hidden;
  background: #5b57e0;
  box-shadow: 0 0 0 2px var(--so-paper, #fff), 0 2px 8px rgba(17, 24, 39, 0.18);
}

.shell-soft-ops .so-user-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.shell-soft-ops .so-user-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.shell-soft-ops .so-user-text strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-soft-ops .so-user-text span {
  font-size: 11px;
  color: var(--so-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-soft-ops .so-user-chevron {
  flex: 0 0 auto;
  color: var(--so-muted);
  transition: transform 0.15s ease;
}

.shell-soft-ops .so-user[open] .so-user-chevron {
  transform: rotate(180deg);
}

.shell-soft-ops .so-user-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 248px);
  padding: 0.4rem;
  border: 1px solid var(--so-line);
  border-radius: 16px;
  background: var(--so-paper);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  animation: so-user-pop 0.14s ease-out;
}

@keyframes so-user-pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.shell-soft-ops .so-user-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.55rem 0.7rem;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid var(--so-line);
}

.shell-soft-ops .so-user-head > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.shell-soft-ops .so-user-head strong {
  font-size: 14px;
}

.shell-soft-ops .so-user-head span {
  font-size: 12px;
  color: var(--so-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-soft-ops .so-user-role {
  align-self: flex-start;
  margin-top: 0.3rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--so-pill-active-bg);
  color: var(--so-pill-active-text);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
}

.shell-soft-ops .so-user-menu a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--so-ink);
  text-decoration: none;
}

.shell-soft-ops .so-user-menu a:hover,
.shell-soft-ops .so-user-menu a:focus-visible {
  background: var(--so-hover);
  outline: none;
}

.shell-soft-ops .so-user-menu a > svg {
  flex: 0 0 16px;
  color: var(--so-muted);
}

.shell-soft-ops .so-user-item-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.shell-soft-ops .so-user-item-text small {
  font-size: 11px;
  font-weight: 500;
  color: var(--so-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-soft-ops .so-user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--so-line);
}

.shell-soft-ops .so-user-dot.is-on {
  background: var(--so-public);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--so-public) 20%, transparent);
}

.shell-soft-ops .so-user-menu hr {
  margin: 0.3rem 0.2rem;
  border: 0;
  border-top: 1px solid var(--so-line);
}

.shell-soft-ops .so-user-menu a.so-user-signout,
.shell-soft-ops .so-user-menu a.so-user-signout svg {
  color: #f87171;
}

/* —— Soft Ops login (same tokens as the Apps hub) —— */
.shell-soft-ops.shell-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(60rem 30rem at 50% -10%, color-mix(in srgb, var(--so-public) 9%, transparent), transparent 70%),
    var(--so-bg);
}

.shell-soft-ops .soft-ops-login {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.shell-soft-ops .soft-ops-login-brand {
  color: inherit;
  text-decoration: none;
}

.shell-soft-ops .soft-ops-login-brand .soft-ops-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 17px;
  box-shadow: var(--so-avatar-shadow);
}

.shell-soft-ops .soft-ops-login-brand strong {
  font-size: 1.2rem;
}

.shell-soft-ops .soft-ops-login-dock {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
}

.shell-soft-ops .soft-ops-login-dock li {
  width: 44px;
  height: 44px;
}

.shell-soft-ops .soft-ops-login-dock li:nth-child(odd) {
  transform: translateY(4px);
}

.shell-soft-ops .soft-ops-login-dock img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: var(--so-avatar-shadow);
}

.shell-soft-ops .soft-ops-login-card {
  width: 100%;
  padding: 1.6rem 1.6rem 1.7rem;
}

.shell-soft-ops .soft-ops-login-card .soft-ops-card-head {
  margin-bottom: 0.35rem;
}

.shell-soft-ops .soft-ops-login-lede {
  margin: 0 0 1.25rem;
  color: var(--so-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.shell-soft-ops .soft-ops-login-error {
  margin: 0 0 1.1rem;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  background: color-mix(in srgb, #ef4444 12%, transparent);
  color: #b91c1c;
  font-size: 0.88rem;
  line-height: 1.45;
}

html[data-theme="dark"] .shell-soft-ops .soft-ops-login-error {
  color: #fca5a5;
}

.shell-soft-ops .soft-ops-login-form label {
  display: block;
  margin: 0 0 0.4rem 0.2rem;
  color: var(--so-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shell-soft-ops .soft-ops-login-form input[type="email"],
.shell-soft-ops .soft-ops-login-form input[type="password"] {
  width: 100%;
  height: 2.9rem;
  margin: 0 0 1rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--so-pill-border);
  background: var(--so-bg);
  color: var(--so-ink);
  font: 500 15px var(--font-body);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.shell-soft-ops .soft-ops-login-form input::placeholder {
  color: color-mix(in srgb, var(--so-muted) 70%, transparent);
}

.shell-soft-ops .soft-ops-login-form input[type="email"]:focus,
.shell-soft-ops .soft-ops-login-form input[type="password"]:focus {
  background: var(--so-paper);
  border-color: var(--so-public);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--so-public) 16%, transparent);
}

.shell-soft-ops .soft-ops-login-form label.remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.15rem 0 1.25rem 0.2rem;
  color: var(--so-ink);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  user-select: none;
}

.shell-soft-ops .soft-ops-login-form label.remember input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--so-public);
  cursor: pointer;
}

.shell-soft-ops .soft-ops-login-submit {
  appearance: none;
  width: 100%;
  height: 2.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--so-ink);
  color: var(--so-paper);
  font: 700 15px var(--font-body);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.shell-soft-ops .soft-ops-login-submit:hover {
  opacity: 0.88;
}

.shell-soft-ops .soft-ops-login-submit:active {
  transform: translateY(1px);
}

.shell-soft-ops .soft-ops-login-foot {
  margin: 0;
  color: var(--so-muted);
  font-size: 12px;
}

.shell-soft-ops .soft-ops-login-app {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.shell-soft-ops .soft-ops-login-install {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.9rem;
  border-radius: 999px;
  border: 1px solid var(--so-pill-border);
  background: var(--so-bg);
  color: var(--so-ink);
  font: 700 15px var(--font-body);
  text-decoration: none;
}

.shell-soft-ops .soft-ops-login-install:hover {
  border-color: var(--so-public);
}

@media (max-width: 420px) {
  .shell-soft-ops .soft-ops-login-dock li:nth-child(n + 6) {
    display: none;
  }
}
