@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap");

:root {
  color-scheme: dark;
  --bg: #101112;
  --bg-soft: #17191b;
  --surface: #1e2124;
  --surface-strong: #25292d;
  --line: #343941;
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #f3f1ea;
  --muted: #a7a59e;
  --muted-strong: #cbc8be;
  --accent: #7dd3a8;
  --accent-strong: #a6f2c6;
  --danger: #ff6b6b;
  --warning: #ffc857;
  --ok: #7dd3a8;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4ef;
  --bg-soft: #ece8df;
  --surface: #ffffff;
  --surface-strong: #f4f1ea;
  --line: #d8d2c5;
  --line-soft: rgba(28, 27, 24, 0.08);
  --text: #1f211f;
  --muted: #696a63;
  --muted-strong: #3e403b;
  --accent: #13795b;
  --accent-strong: #0f5f48;
  --danger: #c24141;
  --warning: #9b6b00;
  --ok: #13795b;
  --shadow: 0 22px 70px rgba(42, 38, 27, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px, 42px 42px, auto;
}

:root[data-theme="light"] body {
  background:
    linear-gradient(rgba(31, 33, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 33, 31, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px, 42px 42px, auto;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.auth-shell,
.scene {
  width: min(1180px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
  display: grid;
  align-items: center;
}

body.is-dashboard .auth-shell {
  align-items: start;
}

.login-view,
.dashboard-view,
.panel {
  width: 100%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.login-view {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  overflow: hidden;
}

.login-copy {
  min-height: 420px;
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: end;
  background:
    linear-gradient(145deg, rgba(125, 211, 168, 0.14), transparent 42%),
    linear-gradient(0deg, var(--surface-strong), var(--surface));
  border-right: 1px solid var(--line);
}

.login-form {
  padding: clamp(24px, 4vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-view {
  padding: clamp(18px, 3vw, 30px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font: 600 0.74rem/1 "JetBrains Mono", monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.05;
}

.login-copy h1 {
  max-width: 9ch;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 0.94;
}

h3 {
  font-size: 1rem;
  line-height: 1.25;
}

.muted,
.panel p.muted {
  color: var(--muted);
}

.login-copy .muted {
  max-width: 31rem;
  margin: 18px 0 0;
  font-size: 1.02rem;
  line-height: 1.6;
}

label {
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 600;
}

.password-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text);
  padding: 0 13px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

button,
.app-link,
.secondary {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #101112;
  background: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
  padding: 0 16px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

button:hover,
.app-link:hover,
.secondary:hover {
  transform: translateY(-1px);
}

button:disabled,
.secondary:disabled {
  cursor: not-allowed;
  opacity: 0.54;
  transform: none;
}

.secondary {
  color: var(--text);
  background: transparent;
  border-color: var(--line);
}

.compact {
  min-height: 38px;
  padding: 0 12px;
}

.icon-btn {
  width: 40px;
  min-height: 40px;
  padding: 0;
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--line);
  font-family: "JetBrains Mono", monospace;
}

.btn-loader {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(16, 17, 18, 0.32);
  border-top-color: #101112;
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}

.is-loading .btn-loader {
  display: inline-block;
}

.is-loading .btn-label {
  display: none;
}

.attempts,
.message {
  min-height: 20px;
  margin: 12px 0 0;
  font-size: 0.9rem;
}

.attempts {
  color: var(--muted);
}

.message {
  color: var(--danger);
}

.message.is-ok {
  color: var(--ok);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.metric {
  background: var(--surface-strong);
  padding: 18px;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 1.7rem;
  line-height: 1;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
}

.search-box {
  display: grid;
  gap: 8px;
}

.segmented {
  min-height: 44px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.segmented button {
  min-height: 40px;
  color: var(--muted-strong);
  background: var(--surface-strong);
  border-color: var(--line);
  padding: 0 12px;
}

.segmented button.is-active {
  color: #101112;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.segmented span {
  min-width: 22px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  font: 600 0.75rem/1 "JetBrains Mono", monospace;
}

.dashboard-status {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 12px 0 18px;
}

.tools-board {
  display: grid;
  gap: 28px;
}

.tools-section {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.91rem;
}

.section-heading span {
  color: var(--muted);
  font: 600 0.82rem/1 "JetBrains Mono", monospace;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.tool-card {
  min-height: 226px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 16px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
}

.tool-card.is-inactive {
  opacity: 0.66;
}

.tool-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.tool-icon {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  color: var(--accent-strong);
  font: 700 0.82rem/1 "JetBrains Mono", monospace;
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.tool-card p {
  flex: 1 1 auto;
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.5;
  font-size: 0.92rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.state-pill,
.health-pill,
.status-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  color: var(--muted-strong);
  background: var(--bg-soft);
  font: 600 0.72rem/1 "JetBrains Mono", monospace;
}

.state-pill.active,
.health-pill.ok,
.status-pill.ok {
  color: #101112;
  border-color: var(--ok);
  background: var(--ok);
}

.state-pill.inactive,
.state-pill.retired,
.health-pill.warn,
.status-pill.warn {
  color: #101112;
  border-color: var(--warning);
  background: var(--warning);
}

.health-pill.checking,
.status-pill.checking {
  color: var(--muted-strong);
}

.tool-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-actions .app-link {
  margin-left: auto;
  min-height: 36px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--surface-strong);
}

.empty-state p {
  color: var(--muted);
  margin: 8px 0 0;
}

.settings-shell {
  width: min(1380px, calc(100vw - 32px));
}

.settings-view {
  display: grid;
  gap: 22px;
}

.settings-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
}

.settings-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-tabs a {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  color: var(--muted-strong);
  background: var(--surface-strong);
  padding: 0 12px;
  font-weight: 700;
  text-decoration: none;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.settings-main,
.settings-side {
  display: grid;
  gap: 18px;
}

.settings-side {
  position: sticky;
  top: 18px;
}

.settings-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 18px;
}

.settings-panel > h2 {
  font-size: 1.08rem;
  margin-bottom: 14px;
}

.settings-filter {
  min-width: 180px;
  display: grid;
  gap: 8px;
}

.settings-health-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  justify-content: flex-end;
}

.unsaved-indicator {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--warning) 46%, var(--line));
  border-radius: 7px;
  padding: 0 10px;
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 10%, transparent);
  font-size: 0.75rem;
  font-weight: 800;
}

.has-unsaved-homepage #settings-message {
  border-color: color-mix(in srgb, var(--warning) 36%, var(--line));
}

.health-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.health-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 14px;
}

.health-row-main {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.health-row-main p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.health-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 6px;
  background: var(--warning);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 18%, transparent);
}

.health-dot.ok {
  background: var(--ok);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent);
}

.health-row-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  color: var(--muted-strong);
  font: 600 0.78rem/1 "JetBrains Mono", monospace;
}

.health-row details {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}

.health-row summary {
  color: var(--muted-strong);
  cursor: pointer;
  font-weight: 700;
}

.health-details,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.kv-card {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 12px;
}

.kv-card span,
.kv-list span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.kv-card strong,
.kv-list strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.kv-card.ok strong {
  color: var(--ok);
}

.kv-card.warn strong {
  color: var(--warning);
}

.inline-actions,
.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.action-stack {
  display: grid;
}

.action-stack > * {
  width: 100%;
}

.recommendation-list {
  display: grid;
  gap: 10px;
}

.organizer-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.organizer-column,
.link-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 12px;
}

