:root {
  --bg: #0b1020;
  --bg-strong: #0f1728;
  --bg-elevated: #12192b;
  --bg-soft: #182235;
  --bg-muted: #1d2940;
  --border: #27324a;
  --border-soft: rgba(166, 178, 200, 0.18);
  --border-strong: rgba(166, 178, 200, 0.28);
  --text: #f3f7fc;
  --text-muted: #a6b2c8;
  --text-soft: #7f8ca6;
  --primary: #3b82f6;
  --primary-strong: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.14);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.16);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.16);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.16);
  --shadow-lg: 0 24px 60px rgba(2, 6, 23, 0.36);
  --shadow-md: 0 16px 40px rgba(2, 6, 23, 0.28);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --font-heading: "Plus Jakarta Sans", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --transition-fast: 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background-color: #09111f;
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #09111f;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 22%),
    linear-gradient(180deg, #09111f 0%, var(--bg) 42%, #09111c 100%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.auth-body {
  overflow-x: hidden;
}

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

button,
input,
select,
textarea,
.run-tab,
.nav-link {
  min-height: 44px;
}

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

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

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: rgba(59, 130, 246, 0.3);
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(127, 140, 166, 0.38);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.app-root {
  min-height: 100vh;
  background: transparent;
}

.section-kicker,
.eyebrow,
.label,
.inline-field > span,
.field > span,
.stack-form span {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-copy,
.muted-copy,
.empty-copy {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.panel {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(18, 25, 43, 0.94), rgba(15, 23, 40, 0.94));
  box-shadow: var(--shadow-md);
}

.card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(24, 34, 53, 0.84);
}

.btn,
.btn-secondary,
.btn-ghost,
.primary-button,
.secondary-button,
.topbar__logout,
.run-tab,
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-radius: 999px;
  padding: 0 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn,
.primary-button {
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: #eff6ff;
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.25);
  font-weight: 700;
}

.btn:hover,
.primary-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #4f8df6, #7ab8ff);
}

.btn-secondary,
.secondary-button,
.run-tab,
.nav-link {
  border-color: var(--border-soft);
  background: rgba(24, 34, 53, 0.82);
  color: var(--text-muted);
}

.btn-secondary:hover,
.secondary-button:hover,
.run-tab:hover,
.nav-link:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(29, 41, 64, 0.92);
}

.btn-ghost,
.topbar__logout {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover,
.topbar__logout:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.primary-button,
.secondary-button {
  min-height: 46px;
  font-size: 14px;
  font-weight: 700;
}

.secondary-button--full,
.primary-button--full {
  width: 100%;
}

.secondary-button.is-disabled,
.secondary-button:disabled,
.primary-button:disabled,
.btn:disabled,
.btn-secondary:disabled,
.run-tab:disabled {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

.secondary-button.is-disabled {
  pointer-events: none;
}

.button-spinner {
  width: 14px;
  height: 14px;
  display: none;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

.primary-button.is-loading .button-spinner {
  display: inline-block;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  min-height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: rgba(11, 16, 32, 0.72);
  padding: 0 14px;
  color: var(--text);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

textarea {
  min-height: 112px;
  resize: vertical;
  padding: 12px 14px;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
    linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

input::placeholder,
textarea::placeholder {
  color: #6f7d99;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.run-tab:focus-visible,
.nav-link:focus-visible,
.secondary-button:focus-visible,
.primary-button:focus-visible,
.topbar__logout:focus-visible {
  outline: 0;
  border-color: rgba(96, 165, 250, 0.74);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.24);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(24, 34, 53, 0.92);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.badge.ok {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(34, 197, 94, 0.28);
}

.badge.running {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: rgba(245, 158, 11, 0.28);
}

.badge.error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.28);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.form-message {
  display: none;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.form-message.show {
  display: block;
}

.form-message--error {
  background: var(--danger-soft);
  border: 1px solid rgba(239, 68, 68, 0.24);
  color: #fdb7b7;
}

.form-message--info {
  display: block;
  background: var(--primary-soft);
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: #dbeafe;
}

.icon-chip {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-soft);
  border: 1px solid rgba(96, 165, 250, 0.24);
  color: #93c5fd;
  flex-shrink: 0;
}

.icon-svg {
  width: 18px;
  height: 18px;
}

.auth-page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: calc(100vh - 32px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--space-8);
  align-items: start;
  padding: var(--space-8) 0;
}

.auth-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: var(--space-10);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(96, 165, 250, 0.12);
  background:
    linear-gradient(180deg, rgba(18, 25, 43, 0.9), rgba(11, 16, 32, 0.86)),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 34%);
  min-height: 100%;
  overflow: clip;
}

.auth-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(147, 197, 253, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 197, 253, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.45;
  pointer-events: none;
}

.auth-showcase__content,
.auth-showcase__footer {
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 44px;
}

.auth-brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: #eff6ff;
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.22);
}

