:root {
  --bg: #05080d;
  --panel: #0c1118;
  --panel-strong: #111821;
  --panel-soft: #151c25;
  --line: rgba(179, 204, 229, 0.16);
  --line-strong: rgba(179, 204, 229, 0.28);
  --text: #f7fbff;
  --muted: #b7c2cf;
  --soft: #8291a3;
  --cyan: #5eead4;
  --mint: #86efac;
  --blue: #93c5fd;
  --amber: #fbbf24;
  --rose: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    radial-gradient(circle at 20% 0%, rgba(94, 234, 212, 0.06), transparent 28%),
    #05080d;
  background-size: 48px 48px, 48px 48px, auto, auto;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

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

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(620px, 1.28fr);
  gap: 40px;
  align-items: center;
  padding: 48px;
}

.login-panel,
.login-preview {
  min-width: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-lockup.compact {
  width: 100%;
  padding: 4px 4px 18px;
}

.brand-mark {
  --logo-shift-x: -4px;

  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f1720;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  transform: translateX(var(--logo-shift-x));
}

.brand-fallback::before {
  content: "s";
  color: #031016;
  font-weight: 900;
  font-size: 22px;
}

.brand-fallback {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-weight: 800;
  font-size: 18px;
}

.brand-lockup small {
  color: var(--soft);
  font-size: 11px;
}

.login-copy {
  margin-top: 76px;
}

.kicker,
.eyebrow,
.panel-label,
.resource-type {
  color: #b9fff4;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-copy h1 {
  max-width: 620px;
  margin-top: 18px;
  font-size: 56px;
  line-height: 1.02;
}

.login-copy p:not(.kicker),
.panel-copy {
  max-width: 620px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.auth-card,
.preview-window,
.panel,
.hero-card,
.stat-card,
.resource-card,
.machine-card,
.grant-card,
.sidebar,
.modal,
.sidebar-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 17, 24, 0.86);
  box-shadow: var(--shadow);
}

.auth-card {
  display: grid;
  gap: 14px;
  max-width: 430px;
  margin-top: 34px;
  padding: 20px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.82);
  padding: 12px 13px;
  color: var(--text);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(94, 234, 212, 0.72);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.1);
}

.button,
.ghost-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--text);
  font-weight: 900;
}

.button.primary {
  border-color: transparent;
  background: var(--cyan);
  color: #031016;
}

.button.secondary,
.ghost-button,
.icon-button {
  background: rgba(255, 255, 255, 0.055);
}

.button.full {
  width: 100%;
  margin-top: 18px;
}

.ghost-button {
  padding: 8px 11px;
  color: var(--muted);
  font-size: 13px;
}

.ghost-button.danger {
  color: var(--rose);
}

.button.secondary.danger {
  border-color: rgba(251, 113, 133, 0.34);
  color: var(--rose);
}

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

.auth-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
}

.auth-hints span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
}

.preview-window {
  overflow: hidden;
  background: rgba(13, 17, 23, 0.94);
}

.window-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.25fr) minmax(0, 0.85fr);
}

.preview-grid > div {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 22px;
}

.preview-grid > div:last-child {
  border-right: 0;
}

.preview-item,
.object-chip,
.metric-row,
.artifact-row,
.run-steps span,
.run-step-grid span,
.machine-pair div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.preview-item,
.object-chip {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 14px;
}

.preview-item.active,
.object-chip.selected {
  border-color: rgba(94, 234, 212, 0.54);
  background: rgba(94, 234, 212, 0.08);
}

.preview-item span,
.object-chip span {
  color: var(--soft);
}

.run-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.run-steps span {
  padding: 20px 10px;
  color: var(--muted);
  font-weight: 800;
}

pre {
  overflow: auto;
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070a0f;
  padding: 18px;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.7;
}

pre::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

pre::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.34);
}

.metric-row,
.artifact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 13px;
  color: var(--muted);
}

.artifact-row span,
.artifact-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.artifact-row .ghost-button {
  flex: 0 0 auto;
}

.muted-row {
  justify-content: center;
  color: var(--soft);
}

.metric-row strong {
  color: var(--cyan);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  padding: 18px;
  background: rgba(7, 10, 15, 0.94);
}

