:root {
  color-scheme: dark;
  --background: #050b14;
  --surface: rgba(16, 27, 44, 0.76);
  --surface-strong: rgba(22, 34, 54, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --border: rgba(255, 255, 255, 0.11);
  --border-hot: rgba(118, 186, 255, 0.38);
  --text: #edf5ff;
  --muted: #94a4bb;
  --faint: #69778c;
  --green: #51e39c;
  --yellow: #ffc96b;
  --red: #ff6f7e;
  --blue: #76baff;
  --purple: #a38bff;
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(43, 132, 214, 0.18), transparent 30%),
    radial-gradient(circle at 92% 12%, rgba(116, 75, 205, 0.15), transparent 29%),
    radial-gradient(circle at 48% 100%, rgba(20, 163, 139, 0.09), transparent 34%),
    linear-gradient(145deg, #050b14 0%, #0b1423 52%, #060b14 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.glass,
.panel {
  border: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 42%),
    var(--surface);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 142px;
  padding: 24px 28px;
  border-radius: 28px;
}

.identity,
.hero-actions,
.overall,
.console-head,
.panel-heading,
.metric-strip,
.stat-cluster,
.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
}

.identity {
  gap: 18px;
}

.cloud-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border: 1px solid rgba(133, 199, 255, 0.32);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(99, 181, 255, 0.30), rgba(86, 96, 219, 0.22));
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 14px 32px rgba(18, 95, 178, 0.22);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 7px;
  font-size: 3.6rem;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 5px;
  font-size: 0.98rem;
}

.subtitle,
.subtle,
.loading,
.date,
.metric-chip span,
.metric-chip small,
.service-card p,
.compact-row small,
.cell-sub,
.activity-row span,
.issue span {
  color: var(--muted);
}

.hero-side {
  min-width: 250px;
  text-align: right;
}

.clock {
  font-size: 1.85rem;
  font-weight: 780;
}

.date {
  margin-top: 3px;
  font-size: 0.88rem;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  margin-top: 10px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.language-switch button {
  min-width: 42px;
  min-height: 28px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.language-switch button.is-active {
  color: var(--text);
  background: rgba(118, 186, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(118, 186, 255, 0.28);
}

.hero-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-actions a,
.hero-actions button,
.quick-links a,
.text-link,
.mini-button,
.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.hero-actions a:hover,
.hero-actions button:hover,
.quick-links a:hover,
.text-link:hover,
.mini-button:hover,
.button:hover,
.icon-button:hover {
  border-color: var(--border-hot);
  background: rgba(42, 60, 88, 0.75);
}

.mobile-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: none;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 10px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(7, 14, 25, 0.88);
  backdrop-filter: blur(16px);
  scrollbar-width: none;
}

.mobile-tabs::-webkit-scrollbar,
.manual-nav::-webkit-scrollbar {
  display: none;
}

.mobile-tabs a,
.mobile-tabs button {
  min-height: 34px;
  padding: 8px 4px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  font-weight: 780;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.8fr);
  gap: 12px;
  margin-top: 12px;
}

.summary-section {
  margin-top: 12px;
}

.panel {
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius);
}

.panel-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-heading.tight {
  margin-bottom: 12px;
}

.console-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.overall {
  gap: 12px;
}

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

.overall strong {
  font-size: 1.35rem;
}

.status-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 5px rgba(112, 126, 145, 0.12);
}

.status-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(81, 227, 156, 0.11), 0 0 16px rgba(81, 227, 156, 0.45);
}

.status-dot.warning {
  background: var(--yellow);
  box-shadow: 0 0 0 5px rgba(255, 201, 107, 0.11), 0 0 16px rgba(255, 201, 107, 0.38);
}

.status-dot.error {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(255, 111, 126, 0.11), 0 0 16px rgba(255, 111, 126, 0.4);
}

.metric-strip {
  gap: 10px;
}

.metric-chip {
  flex: 1;
  min-width: 0;
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.03);
}

.metric-chip span,
.metric-chip strong,
.metric-chip small {
  display: block;
}

.metric-chip strong {
  margin-top: 8px;
  font-size: 1.38rem;
  white-space: nowrap;
}

.metric-chip small {
  min-height: 20px;
  margin-top: 2px;
  font-size: 0.74rem;
}

.progress {
  height: 7px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #45aaf5, #51e39c);
  box-shadow: 0 0 14px rgba(82, 139, 243, 0.45);
  transition: width 420ms ease;
}