.auth-brand__name {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-showcase h1 {
  max-width: 10ch;
  margin-bottom: 18px;
  font-family: var(--font-heading);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.auth-showcase p {
  max-width: 56ch;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

.auth-proof-list {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-proof-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(24, 34, 53, 0.82);
  color: var(--text-muted);
  font-size: 13px;
}

.auth-showcase__footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-proof-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(24, 34, 53, 0.74);
}

.auth-proof-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 14px;
}

.auth-proof-card p {
  font-size: 12px;
  color: var(--text-soft);
  max-width: none;
  line-height: 1.55;
}

.auth-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100%;
}

.auth-panel__card {
  width: min(100%, 520px);
  padding: 34px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(18, 25, 43, 0.96), rgba(11, 16, 32, 0.96));
  box-shadow: var(--shadow-lg);
}

.auth-panel__header {
  margin-bottom: 24px;
}

.auth-panel__header h1 {
  margin-bottom: 10px;
  font-family: var(--font-heading);
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.auth-panel__header p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

.auth-form-stack,
.register-form {
  display: grid;
  gap: 16px;
}

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

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

.auth-helper {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.auth-helper + .auth-helper {
  margin-top: 10px;
}

.auth-helper a {
  color: #93c5fd;
  font-weight: 600;
}

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

.field label {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.input-wrap {
  position: relative;
}

.eye-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--text-soft);
  cursor: pointer;
}

.strength-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.strength-seg {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.strength-seg.weak {
  background: var(--danger);
}

.strength-seg.medium {
  background: var(--warning);
}

.strength-seg.strong {
  background: var(--success);
}

.strength-label,
.errorlist {
  color: var(--text-soft);
  font-size: 12px;
}

.errorlist {
  margin: 0;
  padding-left: 18px;
  color: #fdb7b7;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.terms-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 4px;
  accent-color: var(--primary);
}

.terms-text {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.terms-text a {
  color: #93c5fd;
}

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

.dashboard-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 24px 20px;
  border-right: 1px solid var(--border-soft);
  background: rgba(9, 17, 31, 0.86);
  backdrop-filter: blur(20px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.sidebar-brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: #eff6ff;
}

.sidebar-brand__copy strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: -0.03em;
}

.sidebar-brand__copy span {
  color: var(--text-soft);
  font-size: 12px;
}

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

.nav-link {
  justify-content: flex-start;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}

.nav-link.is-active {
  background: var(--primary-soft);
  border-color: rgba(96, 165, 250, 0.3);
  color: #bfdbfe;
}

.sidebar-meta {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.sidebar-meta .panel {
  padding: 16px;
}

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

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar__user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(24, 34, 53, 0.82);
}

.topbar__avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: #bfdbfe;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar__username {
  font-size: 14px;
  font-weight: 600;
}

.inline-field {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.dashboard-content {
  display: grid;
  gap: 20px;
}

.overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 18px;
  padding: 28px;
}

.overview-hero h1 {
  margin: 10px 0 12px;
  max-width: 15ch;
  font-family: var(--font-heading);
  font-size: clamp(34px, 4.3vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.overview-hero__actions {
  display: grid;
  gap: 12px;
  align-content: start;
}

.overview-hero__metric {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(24, 34, 53, 0.72);
}

.overview-hero__metric strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  font-family: var(--font-heading);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 20px;
}

.workbench-card,
.run-detail,
.history-panel,
.submission-panel,
.result-panel {
  padding: 24px;
}

.analysis-workbench,
.submission-form,
.stack-form {
  display: grid;
  gap: 16px;
}

.source-toggle,
.profile-segment,
.run-tabs {
  display: inline-grid;
  gap: 8px;
}

.source-toggle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(11, 16, 32, 0.72);
}

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

.source-toggle__btn,
.profile-segment__btn {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.source-toggle__btn.is-active,
.profile-segment__btn.is-active {
  background: var(--primary-soft);
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.24);
}

.dropzone {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 18px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(96, 165, 250, 0.34);
  background: rgba(59, 130, 246, 0.08);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.dropzone:hover,
.dropzone.is-over {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(147, 197, 253, 0.6);
}

.dropzone__icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
  font-size: 18px;
  font-weight: 700;
}

.dropzone__text {
  font-weight: 600;
}

.dropzone__action {
  color: var(--text-soft);
  font-size: 13px;
}

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

.feature-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.feature-list li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #93c5fd;
}

.run-detail {
  display: grid;
  gap: 18px;
}