.side-nav {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--muted);
  font-weight: 800;
}

.side-nav a:hover,
.side-nav a.active {
  border-color: var(--line);
  background: rgba(94, 234, 212, 0.08);
  color: var(--text);
}

.sidebar-card {
  display: grid;
  gap: 7px;
  margin-top: 24px;
  padding: 14px;
  box-shadow: none;
}

.sidebar-card small,
.muted {
  color: var(--soft);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 15, 0.86);
  padding: 18px 28px;
  backdrop-filter: blur(18px);
}

.topbar h1 {
  margin-top: 4px;
  font-size: 30px;
}

.data-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 28px;
  background: rgba(251, 191, 36, 0.08);
  color: var(--muted);
}

.data-mode-banner strong {
  color: var(--amber);
  text-transform: uppercase;
  font-size: 12px;
}

.data-mode-banner span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.data-mode-banner.success {
  display: none;
}

.data-mode-banner.danger strong {
  color: var(--rose);
}

.topbar-actions,
.button-row,
.hero-actions,
.request-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.account-chip {
  display: grid;
  grid-template-columns: 30px auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 7px 13px 7px 8px;
  text-align: left;
}

.account-chip > span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.16);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 1000;
}

.account-chip strong,
.account-chip small {
  line-height: 1.05;
}

.account-chip small {
  color: var(--soft);
  font-size: 11px;
}

.compact-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.team-switcher {
  width: auto;
  min-width: 220px;
}

.list-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 220px) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.search-box,
.sort-box {
  min-width: 0;
}

.search-box span,
.sort-box span {
  color: var(--soft);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.page-grid,
.content-grid,
.panel {
  margin: 22px 28px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 28px;
  align-items: stretch;
}

.home-primary {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin: 0;
}

.home-primary > * {
  min-width: 0;
}

.home-primary h2 {
  max-width: 760px;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.12;
}

.home-primary p:not(.kicker) {
  max-width: 760px;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hero-card {
  grid-column: span 2;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.12), transparent 42%),
    rgba(12, 17, 24, 0.92);
}

.hero-card.wide {
  grid-row: span 2;
}

.hero-card > * {
  min-width: 0;
  max-width: 100%;
}

.hero-card h2 {
  max-width: 620px;
  margin-top: 12px;
  font-size: 34px;
  line-height: 1.08;
}

.hero-card p:not(.kicker) {
  max-width: 640px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.stat-card {
  min-height: 150px;
  display: grid;
  align-content: space-between;
  padding: 20px;
  box-shadow: none;
}

.stat-card span,
.stat-card small {
  color: var(--soft);
}

.stat-card strong {
  color: var(--text);
  font-size: 42px;
}

.stat-card.cyan {
  border-color: rgba(94, 234, 212, 0.36);
}

.stat-card.mint {
  border-color: rgba(134, 239, 172, 0.34);
}

.stat-card.blue {
  border-color: rgba(147, 197, 253, 0.34);
}

.stat-card.amber {
  border-color: rgba(251, 191, 36, 0.34);
}

.content-grid {
  display: grid;
  gap: 14px;
  align-items: start;
}

.content-grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.panel {
  padding: 20px;
  box-shadow: none;
}

.slim-panel {
  padding-block: 14px;
}

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

.inline-head {
  margin-bottom: 12px;
}

.setup-steps {
  display: grid;
  gap: 10px;
}

.setup-step {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.035);
}

.setup-step span {
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.setup-step.done span {
  border-color: rgba(134, 239, 172, 0.34);
  color: var(--mint);
}

.setup-step.next {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(251, 191, 36, 0.07);
}

.setup-step.next span {
  border-color: rgba(251, 191, 36, 0.44);
  color: var(--amber);
}

.home-action-panel {
  display: grid;
  gap: 14px;
}

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

.home-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.035);
}

.home-action-row div {
  min-width: 0;
}

.home-action-row strong,
.home-action-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-action-row small {
  margin-top: 4px;
  color: var(--soft);
}

