:root {
  color-scheme: dark;
  --bg: #091018;
  --bg-soft: #111a24;
  --bg-card: rgba(16, 24, 34, 0.82);
  --bg-strong: #182434;
  --text: #f4f7fb;
  --muted: #9dafc4;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #7be3c0;
  --accent-strong: #b8ffe4;
  --accent-deep: #1d6f5a;
  --danger: #ff9f9f;
  --warning: #ffd489;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  --radius: 8px;
  --max: 1220px;
  --heading: "Aptos Display", "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Aptos", "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--body);
  background:
    radial-gradient(circle at 10% 10%, rgba(123, 227, 192, 0.16), transparent 22%),
    radial-gradient(circle at 88% 14%, rgba(123, 173, 227, 0.14), transparent 24%),
    linear-gradient(180deg, #081017 0%, #0a1118 48%, #0b131c 100%);
  color: var(--text);
}

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

button,
input {
  font: inherit;
}

.ambient {
  position: fixed;
  inset: auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.45;
  z-index: 0;
}

.ambient-a {
  top: -80px;
  right: -80px;
  background: rgba(123, 227, 192, 0.18);
}

.ambient-b {
  bottom: -120px;
  left: -80px;
  background: rgba(91, 129, 255, 0.14);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 20px 14px 48px;
}

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

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

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.brand-dot {
  position: absolute;
  inset: 8px 0 0 8px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  box-shadow: 0 12px 24px rgba(123, 227, 192, 0.22);
}

.brand-dot-soft {
  inset: 0 10px 10px 0;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
}

h1,
h2,
h3,
strong {
  font-family: var(--heading);
}

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

h1 {
  font-size: clamp(28px, 5vw, 40px);
}

h2 {
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.08;
}

h3 {
  font-size: 17px;
}

p {
  margin: 0;
}

.topbar-chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 18px;
}

.panel-center {
  width: min(100%, 460px);
}

.panel-auth {
  margin-left: auto;
}

.login-shell {
  display: grid;
  grid-template-columns: 1.1fr minmax(320px, 430px);
  gap: 16px;
  align-items: stretch;
  min-height: calc(100vh - 140px);
}

.login-story {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
}

.lede,
.section-copy,
.panel-copy p:last-child,
.feature-row p,
.guide-step p,
.helper-note,
.meta-line,
small {
  color: var(--muted);
  line-height: 1.5;
}

.feature-stack,
.guide-steps,
.detail-stack,
.run-list,
.property-list {
  display: grid;
  gap: 12px;
}

.feature-row,
.guide-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-row strong,
.guide-step span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(123, 227, 192, 0.12);
  color: var(--accent-strong);
  font-size: 13px;
}

.hero-panel {
  margin-bottom: 14px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: 14px;
  align-items: stretch;
}

.hero-copy {
  display: grid;
  gap: 12px;
}

.hero-tags,
.preset-strip,
.amenity-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.micro-tag,
.mini-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 12px;
}

.metric-group {
  display: grid;
  gap: 10px;
}

.metric-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(123, 227, 192, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-card small {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
}

.metric-card span {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 800;
}

.metric-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.live-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.notice {
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}

.notice.info {
  background: rgba(123, 227, 192, 0.1);
  border-color: rgba(123, 227, 192, 0.16);
}

.notice.error {
  background: rgba(255, 159, 159, 0.12);
  border-color: rgba(255, 159, 159, 0.2);
  padding: 12px 14px;
  color: #ffdada;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(123, 227, 192, 0.45);
  animation: pulse 1.7s infinite;
}

.pulse-dot.idle {
  background: rgba(255, 255, 255, 0.22);
  animation: none;
}

.queue-chip {
  min-height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.three-zone {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(250px, 0.72fr);
  gap: 14px;
  align-items: start;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
  gap: 14px;
}

.detail-layout {
  align-items: start;
}

.section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

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

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

.field-wide {
  grid-column: 1 / -1;
}

.field-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.field-card span {
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

input:focus {
  outline: none;
  border-color: rgba(123, 227, 192, 0.5);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

button,
.primary-button,
.secondary-button,
.ghost-button,
.preset-chip {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

button:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.preset-chip:hover {
  transform: translateY(-1px);
}

button:disabled,
.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

button,
.primary-button {
  border: 0;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #082a21;
  font-weight: 800;
}

.secondary-button {
  border: 1px solid rgba(123, 227, 192, 0.18);
  background: rgba(123, 227, 192, 0.12);
  color: var(--accent-strong);
}

.ghost-button,
.preset-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.preset-chip {
  min-height: 38px;
  font-size: 13px;
  font-weight: 700;
}

.composer-footer {
  display: grid;
  gap: 12px;
}

.helper-note {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

code {
  font-family: Consolas, monospace;
  font-size: 12px;
}

.run-card,
.property-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.run-folder {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-weight: 700;
}

.status-pill {
  flex: 0 0 auto;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill.queued {
  background: rgba(255, 212, 137, 0.14);
  color: #ffe6ae;
}

.status-pill.running,
.status-pill.completed {
  background: rgba(123, 227, 192, 0.16);
  color: var(--accent-strong);
}

.status-pill.failed {
  background: rgba(255, 159, 159, 0.14);
  color: #ffdada;
}

.run-actions {
  flex-wrap: wrap;
}

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

.summary-tile {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 4px;
}

.summary-tile small {
  text-transform: uppercase;
  font-size: 11px;
}

.summary-tile strong {
  font-size: 20px;
}

.caption-preview {
  white-space: pre-wrap;
  padding: 14px;
  border-radius: 8px;
  background: #0a1016;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #def4ec;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.detail-row {
  display: grid;
  gap: 6px;
}

.empty-state {
  min-height: 140px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--muted);
  padding: 20px;
}

.failure-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(123, 227, 192, 0.4);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(123, 227, 192, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(123, 227, 192, 0);
  }
}

@media (max-width: 1080px) {
  .three-zone,
  .two-column,
  .hero-grid,
  .login-shell {
    grid-template-columns: 1fr;
  }

  .panel-auth {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 16px 12px 36px;
  }

  .topbar,
  .run-card-head,
  .property-head,
  .live-notice {
    flex-direction: column;
  }

  .field-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .metric-group {
    grid-template-columns: 1fr;
  }

  .panel,
  .field-card,
  .run-card,
  .property-card {
    padding: 14px;
  }

  .composer-footer {
    position: sticky;
    bottom: 12px;
    background: linear-gradient(180deg, rgba(9, 16, 24, 0.2), rgba(9, 16, 24, 0.95));
    padding-top: 6px;
  }
}