.mode-pill,
.tag,
.health {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.74rem;
  white-space: nowrap;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.quick-links a {
  min-height: 44px;
}

.launchpad-panel {
  margin-top: 12px;
}

.service-console {
  --parallax-x: 0;
  --parallax-y: 0;
  position: relative;
  isolation: isolate;
  margin-top: 12px;
  overflow: hidden;
}

.service-console > :not(.service-depth-grid) {
  position: relative;
  z-index: 1;
}

.service-depth-grid {
  position: absolute;
  z-index: 0;
  inset: -12%;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(118, 186, 255, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 186, 255, 0.13) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent 82%);
  transform:
    perspective(650px)
    rotateX(59deg)
    translate3d(
      calc(var(--parallax-x) * -10px),
      calc(-18% + var(--parallax-y) * -7px),
      0
    );
  transform-origin: 50% 15%;
  transition: transform 160ms ease-out;
  pointer-events: none;
}

.service-backbone {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) 72px minmax(0, 2fr);
  align-items: center;
  min-height: 142px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nas-backbone-core {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 14px 16px;
  border-left: 3px solid rgba(118, 186, 255, 0.72);
  background: linear-gradient(90deg, rgba(118, 186, 255, 0.11), transparent);
  transform: translate3d(
    calc(var(--parallax-x) * 3px),
    calc(var(--parallax-y) * 2px),
    0
  );
  transition: transform 160ms ease-out;
}

.nas-backbone-core small,
.nas-backbone-core strong,
.nas-backbone-core span {
  display: block;
}

.nas-backbone-core small {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nas-backbone-core strong {
  margin-top: 4px;
  font-size: 1.18rem;
}

.nas-backbone-core div > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.backbone-line {
  position: relative;
  height: 2px;
  background: rgba(118, 186, 255, 0.38);
  box-shadow: 0 0 16px rgba(118, 186, 255, 0.24);
}

.backbone-line::after {
  position: absolute;
  top: 50%;
  right: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 14px rgba(118, 186, 255, 0.7);
  content: "";
  transform: translateY(-50%);
}

.service-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.service-switch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 62px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: rgba(7, 17, 29, 0.64);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.service-switch:hover,
.service-switch.is-active {
  border-color: rgba(118, 186, 255, 0.48);
  background: rgba(27, 48, 72, 0.78);
}

.service-switch:hover {
  transform: translateY(-1px);
}

.service-switch.is-active {
  box-shadow: inset 0 -2px 0 var(--blue), 0 10px 28px rgba(0, 0, 0, 0.18);
}

.service-switch strong,
.service-switch small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-switch strong {
  font-size: 0.78rem;
}

.service-switch small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.service-inspector {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 26px;
  padding-top: 18px;
}

.service-inspector h3 {
  margin-bottom: 7px;
  font-size: 1.34rem;
}

.service-inspector-copy {
  min-width: 0;
}

.service-address {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  overflow: hidden;
  color: var(--blue);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-components {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.service-component {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 170px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.028);
}

.service-component strong,
.service-component small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-component strong {
  font-size: 0.74rem;
}

.service-component small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.66rem;
}

.service-component.ok {
  border-color: rgba(81, 227, 156, 0.25);
}

.service-component.warning {
  border-color: rgba(255, 201, 107, 0.32);
}

.service-component.error {
  border-color: rgba(255, 111, 126, 0.4);
}

.service-inspector-side {
  align-self: end;
}

.service-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.service-metrics span {
  min-width: 0;
  padding: 12px 10px;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

.service-metrics span + span {
  border-left: 1px solid var(--border);
}

.service-metrics strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 1rem;
}

.inspector-actions,
.maintenance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.maintenance-panel {
  align-content: start;
}

.maintenance-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.maintenance-metrics > div {
  min-width: 0;
  padding: 14px 12px;
}

.maintenance-metrics > div + div {
  border-left: 1px solid var(--border);
}

.maintenance-metrics strong,
.maintenance-metrics span {
  display: block;
}

.maintenance-metrics strong {
  font-size: 1.5rem;
}

.maintenance-metrics span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.maintenance-copy {
  min-height: 56px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.update-steps {
  display: grid;
  gap: 7px;
}

.update-steps span {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  min-height: 34px;
  color: var(--muted);
  font-size: 0.77rem;
}

.update-steps b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(118, 186, 255, 0.35);
  border-radius: 50%;
  color: var(--blue);
  font-size: 0.68rem;
}

.launch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.operations-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}

.issue-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.issue,
.activity-row,
.activity-empty {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.032);
}

.issue {
  min-height: 70px;
}

.issue strong,
.issue span {
  display: block;
}

.issue span {
  margin-top: 4px;
  font-size: 0.8rem;
}

.issue.ok {
  border-color: rgba(81, 227, 156, 0.28);
}

.issue.warning {
  border-color: rgba(255, 201, 107, 0.34);
}

.issue.error {
  border-color: rgba(255, 111, 126, 0.42);
}

.activity-list.compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 9px;
}

.activity-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 66px;
}

.activity-row > div:first-child {
  min-width: 0;
}