.home-action-row span {
  border: 1px solid rgba(94, 234, 212, 0.24);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.attention-clear {
  border-color: rgba(134, 239, 172, 0.24);
}

.home-panel-actions {
  margin-top: 2px;
}

.daemon-summary-grid {
  margin-top: 14px;
}

.access-summary-grid {
  margin-bottom: 14px;
}

.access-workflow-panel {
  border-color: rgba(147, 197, 253, 0.28);
}

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

.workflow-step {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.035);
}

.workflow-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.workflow-step strong,
.workflow-step small {
  overflow-wrap: anywhere;
}

.workflow-step small {
  color: var(--soft);
}

.workflow-step.success {
  border-color: rgba(134, 239, 172, 0.28);
}

.workflow-step.warning {
  border-color: rgba(251, 191, 36, 0.28);
}

.workflow-step.info {
  border-color: rgba(147, 197, 253, 0.28);
}

.compact-grant-grid {
  grid-template-columns: minmax(0, 1fr);
}

.team-access-panel {
  border-color: rgba(94, 234, 212, 0.22);
}

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

.compact-policy-list {
  gap: 8px;
}

.daemon-diagnostics-panel {
  margin-top: 14px;
}

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

.diagnostic-sections {
  margin-top: 14px;
}

.diagnostic-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.compact-settings {
  gap: 8px;
}

.diagnostic-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.diagnostic-foot span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--soft);
  font-size: 12px;
}

.diagnostic-foot strong {
  color: var(--text);
}

.library-command-panel {
  display: grid;
  gap: 14px;
}

.signature-form {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.advanced-json {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
}

.advanced-json summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
}

.advanced-json[open] {
  display: grid;
  gap: 12px;
}

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

.check-row input {
  width: auto;
}

.panel-head h3 {
  margin-top: 4px;
  font-size: 21px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

button.status-pill {
  cursor: pointer;
}

.action-pill:hover,
.account-chip:hover {
  border-color: rgba(94, 234, 212, 0.54);
  background: rgba(94, 234, 212, 0.09);
}

.status-pill.success {
  border-color: rgba(134, 239, 172, 0.36);
  background: rgba(134, 239, 172, 0.1);
  color: var(--mint);
}

.status-pill.warning {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(251, 191, 36, 0.08);
  color: var(--amber);
}

.status-pill.danger {
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(251, 113, 133, 0.08);
  color: var(--rose);
}

.status-pill.info {
  border-color: rgba(147, 197, 253, 0.34);
  background: rgba(147, 197, 253, 0.08);
  color: var(--blue);
}

.execution-console {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.registry-column,
.run-column,
.result-column {
  min-width: 0;
}

.run-step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.run-step-grid span {
  position: relative;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 13px 10px 13px 30px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.run-step-grid span::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 11px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 6px rgba(94, 234, 212, 0.08);
}

.machine-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.machine-pair div {
  display: grid;
  gap: 6px;
  padding: 13px;
}

.machine-pair span {
  color: var(--muted);
}

.machine-pair strong {
  color: var(--mint);
}

.resource-grid,
.machine-grid,
.grant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-card,
.machine-card,
.grant-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  box-shadow: none;
}

.resource-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.resource-card h4,
.machine-card h4,
.grant-card h4 {
  overflow-wrap: anywhere;
  font-size: 19px;
}

.resource-card p,
.machine-card p,
.grant-card p {
  color: var(--soft);
}

.library-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--soft);
  font-size: 12px;
}

.picker-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
  color: var(--text);
  text-align: left;
}

.picker-card:hover {
  border-color: rgba(94, 234, 212, 0.54);
  background: rgba(94, 234, 212, 0.08);
}

.picker-card span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.picker-card strong,
.picker-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.picker-card small {
  color: var(--soft);
}

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

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

.meta-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--soft);
  font-size: 13px;
}

.meta-grid strong,
.detail-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.detail-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  color: var(--soft);
}

.detail-link {
  justify-self: start;
}

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

.object-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.4fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

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

.object-row-main h4 {
  margin-top: 7px;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.object-row-main small {
  display: block;
  margin-top: 5px;
  color: var(--soft);
  overflow-wrap: anywhere;
}

.object-row-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.object-row-meta span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  color: var(--soft);
  font-size: 12px;
}

.object-row-meta strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.object-row-actions {
  justify-content: flex-end;
}

.detail-scopes {
  margin-top: 16px;
}

