@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --bg: #f8fafc;
  --bg-strong: #eff6ff;
  --bg-panel: rgba(255, 255, 255, 0.75);
  --bg-panel-strong: rgba(255, 255, 255, 0.95);
  --bg-panel-muted: rgba(248, 250, 252, 0.85);
  --bg-sidebar: #0f172a;
  --bg-sidebar-strong: #020617;
  --fg: #0f172a;
  --fg-soft: #475569;
  --fg-faint: #64748b;
  --line: rgba(226, 232, 240, 0.8);
  --line-strong: rgba(203, 213, 225, 0.9);
  --primary: #2563eb;
  --primary-soft: rgba(37, 99, 235, 0.08);
  --accent: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.08);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.08);
  --warning: #ca8a04;
  --warning-soft: rgba(202, 138, 4, 0.08);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --sidebar-width: 270px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--fg);
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(29, 78, 216, 0.1), transparent 32%),
    radial-gradient(circle at bottom right, rgba(14, 165, 164, 0.14), transparent 28%),
    linear-gradient(180deg, #f9fbfe 0%, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.sidebar-open {
  overflow: hidden;
}

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

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

button,
a,
input,
select,
textarea,
summary {
  transition:
    transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

code,
pre {
  font-family: "SFMono-Regular", "Consolas", monospace;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 126, 158, 0.4);
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.app-body,
.auth-body {
  position: relative;
  overflow-x: hidden;
}

.app-ambient,
.auth-ambient {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(95px);
  pointer-events: none;
}

.app-ambient-a,
.auth-ambient-a {
  top: -10rem;
  left: -6rem;
  width: 26rem;
  height: 26rem;
  background: rgba(29, 78, 216, 0.18);
}

.app-ambient-b,
.auth-ambient-b {
  right: -8rem;
  bottom: -9rem;
  width: 32rem;
  height: 32rem;
  background: rgba(14, 165, 164, 0.16);
}

.app-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 100%);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 32px;
  max-width: 1820px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px;
}

.sidebar {
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: calc(100vh - 64px);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, var(--bg-sidebar) 0%, var(--bg-sidebar-strong) 100%);
  color: #f8fafc;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 164, 0.18), transparent 34%),
    radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.2), transparent 36%);
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6 0%, #0d9488 100%);
  color: white;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.6);
}

.brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-copy small,
.sidebar-label,
.nav-link small,
.sidebar-list,
.sidebar-dismiss {
  color: rgba(241, 245, 249, 0.6);
}

.sidebar-dismiss {
  display: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
}

.sidebar-section {
  display: grid;
  gap: 12px;
}

.sidebar-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
}

.nav-link:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.04);
}

.nav-link.is-active {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(13, 148, 136, 0.12)),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-link-title {
  font-weight: 700;
  color: #f8fafc;
}

.sidebar-note {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
}

.sidebar-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  font-size: 0.92rem;
}

.sidebar-list-dark {
  color: var(--fg-soft);
}

.sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: 5;
  border: 0;
  background: rgba(7, 14, 28, 0.46);
  opacity: 0;
  pointer-events: none;
}