.activity-row strong,
.activity-row span,
.activity-empty strong,
.activity-empty span {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.activity-numbers {
  min-width: 88px;
  flex: 0 0 88px;
  color: var(--muted);
  font-size: 0.74rem;
  text-align: right;
}

.docker-panel,
.tailnet-section {
  margin-top: 12px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.service-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(118, 186, 255, 0.055), transparent 60%),
    rgba(255, 255, 255, 0.028);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hot);
  background:
    linear-gradient(145deg, rgba(81, 227, 156, 0.06), transparent 60%),
    rgba(255, 255, 255, 0.045);
}

.service-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.service-card p {
  margin-bottom: 0;
  font-size: 0.82rem;
}

.service-card h3,
.service-card p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-open {
  color: var(--muted);
  font-size: 0.76rem;
}

.orbit-map {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(118, 186, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at center, rgba(81, 227, 156, 0.11), transparent 23%),
    radial-gradient(circle at center, rgba(118, 186, 255, 0.11), transparent 58%),
    rgba(3, 10, 17, 0.24);
}

.orbit-ring {
  position: absolute;
  width: min(76%, 330px);
  aspect-ratio: 1;
  border: 1px solid rgba(118, 186, 255, 0.32);
  border-radius: 50%;
  box-shadow: inset 0 0 34px rgba(76, 146, 230, 0.10), 0 0 38px rgba(76, 146, 230, 0.08);
}

.orbit-center,
.orbit-node {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
}

.orbit-center {
  width: 160px;
  height: 160px;
  padding: 16px;
  border: 1px solid rgba(118, 186, 255, 0.55);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(118, 186, 255, 0.18), rgba(81, 227, 156, 0.09)),
    rgba(7, 16, 27, 0.86);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.orbit-node {
  width: 124px;
  min-height: 92px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(11, 23, 38, 0.86);
}

.orbit-node.docker {
  top: 18px;
}

.orbit-node.tailnet {
  right: 16px;
  bottom: 34px;
}

.orbit-node.storage {
  left: 16px;
  bottom: 34px;
}

.orbit-services {
  position: absolute;
  inset: 0;
}

.orbit-service {
  --orbit-radius: min(38%, 166px);
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "dot name"
    "dot state";
  align-items: center;
  column-gap: 7px;
  width: 118px;
  min-height: 56px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(8, 18, 31, 0.88);
  text-align: left;
  text-decoration: none;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--orbit-radius))) rotate(calc(-1 * var(--angle)));
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.orbit-service:hover {
  border-color: var(--border-hot);
  background: rgba(20, 37, 58, 0.96);
}

.orbit-service .status-dot {
  grid-area: dot;
}