.snapshot-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.035);
}

.snapshot-summary.success {
  border-color: rgba(134, 239, 172, 0.28);
  background: rgba(34, 197, 94, 0.07);
}

.snapshot-summary.warning {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.07);
}

.snapshot-summary.danger {
  border-color: rgba(251, 113, 133, 0.32);
  background: rgba(251, 113, 133, 0.07);
}

.snapshot-summary p {
  color: var(--soft);
}

.run-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

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

.signature-column {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.signature-column > strong {
  color: var(--cyan);
}

.signature-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.signature-item span,
.signature-item small {
  display: block;
  overflow-wrap: anywhere;
}

.signature-item small {
  margin-top: 5px;
  color: var(--soft);
}

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

.definition-card {
  display: grid;
  align-content: start;
  gap: 11px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 13px;
}

.definition-card > strong {
  color: var(--cyan);
}

.definition-list {
  display: grid;
  gap: 8px;
}

.definition-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.definition-item span,
.definition-item small {
  display: block;
  overflow-wrap: anywhere;
}

.definition-item small {
  margin-top: 4px;
  color: var(--soft);
}

.raw-definition {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.raw-definition summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
}

.raw-yaml {
  margin-top: 12px;
}

.json-block {
  max-height: 420px;
  margin-top: 0;
}

.callout {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  color: var(--muted);
}

.callout.danger {
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(251, 113, 133, 0.08);
  color: var(--rose);
}

.callout.warning {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(251, 191, 36, 0.08);
  color: var(--amber);
}

.callout.success {
  border-color: rgba(134, 239, 172, 0.34);
  background: rgba(134, 239, 172, 0.08);
  color: var(--mint);
}

.daemon-connect-panel {
  border-color: rgba(94, 234, 212, 0.3);
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.1), transparent 36%),
    rgba(12, 17, 24, 0.9);
}

.daemon-connect-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 14px;
  align-items: stretch;
}

.daemon-connect-copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.daemon-connect-copy p {
  color: var(--muted);
  line-height: 1.55;
}

.daemon-flow {
  display: grid;
  gap: 8px;
}

.daemon-flow span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--soft);
  font-size: 13px;
}

.daemon-flow strong {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(94, 234, 212, 0.34);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 11px;
}

.credential-pair {
  display: grid;
  gap: 10px;
}

.credential-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 13px;
  min-width: 0;
}

.credential-card.missing {
  border-style: dashed;
}

.credential-card span {
  color: #b9fff4;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.credential-card small {
  color: var(--soft);
}

.credential-card code,
.code-snippet {
  overflow-wrap: anywhere;
}

.credential-card code {
  color: var(--cyan);
  font-size: 12px;
}

.code-snippet {
  min-width: 0;
  margin: 0;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.74);
  padding: 14px;
  color: var(--text);
  white-space: pre-wrap;
}

.code-snippet code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
}

.scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scope-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.scope-list span.danger-scope {
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(251, 113, 133, 0.08);
  color: var(--rose);
}

.compact-scopes {
  max-width: 360px;
}

.table-wrap {
  overflow: auto;
}

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

table.dense-table th,
table.dense-table td {
  padding: 8px 10px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--soft);
  font-size: 12px;
  text-transform: uppercase;
}

td small {
  display: block;
  margin-top: 5px;
  color: var(--soft);
}

.machine-dot,
.activity-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--soft);
}

.machine-dot.online,
.machine-dot.available,
.activity-dot.run {
  background: var(--mint);
  box-shadow: 0 0 0 7px rgba(134, 239, 172, 0.08);
}

.activity-dot.access {
  background: var(--cyan);
}

.activity-dot.token {
  background: var(--amber);
}

.activity-dot.library {
  background: var(--blue);
}

.request-row,
.activity-item,
.member-row,
.policy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 13px;
}

.request-row + .request-row,
.activity-item + .activity-item,
.member-row + .member-row,
.policy-row + .policy-row {
  margin-top: 10px;
}

.request-row strong,
.request-row small,
.activity-item strong,
.activity-item small,
.member-row strong,
.member-row small {
  display: block;
}

.request-row small,
.activity-item small,
.member-row small,
.activity-item time {
  margin-top: 4px;
  color: var(--soft);
}