.organizer-column-head {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.organizer-column-head label,
.link-row label {
  display: grid;
  gap: 6px;
}

.organizer-dropzone {
  min-height: 96px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px dashed color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  padding: 8px;
  transition: border-color 160ms ease, background 160ms ease;
}

.organizer-dropzone.is-drop-target {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.organizer-app {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-strong);
  padding: 10px;
  cursor: grab;
}

.organizer-app:active {
  cursor: grabbing;
}

.organizer-app strong,
.organizer-app span {
  display: block;
}

.organizer-app span,
.organizer-empty {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.links-editor {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.2fr) minmax(160px, 1.3fr) minmax(90px, 0.65fr) minmax(110px, 0.75fr) auto;
  gap: 10px;
  align-items: end;
}

.compact-empty {
  padding: 18px;
}

.danger-action {
  border-color: color-mix(in srgb, var(--danger) 52%, var(--line)) !important;
  color: var(--danger) !important;
}

.recommendation {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 12px;
}

.recommendation h3 {
  color: var(--text);
}

.recommendation p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.recommendation.warning {
  border-color: color-mix(in srgb, var(--warning) 48%, var(--line));
}

.kv-list {
  display: grid;
  gap: 10px;
}

.kv-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.panel {
  padding: clamp(18px, 3vw, 30px);
}

table {
  color: var(--text);
}

th {
  color: var(--muted-strong);
}

.hidden {
  display: none !important;
}

.mv-global-nav {
  position: fixed;
  right: 14px;
  top: 14px;
  z-index: 9999;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 999px;
  padding: 0 12px;
  color: rgba(248, 250, 252, 0.94);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.86), rgba(7, 10, 14, 0.74));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.mv-global-nav svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.mv-global-nav:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.46);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(8, 13, 20, 0.82));
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mv-global-nav:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.72);
  outline-offset: 3px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  .mv-global-nav {
    right: 10px;
    top: 10px;
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.7rem;
  }

  .auth-shell,
  .scene {
    width: min(100% - 24px, 1180px);
    padding: 12px 0;
  }

  .login-view {
    grid-template-columns: 1fr;
  }

  .login-copy {
    min-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .login-copy h1 {
    max-width: 11ch;
  }

  .password-row,
  .toolbar,
  .summary-grid,
  .settings-summary,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-side {
    position: static;
  }

  .segmented {
    justify-content: flex-start;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tool-actions .app-link {
    width: 100%;
    margin-left: 0;
  }
}

/* Homepage-style launcher fallback */
:root {
  --bg: #000;
  --bg-soft: rgba(15, 23, 42, 0.58);
  --surface: rgba(15, 23, 42, 0.6);
  --surface-strong: rgba(30, 41, 59, 0.62);
  --line: rgba(148, 163, 184, 0.2);
  --line-soft: rgba(226, 232, 240, 0.1);
  --text: rgba(248, 250, 252, 0.94);
  --muted: rgba(203, 213, 225, 0.72);
  --muted-strong: rgba(226, 232, 240, 0.84);
  --accent: #38bdf8;
  --accent-strong: #7dd3fc;
  --danger: #fb7185;
  --warning: #fbbf24;
  --ok: #34d399;
  --shadow: 0 34px 120px rgba(0, 0, 0, 0.74);
}

body {
  min-height: 100vh;
  background: #000;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: #000;
}

.auth-shell {
  width: min(1536px, calc(100vw - 40px));
  min-height: 100vh;
  padding: clamp(24px, 4vw, 72px) 0;
  align-items: center;
}

body.is-dashboard .auth-shell {
  align-items: center;
}

.login-view,
.dashboard-view {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(8, 16, 28, 0.2), rgba(4, 10, 18, 0.72)),
    url("https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=2560&q=85") center / cover no-repeat;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.login-view::before,
.dashboard-view::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.76), rgba(8, 47, 73, 0.24) 52%, rgba(83, 20, 52, 0.5)),
    radial-gradient(circle at 80% 12%, rgba(244, 63, 94, 0.32), transparent 28%),
    radial-gradient(circle at 48% 45%, rgba(14, 165, 233, 0.24), transparent 36%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.78));
}