.main-shell {
  min-width: 0;
  padding: 8px 0 24px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.topbar-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.nav-toggle:hover {
  transform: translateY(-1px);
}

.nav-toggle-bar {
  position: relative;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nav-toggle-bar::before {
  top: -5px;
}

.nav-toggle-bar::after {
  top: 5px;
}

.page-heading {
  display: grid;
  gap: 6px;
}

.topbar h1 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.topbar-subtitle,
.lead,
.cell-note,
.field-help,
.table-muted {
  color: var(--fg-soft);
}

.topbar-subtitle {
  max-width: 52rem;
  margin: 0;
}

.eyebrow {
  margin: 0;
  color: var(--fg-faint);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lead {
  margin: 12px 0 0;
  max-width: 58rem;
  font-size: 1.02rem;
}

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

.topbar-chip,
.user-pill,
.badge,
.hero-tag,
.panel-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.topbar-chip,
.user-pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.panel-meta {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  color: var(--fg-soft);
}

.main-content {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.hero-card,
.panel,
.metric-card,
.fact-card,
.timeline-card,
.run-list-item,
.failure-card,
.auth-card,
.auth-panel-brand {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}

.hero-card,
.panel,
.auth-card,
.auth-panel-brand {
  padding: 26px;
}

.metric-card,
.fact-card,
.run-list-item,
.failure-card,
.timeline-card,
.preview-card,
.latest-run-card {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.metric-card:hover,
.fact-card:hover,
.run-list-item:hover,
.failure-card:hover,
.timeline-card:hover,
.preview-card:hover,
.latest-run-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.hero-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  background:
    linear-gradient(135deg, rgba(29, 78, 216, 0.09), rgba(14, 165, 164, 0.08)),
    rgba(255, 255, 255, 0.92);
}

.hero-copy {
  min-width: 0;
}

.hero-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
  flex-shrink: 0;
}

.hero-actions-wide {
  min-width: min(100%, 220px);
}

.hero-tags,
.hero-meta,
.step-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 18px;
}

.hero-tag {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(29, 78, 216, 0.1);
  color: var(--fg-soft);
}

.hero-meta {
  margin-top: 18px;
}

.hero-meta span {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--fg-soft);
  font-size: 0.9rem;
}

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

.metric-card,
.fact-card {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.metric-card strong,
.fact-card strong {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
}

.metric-card span,
.fact-card span,
.preview-card span,
.failure-card span {
  color: var(--fg-faint);
}

.tone-default {
  background: rgba(255, 255, 255, 0.94);
}

.tone-running {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.12), rgba(255, 255, 255, 0.96));
  border-color: rgba(29, 78, 216, 0.18);
}

.tone-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(255, 255, 255, 0.96));
  border-color: rgba(34, 197, 94, 0.18);
}

.tone-warning,
.tone-pending,
.tone-inactive {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.96));
  border-color: rgba(245, 158, 11, 0.22);
}

.tone-danger,
.tone-failed {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(255, 255, 255, 0.96));
  border-color: rgba(239, 68, 68, 0.22);
}

.workspace-grid,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.7fr);
  gap: 28px;
}

.workspace-grid-provision {
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.7fr);
}

.stack-column,
.preview-stack,
.action-groups,
.stack-form {
  display: grid;
  gap: 16px;
}

.panel {
  display: grid;
  gap: 16px;
}

.panel-accent {
  background:
    linear-gradient(135deg, rgba(29, 78, 216, 0.06), rgba(14, 165, 164, 0.06)),
    var(--bg-panel);
}

.panel-muted {
  background: var(--bg-panel-muted);
}

.panel-danger {
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.06), rgba(255, 255, 255, 0.92)),
    var(--bg-panel);
}

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

.panel-head,
.panel-head-spread,
.latest-run-row,
.timeline-head,
.timeline-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.run-list {
  display: grid;
  gap: 12px;
}

.run-list-item,
.failure-card,
.preview-card,
.latest-run-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-panel-strong);
}

.run-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.run-list-copy,
.run-list-meta,
.client-copy {
  display: grid;
  gap: 4px;
}

.run-list-meta {
  justify-items: end;
}

.fact-card small,
.metric-card small,
.run-list-meta small,
.client-copy small,
.preview-card strong,
.failure-card p {
  margin: 0;
}

