:root {
  --bg: #f4f1eb;
  --bg-accent: #fdfbf7;
  --card: rgba(255, 255, 255, 0.9);
  --ink: #172033;
  --muted: #64708b;
  --line: #dde4ef;
  --brand: #215bdb;
  --brand-deep: #173e98;
  --brand-soft: #e7efff;
  --success-soft: #edf8ef;
  --success-ink: #23653a;
  --error-soft: #fff1ef;
  --error-ink: #8d2c1b;
  --shadow: 0 28px 64px rgba(23, 32, 51, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(
      circle at top left,
      rgba(33, 91, 219, 0.14),
      transparent 28%
    ),
    radial-gradient(
      circle at top right,
      rgba(19, 62, 152, 0.08),
      transparent 30%
    ),
    linear-gradient(180deg, #fbfaf7 0%, var(--bg) 100%);
  font-family: "Manrope", "Avenir Next", "Segoe UI Variable", sans-serif;
}

.demo-app {
  min-height: 100vh;
  padding: 48px 20px;
}

.screen {
  min-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.shell-card {
  width: min(100%, 980px);
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 42px;
}

.login-card {
  width: min(100%, 760px);
  max-width: 760px;
  padding: 52px 56px;
}

.brand-mark {
  display: inline-flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 24px;
}

.brand-mark span {
  width: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4d7dff, #204bbd);
}

.brand-mark span:nth-child(1),
.brand-mark span:nth-child(5) {
  height: 40px;
}

.brand-mark span:nth-child(2),
.brand-mark span:nth-child(4) {
  height: 68px;
}

.brand-mark span:nth-child(3) {
  height: 54px;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  font-family: "Sora", "Avenir Next", "Segoe UI Variable", sans-serif;
  letter-spacing: -0.04em;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(3rem, 6vw, 4.8rem);
  font-weight: 800;
}

.lede,
.workspace-subtitle,
.panel-copy p,
.status-body,
.footnote,
.microcopy {
  color: var(--muted);
}

.form-label {
  font-weight: 700;
  color: #33405b;
}

.form-control {
  min-height: 64px;
  border-radius: 18px;
  border: 1px solid #b3c0d8;
  box-shadow: none;
  font-size: 1.08rem;
}

.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.24rem rgba(33, 91, 219, 0.14);
}

.form-hint {
  color: var(--brand);
  font-size: 0.94rem;
}

.btn-brand {
  border: 0;
  color: white;
  background: linear-gradient(135deg, #215bdb 0%, #2d6bf0 55%, #173e98 100%);
  border-radius: 18px;
  padding-inline: 28px;
  min-height: 60px;
  font-weight: 800;
  box-shadow: 0 20px 34px rgba(33, 91, 219, 0.22);
}

.btn-brand:hover,
.btn-brand:focus {
  color: white;
  background: linear-gradient(135deg, #194fcb 0%, #2661dd 55%, #143680 100%);
}

.btn-outline-brand {
  border-radius: 18px;
  border: 1px solid rgba(33, 91, 219, 0.28);
  color: var(--brand-deep);
  background: rgba(255, 255, 255, 0.86);
  min-height: 56px;
  font-weight: 700;
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-color: rgba(33, 91, 219, 0.4);
}

.workspace-header {
  width: min(100%, 980px);
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.workspace-header > div {
  max-width: 760px;
}

.workspace-title {
  margin: 0 auto;
  max-width: 760px;
  font-size: clamp(2.25rem, 4.2vw, 3.6rem);
  font-weight: 800;
}

.workspace-subtitle {
  max-width: 700px;
  margin-inline: auto;
}

.local-badge,
.elapsed-pill,
.result-label-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.local-badge {
  white-space: nowrap;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(33, 91, 219, 0.18);
  color: var(--brand-deep);
}

.stepper-wrap {
  width: min(100%, 980px);
  margin: 0 auto 20px;
}

.demo-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8895ac;
}

.step.is-active,
.step.is-complete {
  color: var(--ink);
}

.step-index {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid #cfd8e8;
  background: rgba(255, 255, 255, 0.8);
  font-weight: 800;
}

.step.is-active .step-index,
.step.is-complete .step-index {
  border-color: var(--brand);
  color: var(--brand-deep);
  box-shadow: 0 12px 24px rgba(33, 91, 219, 0.16);
}

.step-line {
  flex: 0 0 110px;
  height: 2px;
  background: #dce3ee;
}

.step-label {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.panel-active {
  display: block;
}

.panel-copy {
  text-align: center;
  margin-bottom: 26px;
}

.panel-copy h3 {
  margin: 0 0 10px;
  max-width: 760px;
  margin-inline: auto;
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  font-weight: 800;
}

.panel-copy p {
  margin: 0;
  font-size: 1.16rem;
}

.content-type-wrap {
  max-width: 420px;
  margin: 0 auto 24px;
}

.form-select {
  min-height: 64px;
  border-radius: 18px;
  border: 1px solid #b3c0d8;
  box-shadow: none;
  font-size: 1.08rem;
}

.form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.24rem rgba(33, 91, 219, 0.14);
}

.upload-zone {
  border: 2px dashed #d4dded;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.72);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.upload-zone.is-dragover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(33, 91, 219, 0.12);
}

.upload-inner {
  max-width: 620px;
  text-align: center;
}

.upload-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: linear-gradient(
    180deg,
    rgba(33, 91, 219, 0.11),
    rgba(33, 91, 219, 0.04)
  );
}

.upload-icon svg {
  width: 42px;
  height: 42px;
}

.upload-inner h4 {
  margin: 0 0 10px;
  font-size: 2rem;
  font-weight: 800;
}

.upload-inner p {
  color: var(--muted);
  margin-bottom: 24px;
}

.selected-file {
  margin-top: 20px;
  padding: 18px 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(33, 91, 219, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.selected-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selected-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  word-break: break-word;
}

.cta-row {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.microcopy {
  max-width: 520px;
  font-size: 0.95rem;
}

.progress-shell {
  padding: 24px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(33, 91, 219, 0.12);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-weight: 800;
}

.modern-progress {
  height: 16px;
  background: #e5ebf3;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, #215bdb 0%, #4c7dff 48%, #214bbd 100%);
}

.status-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.status-card {
  min-height: 220px;
  padding: 22px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(33, 91, 219, 0.12);
}

.status-title {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.activity-log {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-log li {
  position: relative;
  padding-left: 18px;
  color: #3c4862;
}

.activity-log li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #215bdb, #4d7dff);
}

.elapsed-pill {
  margin-top: 18px;
  padding: 10px 14px;
  width: fit-content;
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.result-summary {
  padding: 24px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(33, 91, 219, 0.12);
}

.result-summary-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.result-label-pill {
  padding: 10px 14px;
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.result-counts {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.count-pill {
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 800;
}

.count-pill.high {
  background: #fde7e4;
  color: #8f2012;
}

.count-pill.medium {
  background: #fff0db;
  color: #9b5300;
}

.count-pill.low {
  background: #e9f0ff;
  color: #244d9d;
}

.count-pill.clean {
  background: var(--success-soft);
  color: var(--success-ink);
}

.result-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.runs-card {
  margin-top: 28px;
}

.runs-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.runs-head h3 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
  font-weight: 800;
}

.runs-toolbar {
  max-width: 420px;
  margin-bottom: 18px;
}

.runs-summary {
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 700;
}

.runs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.run-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(33, 91, 219, 0.12);
}

.run-title-line,
.run-meta,
.run-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.run-title-line {
  margin-bottom: 6px;
}

.run-client {
  font-weight: 900;
  color: var(--ink);
}

.run-doc {
  margin-bottom: 8px;
  color: #2f3a53;
  font-weight: 800;
  word-break: break-word;
}

.run-meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.run-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 10px;
  color: #a5afc1;
}

.run-status,
.run-action,
.run-muted {
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.run-status {
  padding: 6px 10px;
}

.run-status.complete {
  background: var(--success-soft);
  color: var(--success-ink);
}

.run-status.active {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.run-status.failed {
  background: var(--error-soft);
  color: var(--error-ink);
}

.run-actions {
  justify-content: flex-end;
}

.run-action {
  border: 1px solid rgba(33, 91, 219, 0.18);
  padding: 8px 12px;
  color: var(--brand-deep);
  background: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

button.run-action {
  cursor: pointer;
}

.run-action:hover,
.run-action:focus {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

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

.is-error .result-label-pill,
.is-error .elapsed-pill {
  background: var(--error-soft);
  color: var(--error-ink);
}

@media (max-width: 991px) {
  .workspace-header,
  .stepper-wrap,
  .shell-card {
    width: 100%;
  }

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

  .step-label {
    font-size: 1.4rem;
  }

  .step-line {
    flex-basis: 46px;
  }

  .shell-card {
    padding: 28px;
  }
}

@media (max-width: 767px) {
  .demo-app {
    padding: 24px 14px;
  }

  .workspace-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .demo-stepper {
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .step-label {
    font-size: 1.05rem;
  }

  .login-card {
    padding: 32px 24px;
  }

  .upload-zone {
    min-height: 300px;
  }

  .selected-file,
  .result-summary-head,
  .cta-row,
  .result-actions,
  .runs-head,
  .run-row,
  .run-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .run-row {
    display: flex;
  }
}