.login-view::after,
.dashboard-view::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(2, 6, 23, 0.16);
}

.login-view {
  max-width: 980px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
}

.login-copy {
  min-height: 480px;
  background: rgba(2, 6, 23, 0.18);
  border-right: 1px solid rgba(148, 163, 184, 0.2);
}

.login-form,
.metric,
.toolbar,
.tool-card,
.empty-state {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.62), rgba(15, 23, 42, 0.54));
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.26);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

.login-form {
  margin: clamp(18px, 3vw, 34px);
  border-radius: 6px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.24);
  border-radius: 999px;
  color: rgba(248, 250, 252, 0.9);
  background: rgba(15, 23, 42, 0.46);
  font: 700 0.86rem/1 "JetBrains Mono", monospace;
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.28);
}

.eyebrow {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  text-transform: none;
}

.login-copy h1 {
  max-width: 10ch;
  color: rgba(248, 250, 252, 0.96);
  text-shadow: 0 16px 42px rgba(2, 6, 23, 0.7);
}

.dashboard-view {
  min-height: min(970px, calc(100vh - 96px));
  padding: clamp(30px, 3.7vw, 58px) clamp(28px, 5vw, 72px) clamp(42px, 5vw, 82px);
}

.topbar {
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 0;
}

.topbar h2 {
  display: none;
}

.topbar-actions {
  align-items: center;
}

button,
.app-link,
.secondary {
  min-height: 38px;
  border-radius: 5px;
  color: rgba(248, 250, 252, 0.9);
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.7), rgba(15, 23, 42, 0.62));
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.2);
}