.orbit-service strong {
  grid-area: name;
  overflow: hidden;
  font-size: 0.76rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orbit-service small {
  grid-area: state;
  color: var(--muted);
  font-size: 0.68rem;
}

.orbit-service.online {
  border-color: rgba(81, 227, 156, 0.28);
}

.orbit-service.warning {
  border-color: rgba(255, 201, 107, 0.38);
}

.orbit-service.offline {
  border-color: rgba(255, 111, 126, 0.46);
}

.orbit-center span,
.orbit-node span {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.orbit-center strong,
.orbit-node strong,
.orbit-center small,
.orbit-node small {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(rgba(118, 186, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 186, 255, 0.055) 1px, transparent 1px),
    #07111d;
  background-size: 42px 42px;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(380px, 1.2fr);
  width: min(940px, 100%);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(11, 23, 38, 0.95);
  box-shadow: var(--shadow);
}

.login-card,
.login-guide {
  min-width: 0;
  padding: 30px;
}

.login-card {
  border-right: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(118, 186, 255, 0.1), transparent 48%),
    rgba(255, 255, 255, 0.025);
}

.login-card .brand-mark {
  margin-bottom: 24px;
}

.login-card h1 {
  margin-bottom: 10px;
  font-size: 2.15rem;
  line-height: 1.05;
}

.login-card form {
  margin-top: 24px;
}

.login-card label {
  margin: 0 0 8px;
}

.token-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.token-field input {
  min-height: 48px;
  border-radius: 8px 0 0 8px;
}

.token-toggle {
  min-width: 84px;
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.token-toggle:hover {
  color: var(--text);
  background: rgba(42, 60, 88, 0.75);
}

.login-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border-color: rgba(118, 186, 255, 0.46);
  background: rgba(118, 186, 255, 0.13);
}

.login-guide h2 {
  margin-bottom: 18px;
}

.login-steps {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.login-steps li > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(118, 186, 255, 0.35);
  border-radius: 50%;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
}

.login-steps p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.token-location {
  display: grid;
  gap: 7px;
  margin-top: 20px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.token-location span {
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.token-location code,
.token-location strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.5;
}

.login-recovery {
  margin-top: 17px;
  color: var(--muted);
  font-size: 0.8rem;
}

.login-recovery summary {
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
}

.login-recovery p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.login-recovery code {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 42%),
    var(--surface);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid rgba(133, 199, 255, 0.32);
  border-radius: 18px;
  background: rgba(118, 186, 255, 0.14);
  font-weight: 850;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topbar h1 {
  margin-bottom: 6px;
  font-size: 2rem;
  line-height: 1.05;
}

.manual-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(11, 23, 38, 0.76);
  box-shadow: var(--shadow);
}

.manual-nav {
  position: sticky;
  top: 16px;
  align-self: start;
  display: grid;
  gap: 4px;
  max-height: calc(100vh - 32px);
  padding: 24px 18px;
  overflow: auto;
  border-right: 1px solid var(--border);
}

.manual-nav a {
  min-height: 38px;
  padding: 9px 10px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.manual-nav a:hover {
  border-left-color: var(--blue);
  color: var(--text);
  background: rgba(118, 186, 255, 0.07);
}

.manual-content {
  min-width: 0;
}

.manual-section {
  padding: 30px 34px;
  scroll-margin-top: 18px;
}

.manual-section + .manual-section {
  border-top: 1px solid var(--border);
}

.manual-section h2 {
  margin-bottom: 10px;
  font-size: 1.65rem;
}

.manual-section h3 {
  margin-top: 24px;
  margin-bottom: 7px;
  font-size: 1rem;
}

.manual-section p {
  color: var(--muted);
  line-height: 1.58;
}

.manual-section a {
  color: #9acbff;
}

.manual-lead {
  max-width: 820px;
  font-size: 0.98rem;
}

.manual-steps {
  display: grid;
  gap: 0;
  margin: 20px 0;
  padding: 0;
  list-style: none;
  counter-reset: manual-step;
}

.manual-steps li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  min-height: 58px;
  padding: 13px 10px 13px 42px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  counter-increment: manual-step;
}

.manual-steps li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.manual-steps li::before {
  position: absolute;
  top: 13px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(118, 186, 255, 0.36);
  border-radius: 50%;
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 800;
  content: counter(manual-step);
}

.manual-steps strong,
.manual-steps span {
  min-width: 0;
}

.manual-steps span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.manual-steps.compact {
  max-width: 780px;
}

.manual-code,
.manual-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid rgba(118, 186, 255, 0.65);
  background: rgba(118, 186, 255, 0.055);
}

.manual-code span,
.manual-code code,
.manual-note strong,
.manual-note p {
  display: block;
}

.manual-code span {
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.manual-code code {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.8rem;
}

.manual-note p {
  margin: 5px 0 0;
}

.manual-note.warning {
  border-left-color: rgba(255, 201, 107, 0.72);
  background: rgba(255, 201, 107, 0.055);
}

.manual-command {
  max-width: 100%;
  margin: 16px 0;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #dceafb;
  background: rgba(0, 0, 0, 0.3);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.manual-link-grid,
.service-reference {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.manual-link-grid a,
.service-reference a {
  min-width: 0;
  min-height: 66px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.028);
  text-decoration: none;
}

.manual-link-grid a:hover,
.service-reference a:hover {
  border-color: var(--border-hot);
  background: rgba(255, 255, 255, 0.045);
}

.manual-link-grid strong,
.manual-link-grid span,
.service-reference strong,
.service-reference span {
  display: block;
  overflow-wrap: anywhere;
}

.manual-link-grid span,
.service-reference span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.75rem;
}

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

.status-legend > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "dot title"
    "dot copy";
  align-items: start;
  gap: 3px 11px;
  min-height: 84px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.028);
}

.status-legend .status-dot {
  grid-area: dot;
  margin-top: 3px;
}

.status-legend strong {
  grid-area: title;
}

.status-legend p {
  grid-area: copy;
  margin: 2px 0 0;
  font-size: 0.78rem;
}

.source-links {
  margin-top: 18px;
  font-size: 0.78rem;
}

.manual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.reference-list {
  margin: 16px 0 0;
}

.reference-list > div {
  display: grid;
  grid-template-columns: minmax(190px, 0.38fr) minmax(0, 1fr);
  gap: 16px;
  padding: 11px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.reference-list > div:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.reference-list dt {
  color: var(--muted);
}

.reference-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 700;
}

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

.info-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.info-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.028);
}

.info-row span {
  color: var(--muted);
}

.info-row strong {
  overflow-wrap: anywhere;
}

.anna-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.status-card {
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.03);
}

.status-card strong,
.status-card span,
.status-card small {
  display: block;
}

.status-card strong {
  margin-top: 10px;
}