.failure-card p {
  color: var(--fg);
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.detail-list dt {
  color: var(--fg-faint);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-list dd {
  margin: 0;
  font-weight: 600;
}

.detail-break {
  word-break: break-word;
}

.search-form,
.form-grid,
.actions-grid {
  display: grid;
  gap: 14px;
}

.search-form {
  grid-auto-flow: column;
  align-items: center;
}

.search-form input,
.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.search-form input::placeholder,
.field input::placeholder {
  color: var(--fg-faint);
}

.search-form input:focus,
.field input:focus {
  outline: none;
  border-color: rgba(29, 78, 216, 0.28);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.08);
  transform: translateY(-1px);
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 700;
}

.field-error {
  color: var(--danger);
  font-size: 0.88rem;
}

.field-help {
  font-size: 0.88rem;
}

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

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

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

.button-primary {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5a4 100%);
  color: white;
  box-shadow: 0 16px 30px -18px rgba(29, 78, 216, 0.8);
}

.button-primary:hover:not(:disabled) {
  box-shadow: 0 18px 36px -18px rgba(29, 78, 216, 0.9);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--line);
  color: var(--fg);
}

.button-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.22);
  color: #991b1b;
}

.button-block {
  width: 100%;
}

.flash {
  padding: 16px 18px;
  border: 1px solid;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.flash-info {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.18);
}

.flash-warning {
  color: #92400e;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.22);
}

.flash-danger {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--fg-faint);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.data-table tbody tr:hover td {
  background: rgba(248, 251, 255, 0.7);
}

.client-link {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5a4 100%);
  color: white;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  box-shadow: 0 14px 26px -18px rgba(29, 78, 216, 0.9);
}

.table-primary,
.table-link {
  font-weight: 700;
}

.table-link {
  color: var(--primary);
}

.table-link:hover {
  color: #1e40af;
}

.badge {
  border: 1px solid transparent;
}

.badge-warning,
.badge-pending,
.badge-inactive {
  color: var(--warning);
  background: var(--warning-soft);
}

.badge-running {
  color: var(--primary);
  background: var(--primary-soft);
}

.badge-success,
.badge-success-soft {
  color: var(--success);
  background: var(--success-soft);
}

.badge-danger,
.badge-failed {
  color: var(--danger);
  background: var(--danger-soft);
}

.badge-default {
  color: var(--fg-soft);
  background: rgba(148, 163, 184, 0.14);
}

.actions-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.actions-grid-one {
  grid-template-columns: 1fr;
}

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

.action-group {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
}

.action-group-head {
  display: grid;
  gap: 4px;
}

.action-group-head small {
  color: var(--fg-soft);
}

.step-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  font-size: 0.87rem;
  font-weight: 700;
}

.step-pill-pending,
.step-pill-inactive {
  background: var(--warning-soft);
}

.step-pill-running {
  background: var(--primary-soft);
}

.step-pill-success {
  background: var(--success-soft);
}

.step-pill-failed {
  background: var(--danger-soft);
}

.error-copy {
  margin: 0;
  color: var(--danger);
}

.empty-state {
  padding: 28px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  color: var(--fg-soft);
  text-align: center;
  background: rgba(255, 255, 255, 0.56);
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-step {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 16px;
}

.timeline-rail {
  position: relative;
}

.timeline-rail::before,
.timeline-rail::after {
  content: "";
  position: absolute;
  left: 9px;
}

.timeline-rail::before {
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(148, 163, 184, 0.34);
}

.timeline-rail::after {
  top: 28px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--fg);
  transform: translateX(-4px);
}

.timeline-step-running .timeline-rail::after {
  background: var(--primary);
}

.timeline-step-success .timeline-rail::after {
  background: var(--success);
}

.timeline-step-failed .timeline-rail::after {
  background: var(--danger);
}

.timeline-card {
  padding: 22px;
}

.timeline-meta {
  color: var(--fg-soft);
  font-size: 0.92rem;
}

.log-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(8, 15, 28, 0.03);
}

.log-box summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  list-style: none;
}

.log-box summary::-webkit-details-marker {
  display: none;
}

.log-box pre {
  margin: 0;
  padding: 0 16px 16px;
  overflow: auto;
  white-space: pre-wrap;
  color: #ebf2ff;
  background: #0f1b2d;
}

.preview-card strong,
.log-box pre,
.detail-break {
  word-break: break-word;
}