button:hover,
.app-link:hover,
.secondary:hover {
  border-color: rgba(125, 211, 252, 0.36);
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.72), rgba(15, 23, 42, 0.66));
}

.icon-btn {
  width: 38px;
}

input,
select {
  min-height: 38px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.18);
}

.summary-grid {
  grid-template-columns: 1.1fr 1.1fr 1.1fr 1.4fr;
  gap: 10px;
  margin: 0 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.metric {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "small value";
  column-gap: 12px;
  align-items: center;
  border-radius: 5px;
  padding: 10px 12px;
}

.metric-label {
  grid-area: label;
  color: rgba(248, 250, 252, 0.88);
  font-size: 0.82rem;
  font-weight: 500;
}

.metric strong {
  grid-area: value;
  margin: 0;
  color: rgba(226, 232, 240, 0.88);
  font: 600 0.9rem/1.1 "JetBrains Mono", monospace;
  text-align: right;
}

.metric small {
  grid-area: small;
  color: rgba(203, 213, 225, 0.66);
  font-size: 0.75rem;
}

.toolbar {
  display: none;
}

.search-box {
  gap: 5px;
}

label {
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.74rem;
}

.segmented {
  min-height: 38px;
  gap: 6px;
}

.segmented button {
  min-height: 34px;
  border-radius: 5px;
  color: rgba(203, 213, 225, 0.76);
  background: rgba(15, 23, 42, 0.34);
}

.segmented button.is-active {
  color: rgba(248, 250, 252, 0.94);
  border-color: rgba(125, 211, 252, 0.36);
  background: rgba(14, 116, 144, 0.36);
}

.dashboard-status {
  display: none;
}

.tools-board {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 10px;
  align-items: start;
}

.tools-section {
  gap: 8px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 24px;
  margin-top: 2px;
}

.section-heading h3 {
  color: rgba(226, 232, 240, 0.94);
  font-size: 0.94rem;
  font-weight: 500;
}

.section-heading p,
.section-heading span {
  display: none;
}

.tools-grid {
  grid-template-columns: 1fr;
  gap: 6px;
}

.tool-card {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  border-radius: 5px;
  padding: 8px 10px;
  color: inherit;
  text-decoration: none;
}

.tool-card:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.36);
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.7), rgba(15, 23, 42, 0.62));
}

.tool-head {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
}

.tool-head h3 {
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.88rem;
  font-weight: 500;
}

.tool-icon {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  color: var(--icon-color, #7dd3fc);
  background: transparent;
}

.tool-icon svg {
  width: 25px;
  height: 25px;
  display: block;
}

.tool-meta {
  display: none;
}

.tool-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.tool-card p {
  min-height: 0;
  padding-left: 36px;
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.74rem;
  line-height: 1.24;
}

.tag-row {
  display: none;
}

.tool-actions {
  align-items: center;
  gap: 6px;
}

.state-pill {
  display: none;
}

.health-pill {
  min-height: 18px;
  border-radius: 3px;
  padding: 0 6px;
  font-size: 0.58rem;
  line-height: 1;
  text-transform: uppercase;
}

.state-pill.active,
.health-pill.ok,
.status-pill.ok {
  color: #052e16;
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.88);
}

.state-pill.inactive,
.state-pill.retired,
.health-pill.warn,
.status-pill.warn {
  color: #451a03;
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.9);
}

.health-pill.checking {
  color: rgba(203, 213, 225, 0.72);
  background: rgba(15, 23, 42, 0.46);
}

.tool-actions .app-link {
  min-height: 28px;
  margin-left: auto;
  padding: 0 10px;
  font-size: 0.72rem;
}

@media (max-width: 1120px) {
  .tools-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .auth-shell {
    width: calc(100vw - 20px);
    padding: 10px 0;
  }

  body.is-dashboard .auth-shell {
    align-items: start;
  }

  .login-view,
  .dashboard-view {
    border-radius: 8px;
  }

  .login-view,
  .login-form {
    margin: 0;
  }

  .login-copy {
    min-height: 250px;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  }

  .dashboard-view {
    min-height: calc(100vh - 20px);
    padding: 18px 12px 28px;
  }

  .summary-grid,
  .tools-board,
  .tools-grid,
  .link-row {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .dashboard-status {
    text-align: left;
  }
}