.status-card small {
  margin-top: 5px;
  color: var(--muted);
}

.orbit-center strong {
  margin-top: 5px;
  font-size: 1.15rem;
}

.orbit-node strong {
  margin-top: 5px;
  font-size: 1.05rem;
}

.orbit-center small,
.orbit-node small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.docker-heading {
  align-items: flex-start;
}

.stat-cluster {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.stat-cluster span {
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.8rem;
}

.stat-cluster strong {
  color: var(--text);
}

.container-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.container-toolbar a {
  color: var(--blue);
  text-decoration: none;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 15px;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

td {
  font-size: 0.88rem;
}

td strong,
.cell-sub {
  display: block;
}

.cell-sub {
  max-width: 280px;
  margin-top: 2px;
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health.ok {
  border-color: rgba(81, 227, 156, 0.36);
  color: #c3f7d2;
}

.health.warning {
  border-color: rgba(255, 201, 107, 0.38);
  color: #ffe2a4;
}

.health.error {
  border-color: rgba(255, 111, 126, 0.44);
  color: #ffd2d7;
}

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 210px;
}

.mini-button {
  min-height: 30px;
  padding: 0 9px;
}

.mini-button.danger,
.button.danger {
  border-color: rgba(255, 111, 126, 0.48);
  color: #ffd4da;
  background: rgba(255, 111, 126, 0.13);
}

.mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.container-cards {
  display: none;
  gap: 10px;
}

.container-card {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.03);
}

.container-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.container-card-head strong,
.container-card-head span {
  display: block;
}

.container-card-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.container-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 10px 0;
}

.container-mini-stats span {
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.026);
  font-size: 0.76rem;
}

.container-mini-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
}

.compact-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.compact-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.028);
  text-decoration: none;
}

a.compact-row:hover {
  border-color: var(--border-hot);
  background: rgba(255, 255, 255, 0.045);
}

.compact-row strong,
.compact-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-row > span:last-child {
  color: var(--muted);
  font-size: 0.74rem;
}

.direct-links {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.direct-links a {
  min-height: 62px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
}

.direct-links strong,
.direct-links span {
  display: block;
}

.direct-links span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 16px;
  padding: 0 5px;
  color: var(--muted);
  font-size: 0.76rem;
}

.action-dialog {
  width: min(520px, calc(100% - 28px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text);
  background: #111b2a;
  box-shadow: var(--shadow);
}

.action-dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
}

.action-dialog form {
  padding: 20px;
}

.dialog-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
}

label {
  display: grid;
  gap: 7px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 0.84rem;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.check-row input {
  width: 16px;
  height: 16px;
}

.message {
  min-height: 24px;
  margin-top: 12px;
  color: var(--yellow);
  font-size: 0.84rem;
}

.action-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(118, 186, 255, 0.24);
  border-radius: 13px;
  background: rgba(118, 186, 255, 0.06);
}

.action-target span {
  color: var(--muted);
  font-size: 0.78rem;
}

.action-target strong {
  overflow-wrap: anywhere;
  text-align: right;
}

.is-hidden {
  display: none;
}