.step-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--fg-soft);
}

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(14, 165, 164, 0.18), transparent 24%),
    linear-gradient(160deg, #081120 0%, #0f1d34 52%, #162847 100%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  min-height: 100vh;
  padding: 28px;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-panel-brand {
  position: relative;
  overflow: hidden;
  color: #eff6ff;
  background:
    linear-gradient(180deg, rgba(10, 20, 38, 0.74) 0%, rgba(18, 39, 73, 0.86) 100%);
}

.auth-panel-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 100%);
}

.auth-brand-copy,
.auth-card {
  position: relative;
  z-index: 1;
}

.auth-brand-copy {
  max-width: 42rem;
}

.auth-brand-copy .lead,
.auth-panel-brand .eyebrow {
  color: rgba(233, 242, 255, 0.76);
}

.auth-panel-brand h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  max-width: 12ch;
}

.auth-stats {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.mini-card {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.auth-panel-form {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(460px, 100%);
  background: rgba(8, 17, 32, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
}

.auth-card-head {
  display: grid;
  gap: 6px;
}

.auth-copy {
  margin: 0;
  color: rgba(232, 241, 253, 0.66);
}

.auth-card .eyebrow,
.auth-card h2,
.auth-card .field span {
  color: #f8fbff;
}

.auth-card .field input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f8fbff;
}

.auth-card .field input::placeholder {
  color: rgba(232, 241, 253, 0.34);
}

.auth-card .field input:focus {
  border-color: rgba(45, 212, 191, 0.3);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
}

@media (max-width: 1320px) {
  .metrics-grid,
  .facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-grid,
  .workspace-grid-provision,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .sidebar {
    position: fixed;
    top: 16px;
    left: 16px;
    bottom: 16px;
    width: min(calc(100vw - 32px), 360px);
    height: auto;
    z-index: 10;
    transform: translateX(calc(-100% - 18px));
  }

  .sidebar-dismiss,
  .nav-toggle {
    display: inline-flex;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar {
    flex-direction: column;
  }

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

  .auth-shell {
    grid-template-columns: 1fr;
    padding: 20px;
  }
}

@media (max-width: 760px) {
  .hero-card,
  .latest-run-row,
  .timeline-head,
  .timeline-meta,
  .form-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    width: 100%;
    justify-items: stretch;
  }

  .metrics-grid,
  .facts-grid,
  .form-grid,
  .actions-grid,
  .actions-grid-two {
    grid-template-columns: 1fr;
  }

  .search-form {
    grid-auto-flow: row;
  }

  .topbar h1 {
    font-size: clamp(1.8rem, 9vw, 2.4rem);
  }

  .panel,
  .hero-card,
  .auth-card,
  .auth-panel-brand {
    padding: 20px;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table th,
  .data-table td,
  .data-table tr {
    display: block;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }

  .data-table tbody {
    display: grid;
    gap: 14px;
  }

  .data-table tr {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
  }

  .data-table td {
    display: grid;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(132, 154, 184, 0.12);
  }

  .data-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .data-table td::before {
    content: attr(data-label);
    color: var(--fg-faint);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .client-link {
    align-items: flex-start;
  }

  .timeline-step {
    grid-template-columns: 1fr;
  }

  .timeline-rail {
    display: none;
  }

  .auth-panel {
    padding: 0;
  }

  .auth-panel-brand h1 {
    max-width: none;
    font-size: clamp(2rem, 12vw, 3rem);
  }
}

@media (max-width: 560px) {
  .topbar-actions,
  .hero-tags,
  .hero-meta,
  .step-pills {
    width: 100%;
  }

  .topbar-actions > *,
  .hero-tags > *,
  .step-pills > * {
    max-width: 100%;
  }

  .run-list-item {
    flex-direction: column;
  }

  .run-list-meta {
    justify-items: start;
  }

  .auth-shell {
    padding: 14px;
  }
}