.run-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.run-header h2 {
  margin: 8px 0 10px;
  font-family: var(--font-heading);
  font-size: 28px;
  letter-spacing: -0.04em;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.run-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.run-tab {
  min-height: 42px;
  font-size: 14px;
  font-weight: 700;
}

.run-tab.is-active {
  background: var(--primary-soft);
  border-color: rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
}

.run-tab-hint {
  margin-top: -8px;
}

.run-panel {
  display: grid;
  gap: 18px;
}

.run-panel[hidden] {
  display: none !important;
}

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

.summary-card,
.ops-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(24, 34, 53, 0.82);
}

.summary-card span {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-heading);
  font-size: 20px;
  letter-spacing: -0.03em;
}

.recommendations {
  display: grid;
  gap: 10px;
}

.recommendation {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.26);
  background: rgba(245, 158, 11, 0.12);
  color: #fcd68a;
}

.ops-card {
  display: grid;
  gap: 12px;
}

.ops-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ops-card__head h3 {
  margin-top: 8px;
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: -0.03em;
}

.ops-card__phase-num {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  color: #bfdbfe;
  font-family: var(--font-mono);
  font-size: 13px;
}

.editor-shell {
  display: grid;
  gap: 14px;
}

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

.artifact-tab {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(24, 34, 53, 0.82);
  color: var(--text-muted);
  cursor: pointer;
}

.artifact-tab.is-active {
  background: var(--primary-soft);
  border-color: rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
}

.artifact-editors {
  display: grid;
  gap: 14px;
}

.editor-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(24, 34, 53, 0.82);
}

.editor-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.editor-card__path {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #93c5fd;
}

.editor-card__surface {
  height: 420px;
  background: #0b1020;
}

.editor-card__raw {
  display: none;
}

.log-view {
  margin: 0;
  max-height: 18rem;
  overflow: auto;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: rgba(8, 12, 24, 0.86);
  color: #bfdbfe;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.preview-links,
.diff-results,
.history-list {
  display: grid;
  gap: 10px;
}

.diff-entry {
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: rgba(11, 16, 32, 0.72);
}

.diff-entry summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.diff-entry summary::-webkit-details-marker {
  display: none;
}

.diff-entry__path {
  color: #93c5fd;
  font-family: var(--font-mono);
  font-size: 12px;
}

.history-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: rgba(24, 34, 53, 0.72);
  text-align: left;
}

.history-item.is-active {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(59, 130, 246, 0.12);
}

.history-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--text-soft);
  flex-shrink: 0;
}

.history-item__dot--ok {
  background: var(--success);
}

.history-item__dot--error {
  background: var(--danger);
}

.history-item__dot--running {
  background: var(--warning);
}

.history-item__body {
  min-width: 0;
  flex: 1;
}

.history-item__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.history-item__meta {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 12px;
}

.history-item__badge {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 11px;
}

.history-item__badge--ok {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(34, 197, 94, 0.24);
}

.history-item__badge--error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.24);
}

.history-item__badge--running {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: rgba(245, 158, 11, 0.24);
}

.history-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subsection-head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-pagination[hidden],
.history-more-button[hidden] {
  display: none !important;
}

.checkbox-field {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--primary);
}

.auth-body .shell {
  width: 100%;
}

.shell {
  width: min(1480px, 100%);
  margin: 0 auto;
}

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

@media (max-width: 1279px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-showcase__footer,
  .summary-grid,
  .ops-grid,
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .overview-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1023px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .sidebar-nav {
    grid-auto-flow: column;
    grid-auto-columns: minmax(160px, 1fr);
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .dashboard-topbar,
  .run-header {
    flex-direction: column;
    align-items: stretch;
  }

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

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

@media (max-width: 767px) {
  .auth-page {
    width: min(100%, calc(100% - 24px));
    padding: 16px 0;
  }

  .auth-showcase {
    display: none;
  }

  .auth-panel__card,
  .overview-hero,
  .workbench-card,
  .run-detail,
  .history-panel {
    padding: 20px;
  }

  .auth-form-grid--two,
  .summary-grid,
  .ops-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-main {
    padding: 16px;
  }

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

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

  .editor-card__surface {
    height: 320px;
  }
}

@media (max-width: 479px) {
  .auth-page {
    width: min(100%, calc(100% - 16px));
  }

  .auth-panel__card,
  .overview-hero,
  .workbench-card,
  .run-detail,
  .history-panel {
    padding: 18px;
  }

  .result-actions,
  .run-tabs,
  .source-toggle,
  .profile-segment {
    grid-template-columns: 1fr;
  }

  .sidebar-nav {
    grid-auto-columns: minmax(140px, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