.activity-item {
  justify-content: flex-start;
}

.activity-item div {
  min-width: 0;
  flex: 1;
}

.activity-list.compact .activity-item {
  padding: 12px;
}

.member-list,
.policy-list,
.settings-list {
  display: grid;
  gap: 10px;
}

.settings-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  border-color: rgba(94, 234, 212, 0.28);
}

.settings-hero.warning {
  border-color: rgba(251, 191, 36, 0.34);
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.08), transparent 34%),
    rgba(12, 17, 24, 0.88);
}

.settings-hero.danger {
  border-color: rgba(251, 113, 133, 0.34);
  background:
    linear-gradient(135deg, rgba(251, 113, 133, 0.08), transparent 34%),
    rgba(12, 17, 24, 0.88);
}

.settings-hero h2 {
  margin-top: 6px;
  font-size: 28px;
}

.settings-hero p {
  max-width: 720px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.settings-score {
  display: grid;
  place-items: center;
  min-width: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.settings-score strong {
  color: var(--text);
  font-size: 38px;
  line-height: 1;
}

.settings-score span {
  margin-top: 6px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin: 22px 28px;
}

.settings-grid > .panel,
.settings-lower-grid > .panel {
  margin: 0;
}

.settings-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.settings-hero > *,
.settings-card > * {
  min-width: 0;
}

.settings-card .panel-head {
  margin-bottom: 0;
}

.settings-lower-grid {
  margin-top: 14px;
}

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

.settings-issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.settings-issue.warning {
  border-color: rgba(251, 191, 36, 0.28);
}

.settings-issue.danger {
  border-color: rgba(251, 113, 133, 0.32);
}

.settings-issue.info {
  border-color: rgba(147, 197, 253, 0.28);
}

.settings-issue strong,
.settings-issue small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.settings-issue small {
  margin-top: 5px;
  color: var(--soft);
}

.policy-row {
  width: 100%;
  color: var(--text);
  text-align: left;
}

.policy-row strong {
  color: var(--cyan);
}

.settings-list span {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  color: var(--soft);
}

.settings-list strong {
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
  text-align: right;
}

.danger-text {
  color: var(--rose) !important;
}

.endpoint-list {
  display: grid;
  gap: 8px;
}

.settings-endpoints {
  margin-top: 12px;
}

.endpoint-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.endpoint-row div,
.endpoint-row small {
  min-width: 0;
}

.endpoint-row small {
  grid-column: 1 / -1;
  color: var(--soft);
  overflow-wrap: anywhere;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 28px;
  color: var(--soft);
  text-align: center;
}

.empty-action {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.skeleton-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.skeleton-list span {
  min-height: 58px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(94, 234, 212, 0.12), rgba(255, 255, 255, 0.04));
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.25s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

.dense-list {
  gap: 4px;
}

.dense-list .activity-item {
  padding: 8px 10px;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.62);
  padding: 22px;
}

.modal {
  width: min(100%, 520px);
  padding: 18px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form textarea {
  min-height: 92px;
  resize: vertical;
}

.wizard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.6fr);
  gap: 12px;
}

.resource-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.scope-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scope-preset-row .selected {
  border-color: rgba(94, 234, 212, 0.55);
  background: rgba(94, 234, 212, 0.12);
  color: var(--cyan);
}

.stack-form label {
  gap: 7px;
}

.stack-form label small {
  color: var(--soft);
  line-height: 1.45;
}

.advanced-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.advanced-form summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
}

.advanced-form label,
.advanced-form .callout {
  margin-top: 12px;
}

.wizard-summary {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.06);
  padding: 13px;
}

.wizard-summary small {
  color: var(--soft);
}

.secret-box {
  display: grid;
  gap: 12px;
}

.secret-box span {
  color: var(--muted);
}

.secret-box > code {
  overflow-wrap: anywhere;
  border: 1px solid rgba(94, 234, 212, 0.36);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.08);
  padding: 14px;
  color: var(--cyan);
}

.toast {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  max-width: 380px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 17, 24, 0.96);
  padding: 14px 16px;
  color: var(--text);
  box-shadow: var(--shadow);
}