.dialog-actions {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.log-dialog {
  width: min(860px, calc(100% - 28px));
}

.log-output {
  min-height: 330px;
  max-height: 62vh;
  margin: 16px 0 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: #d9e7f4;
  background: rgba(0, 0, 0, 0.34);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 1180px) {
  .control-grid {
    grid-template-columns: 1fr;
  }

  .service-backbone {
    grid-template-columns: minmax(210px, 0.55fr) 54px minmax(0, 1.45fr);
  }

  .service-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-inspector {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .direct-links {
    grid-template-columns: repeat(3, 1fr);
  }

  .issue-list,
  .activity-list.compact,
  .anna-status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .login-body {
    display: block;
    padding: 9px;
  }

  .login-layout {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .login-card,
  .login-guide {
    padding: 22px 18px;
  }

  .login-card {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .login-card h1 {
    font-size: 1.9rem;
  }

  .shell {
    width: min(100% - 18px, 1480px);
    padding-top: 9px;
  }

  .app-shell {
    width: min(100% - 18px, 1120px);
    padding-top: 9px;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 20px;
    border-radius: 22px;
  }

  .identity {
    align-items: flex-start;
  }

  .cloud-mark {
    width: 54px;
    height: 54px;
    border-radius: 17px;
  }

  .hero-side {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .hero-actions {
    display: none;
  }

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .mobile-tabs {
    display: flex;
    overflow-x: auto;
  }

  #summary,
  #services,
  #activity,
  #docker,
  #tailnet {
    scroll-margin-top: 58px;
  }

  .mobile-tabs a,
  .mobile-tabs button {
    flex: 0 0 76px;
    font-size: 0.66rem;
  }

  .metric-strip,
  .service-grid,
  .direct-links,
  .issue-list,
  .activity-list.compact,
  .quick-links {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    display: grid;
  }

  .metric-chip {
    min-height: 74px;
  }

  .metric-chip strong {
    font-size: 1.25rem;
  }

  .panel {
    padding: 16px;
  }

  .panel-heading,
  .docker-heading,
  .console-head,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .launch-actions {
    justify-content: flex-start;
  }

  .service-backbone {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 6px;
  }

  .backbone-line {
    display: none;
  }

  .nas-backbone-core {
    min-height: 72px;
  }

  .service-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-inspector {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .service-inspector-side {
    align-self: auto;
  }

  .service-components {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-component {
    min-width: 0;
  }

  .service-depth-grid {
    transform: perspective(650px) rotateX(61deg) translate3d(0, -18%, 0);
  }

  .maintenance-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orbit-map {
    min-height: 390px;
  }

  .orbit-ring {
    width: min(76%, 250px);
  }

  .orbit-center {
    width: 132px;
    height: 132px;
    padding: 13px;
  }

  .orbit-node {
    width: 104px;
    min-height: 82px;
    padding: 9px;
  }

  .orbit-node.docker {
    top: 12px;
  }

  .orbit-node.tailnet {
    right: 8px;
    bottom: 20px;
  }

  .orbit-node.storage {
    left: 8px;
    bottom: 20px;
  }

  .orbit-service {
    --orbit-radius: min(38%, 144px);
    width: 96px;
    min-height: 52px;
    padding: 7px;
  }

  .orbit-service strong {
    font-size: 0.68rem;
  }

  .orbit-service small {
    font-size: 0.62rem;
  }

  .orbit-center strong,
  .orbit-node strong {
    font-size: 0.92rem;
  }

  .table-wrap {
    display: none;
  }

  .container-cards {
    display: grid;
  }

  .container-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions-cell {
    min-width: 0;
  }

  .topbar,
  .brand-block {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .manual-layout {
    grid-template-columns: 1fr;
  }

  .manual-nav {
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    max-height: none;
    padding: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    background: rgba(7, 14, 25, 0.94);
    backdrop-filter: blur(16px);
  }

  .manual-nav .eyebrow {
    display: none;
  }

  .manual-nav a {
    min-width: max-content;
    min-height: 34px;
    padding: 8px 10px;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .manual-nav a:hover {
    border-bottom-color: var(--blue);
    border-left-color: transparent;
  }

  .manual-section {
    padding: 24px 18px;
    scroll-margin-top: 58px;
  }

  .manual-section h2 {
    font-size: 1.4rem;
  }

  .manual-steps li,
  .reference-list > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .manual-link-grid,
  .service-reference,
  .status-legend {
    grid-template-columns: 1fr;
  }

  .grid-main,
  .anna-status-grid {
    grid-template-columns: 1fr;
  }

  .info-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .service-components {
    grid-template-columns: 1fr;
  }

  .mobile-tabs {
    overflow-x: auto;
  }

  .maintenance-metrics {
    grid-template-columns: 1fr;
  }

  .maintenance-metrics > div + div {
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

/* Duplicate review workspace */

.dedupe-shell {
  width: min(1320px, calc(100% - 28px));
}

.dedupe-shell [hidden],
.duplicate-dialog [hidden] {
  display: none !important;
}

.dedupe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px 22px;
  border-radius: 8px;
}

.dedupe-identity {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.cloud-mark.compact {
  width: 50px;
  height: 50px;
  border-radius: 8px;
}

.dedupe-header h1 {
  margin-bottom: 4px;
  font-size: 2rem;
  line-height: 1;
}

.dedupe-header .subtitle {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.dedupe-header-actions,
.dedupe-status-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.dedupe-status-actions select {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  background: rgba(6, 14, 25, 0.9);
}

.dedupe-status,
.dedupe-workspace {
  margin-top: 12px;
  padding: 20px;
  border-radius: 8px;
}

.dedupe-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.dedupe-metrics > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 15px;
  background: rgba(8, 17, 30, 0.94);
}

.dedupe-metrics span,
.dedupe-metrics small,
.duplicate-dialog-summary span {
  color: var(--muted);
  font-size: 0.76rem;
}

.dedupe-metrics strong {
  overflow: hidden;
  font-size: 1.35rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dedupe-safety {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(81, 227, 156, 0.24);
  border-radius: 8px;
  background: rgba(30, 111, 81, 0.12);
}

.dedupe-safety div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dedupe-safety span:not(.status-dot) {
  color: var(--muted);
  font-size: 0.8rem;
}

.dedupe-safety a {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 750;
}

.dedupe-safety-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.dedupe-safety-actions button {
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}

.dedupe-scan-progress {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(180px, 2fr);
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.dedupe-scan-progress[hidden] {
  display: none;
}

.dedupe-scan-progress > div:first-child {
  display: grid;
  gap: 2px;
}

.dedupe-scan-progress span {
  color: var(--muted);
  font-size: 0.75rem;
}

.dedupe-scan-progress .progress {
  margin: 0;
}

.dedupe-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 7px;
  scrollbar-width: thin;
}

.dedupe-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.dedupe-tabs button::after {
  content: attr(data-count);
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--faint);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.68rem;
}

.dedupe-tabs button.is-active {
  border-color: var(--border-hot);
  color: var(--text);
  background: rgba(74, 133, 197, 0.18);
}

.dedupe-tabs button.is-active::after {
  color: var(--blue);
  background: rgba(118, 186, 255, 0.12);
}

.dedupe-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(145px, 1fr));
  gap: 10px;
  margin-top: 9px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(4, 10, 19, 0.38);
}

.dedupe-toolbar label,
.duplicate-note {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.dedupe-toolbar input,
.dedupe-toolbar select,
.duplicate-note textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  color: var(--text);
  background: rgba(6, 14, 25, 0.9);
}

.dedupe-toolbar input:focus,
.dedupe-toolbar select:focus,
.duplicate-note textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(118, 186, 255, 0.12);
}

.dedupe-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 9px;
}

.dedupe-list-head > div:first-child {
  display: grid;
  gap: 2px;
}

.dedupe-list-head span {
  color: var(--muted);
  font-size: 0.78rem;
}

.dedupe-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dedupe-pagination .icon-button {
  width: 34px;
  padding: 0;
  font-size: 1.25rem;
}

.dedupe-pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.duplicate-list {
  display: grid;
  gap: 7px;
  min-height: 180px;
  transition: opacity 140ms ease;
}

.duplicate-list.is-loading {
  opacity: 0.55;
}

.duplicate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.duplicate-row:hover {
  border-color: rgba(118, 186, 255, 0.25);
  background: rgba(43, 67, 99, 0.22);
}

.duplicate-row.has-approved {
  border-color: rgba(81, 227, 156, 0.22);
}

.duplicate-row-main {
  min-width: 0;
}

.duplicate-badges,
.duplicate-file-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.duplicate-badges span,
.duplicate-file-badges span {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.66rem;
  font-weight: 700;
}

.duplicate-badges .risk-badge.low,
.duplicate-file-badges .recommended,
.duplicate-badges .decision-badge.approved,
.duplicate-badges .decision-badge.applied {
  border-color: rgba(81, 227, 156, 0.3);
  color: var(--green);
}

.duplicate-badges .risk-badge.medium {
  border-color: rgba(255, 201, 107, 0.28);
  color: var(--yellow);
}

.duplicate-badges .risk-badge.high,
.duplicate-badges .risk-badge.critical {
  border-color: rgba(255, 111, 126, 0.28);
  color: var(--red);
}

.duplicate-row-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.duplicate-row-title strong {
  font-size: 1rem;
}

.duplicate-row-title span,
.duplicate-row p,
.duplicate-row-side small {
  color: var(--muted);
  font-size: 0.76rem;
}

.duplicate-row p {
  margin: 8px 0 0;
}

.duplicate-names {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.duplicate-names span {
  max-width: min(360px, 100%);
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 4px;
  color: #c6d5e7;
  background: rgba(0, 0, 0, 0.19);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duplicate-row-side {
  display: grid;
  align-content: space-between;
  justify-items: end;
  gap: 14px;
  min-width: 122px;
}

.dedupe-empty {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 180px;
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.dedupe-empty.error {
  border-color: rgba(255, 111, 126, 0.3);
  color: var(--red);
}

.duplicate-dialog {
  width: min(980px, calc(100% - 24px));
  max-height: min(900px, calc(100vh - 32px));
}

.duplicate-dialog form {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.duplicate-dialog-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.duplicate-dialog-summary > div {
  display: grid;
  gap: 2px;
  padding: 10px;
  background: rgba(7, 15, 26, 0.95);
}

.dedupe-recommendation {
  margin-top: 12px;
  padding: 11px 12px;
  border-left: 3px solid var(--blue);
  border-radius: 0 6px 6px 0;
  background: rgba(56, 112, 172, 0.12);
}

.dedupe-recommendation p {
  margin: 3px 0;
  font-size: 0.84rem;
}

.dedupe-recommendation span {
  color: var(--muted);
  font-size: 0.74rem;
}

.duplicate-files {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.duplicate-file {
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.duplicate-file-head,
.duplicate-file-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.duplicate-file-head > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.duplicate-file-head strong {
  overflow-wrap: anywhere;
}

.duplicate-file-head span,
.duplicate-file-actions a {
  color: var(--muted);
  font-size: 0.72rem;
}

.duplicate-file code {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: #9fb3ca;
  font-size: 0.7rem;
}

.companion-note {
  margin: 7px 0 0;
  color: var(--yellow);
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.duplicate-file-actions {
  margin-top: 10px;
}

.file-choice {
  display: grid;
  grid-template-columns: repeat(3, 92px);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--border);
}

.file-choice button {
  min-height: 32px;
  border: 0;
  color: var(--muted);
  background: rgba(8, 17, 29, 0.96);
  cursor: pointer;
}

.file-choice button.is-active.keep {
  color: var(--green);
  background: rgba(34, 121, 86, 0.24);
}

.file-choice button.is-active.remove {
  color: var(--red);
  background: rgba(143, 49, 65, 0.24);
}

.file-choice button.is-active.later {
  color: var(--yellow);
  background: rgba(130, 94, 29, 0.22);
}

.duplicate-note {
  margin-top: 12px;
}

.duplicate-note textarea {
  min-height: 58px;
  resize: vertical;
}

.duplicate-dialog-actions {
  flex-wrap: wrap;
}

.button.primary {
  border-color: rgba(81, 227, 156, 0.38);
  color: #dffff0;
  background: rgba(38, 133, 93, 0.28);
}

.immich-dialog {
  width: min(660px, calc(100% - 24px));
}

.immich-dialog .token-field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.immich-dialog .token-field input,
.immich-apply input[type="text"] {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  color: var(--text);
  background: rgba(6, 14, 25, 0.9);
}

.immich-session-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.75rem;
}

.immich-session-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.immich-permissions,
.immich-apply {
  display: grid;
  gap: 7px;
  margin-top: 13px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.immich-permissions code {
  color: #aabbd0;
  font-size: 0.69rem;
  overflow-wrap: anywhere;
}

.immich-api-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}

.immich-api-actions button:disabled,
.immich-apply button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.immich-apply > div:first-child {
  display: grid;
  gap: 3px;
}

.immich-apply > div:first-child span,
.immich-apply label {
  color: var(--muted);
  font-size: 0.73rem;
}

.immich-apply label {
  display: grid;
  gap: 5px;
}

@media (max-width: 900px) {
  .dedupe-header {
    align-items: flex-start;
  }

  .dedupe-header-actions {
    max-width: 290px;
  }

  .dedupe-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dedupe-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dedupe-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .dedupe-shell {
    width: min(100% - 16px, 1320px);
    padding-top: 8px;
  }

  .dedupe-header {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .dedupe-header .cloud-mark.compact {
    width: 42px;
    height: 42px;
  }

  .dedupe-header h1 {
    font-size: 1.65rem;
  }

  .dedupe-header .eyebrow {
    margin-bottom: 4px;
    font-size: 0.58rem;
  }

  .dedupe-header .subtitle {
    display: none;
  }

  .dedupe-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .dedupe-header-actions .button {
    min-height: 31px;
    font-size: 0.7rem;
  }

  .dedupe-status,
  .dedupe-workspace {
    padding: 12px;
  }

  .dedupe-status .panel-heading {
    display: grid;
    gap: 9px;
  }

  .dedupe-status .panel-heading h2 {
    font-size: 1.15rem;
  }

  .dedupe-status-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .dedupe-status-actions .mode-pill {
    display: none;
  }

  .dedupe-status-actions .button,
  .dedupe-status-actions select {
    width: 100%;
    min-height: 32px;
    font-size: 0.68rem;
  }

  .dedupe-status-actions #startScan {
    grid-column: 1 / -1;
  }

  .dedupe-metrics {
    grid-template-columns: 1fr 1fr;
    margin-top: 10px;
  }

  .dedupe-metrics > div {
    padding: 8px 9px;
  }

  .dedupe-metrics strong {
    font-size: 1rem;
  }

  .dedupe-metrics span,
  .dedupe-metrics small {
    font-size: 0.65rem;
  }

  .dedupe-safety {
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: 9px;
    padding: 8px 9px;
  }

  .dedupe-safety span:not(.status-dot) {
    font-size: 0.68rem;
  }

  .dedupe-safety a {
    font-size: 0.69rem;
  }

  .dedupe-safety-actions {
    grid-column: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dedupe-scan-progress {
    grid-template-columns: 1fr;
  }

  .dedupe-toolbar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 9px;
  }

  .dedupe-search {
    grid-column: 1 / -1;
  }

  .dedupe-toolbar label:last-child {
    grid-column: 1 / -1;
  }

  .dedupe-list-head {
    align-items: flex-end;
  }

  .duplicate-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .duplicate-row-side {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
  }

  .duplicate-row-side small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .duplicate-file-head,
  .duplicate-file-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-choice {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .duplicate-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