.toast.success {
  border-color: rgba(134, 239, 172, 0.44);
}

.toast.danger {
  border-color: rgba(251, 113, 133, 0.44);
}

.toast.warning {
  border-color: rgba(251, 191, 36, 0.44);
}

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

  .console-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .sidebar {
    padding: 12px;
  }

  .brand-lockup.compact span:not(.brand-mark),
  .side-nav span,
  .sidebar-card {
    display: none;
  }

  .side-nav a {
    justify-content: center;
  }

  .page-grid,
  .home-grid,
  .content-grid.two,
  .daemon-connect-grid,
  .resource-grid,
  .machine-grid,
  .grant-grid,
  .diagnostics-grid,
  .workflow-steps,
  .access-team-grid,
  .settings-grid,
  .settings-hero,
  .detail-grid,
  .signature-grid,
  .definition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .object-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .object-row-actions {
    justify-content: flex-start;
  }

  .home-primary {
    grid-column: 1 / -1;
  }

  .hero-card {
    grid-column: span 2;
  }

  .hero-card.wide {
    grid-row: auto;
  }

  .execution-console,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .preview-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .login-screen {
    padding: 22px;
  }

  .login-copy {
    margin-top: 44px;
  }

  .login-copy h1 {
    font-size: 38px;
  }

  .console-shell {
    display: block;
  }

  .workspace {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .sidebar {
    position: static;
    height: auto;
    width: 100%;
    max-width: 100%;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand-lockup.compact {
    width: auto;
    padding: 0;
  }

  .side-nav {
    display: flex;
    margin-top: 0;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    padding: 16px;
  }

  .data-mode-banner {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    padding: 10px 16px;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .list-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .team-switcher {
    width: 100%;
    min-width: 0;
  }

  .topbar-actions .status-pill,
  .topbar-actions .account-chip,
  .topbar-actions .button,
  .topbar-actions .icon-button,
  .list-controls .ghost-button {
    width: 100%;
    white-space: normal;
  }

  .topbar-actions .account-chip {
    border-radius: 14px;
  }

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

  .hero-actions .button {
    width: 100%;
  }

  .page-grid,
  .home-grid,
  .content-grid.two,
  .resource-grid,
  .machine-grid,
  .grant-grid,
  .diagnostics-grid,
  .workflow-steps,
  .access-team-grid,
  .settings-grid,
  .settings-hero,
  .detail-grid,
  .signature-grid,
  .definition-grid,
  .wizard-grid,
  .resource-picker,
  .meta-grid,
  .machine-pair,
  .run-steps,
  .run-step-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .object-row-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-grid,
  .home-grid,
  .content-grid,
  .settings-grid,
  .settings-hero,
  .panel {
    width: auto;
    margin: 14px;
    max-width: none;
  }

  .hero-card {
    grid-column: span 1;
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
  }

  .home-primary {
    grid-column: span 1;
    align-items: flex-start;
    flex-direction: column;
    overflow: hidden;
  }

  .home-primary h2 {
    font-size: 22px;
  }

  .home-primary > div {
    width: 100%;
    max-width: 100%;
  }

  .home-primary .hero-actions {
    width: 100%;
    max-width: 320px;
  }

  .hero-card > div,
  .hero-actions {
    max-width: min(100%, 310px);
  }

  .hero-card h2 {
    width: 100%;
    max-width: 100%;
    font-size: 22px;
    line-height: 1.12;
    overflow-wrap: break-word;
  }

  .panel-head,
  .request-row,
  .settings-issue,
  .member-row,
  .policy-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-score {
    width: 100%;
  }

  .settings-grid,
  .settings-hero {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .settings-grid > .panel,
  .settings-lower-grid > .panel {
    width: 100%;
    max-width: 100%;
  }

  .settings-hero .button-row,
  .settings-card .button-row {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .settings-hero .button-row {
    justify-self: start;
    width: 100%;
    max-width: 320px;
    padding-inline: 0;
    overflow: hidden;
  }

  .settings-hero .button,
  .settings-card .button,
  .settings-card .ghost-button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .settings-list span {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .settings-list strong {
    text-align: left;
  }

  .settings-issue {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-action-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-action-row span {
    justify-self: start;
    white-space: normal;
  }

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