:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #111111;
  --panel-2: #171717;
  --line: #4f0b0b;
  --line-strong: #bd1d1d;
  --text: #f5f5f5;
  --muted: #b2a8a8;
  --danger: #ff4d4d;
  --success: #70d48b;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(189, 29, 29, 0.18), transparent 32%),
    linear-gradient(180deg, #090909 0%, #020202 100%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

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

.screen {
  width: min(1080px, calc(100vw - 2rem));
  margin: 0 auto;
}

.screen-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(420px, 100%);
}

.app-shell {
  padding: 2rem 0 3rem;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.topbar h1,
.card h2,
.job-row h3 {
  margin: 0;
}

.topbar p,
.job-row p,
.empty-state,
.status-caption,
.status-row p {
  color: var(--muted);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.cuewave-shell {
  display: grid;
  gap: 1rem;
}

.cuewave-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 211, 92, 0.24);
  background: rgba(255, 211, 92, 0.08);
  color: #ffd35c;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cuewave-copy h2 {
  margin: 0.8rem 0 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.hero-text {
  margin: 1rem 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.cuewave-meta,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cuewave-meta {
  margin-top: 1rem;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.92rem;
}

.meta-warning {
  color: #ffd4d4;
}

.hero-actions {
  margin-top: 1.2rem;
}

.cuewave-visual {
  display: flex;
  justify-content: center;
}

.app-icon-preview {
  width: min(320px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.52);
}

.cuewave-showcase,
.cuewave-grid {
  display: grid;
  gap: 1rem;
}

.cuewave-showcase {
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
}

.cuewave-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.showcase-wide,
.showcase-column {
  overflow: hidden;
}

.showcase-image,
.showcase-logo {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.showcase-logo {
  max-width: 100%;
}

.showcase-note {
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.feature-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  display: grid;
  gap: 0.75rem;
  line-height: 1.6;
}

.ordered-list {
  padding-left: 1.35rem;
}

.portal-footer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portal-footer-copy p {
  margin-bottom: 0;
  color: var(--muted);
}

.card {
  background: linear-gradient(180deg, rgba(27, 27, 27, 0.96), rgba(11, 11, 11, 0.96));
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.stack {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field span,
.checkbox span {
  font-size: 0.95rem;
}

.form-note {
  margin: -0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
select,
button {
  font: inherit;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="file"],
select {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  border: 1px solid #2d2d2d;
  background: var(--panel-2);
  color: var(--text);
}

input:focus,
select:focus {
  outline: 2px solid rgba(189, 29, 29, 0.45);
  border-color: var(--line-strong);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: var(--muted);
}

.checkbox input {
  margin-top: 0.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #d62828 0%, #9f1212 100%);
  color: white;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

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

.button:active {
  transform: translateY(0);
}

.button-ghost {
  background: transparent;
  border: 1px solid #4a4a4a;
}

.button-danger {
  background: linear-gradient(180deg, #7d0f0f 0%, #520909 100%);
}

.alert {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
}

.alert-error {
  background: rgba(125, 15, 15, 0.2);
  border-color: rgba(255, 77, 77, 0.45);
  color: #ffd7d7;
}

.alert-success {
  background: rgba(17, 91, 35, 0.24);
  border-color: rgba(112, 212, 139, 0.45);
  color: #d8ffdf;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.status-list {
  display: grid;
  gap: 0.75rem;
}

.status-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.status-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.status-row strong {
  display: block;
  margin-bottom: 0.2rem;
}

.status-row p {
  margin: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid transparent;
}

.status-badge-ok {
  background: rgba(17, 91, 35, 0.24);
  border-color: rgba(112, 212, 139, 0.45);
  color: #d8ffdf;
}

.status-badge-bad {
  background: rgba(125, 15, 15, 0.2);
  border-color: rgba(255, 77, 77, 0.45);
  color: #ffd7d7;
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 0.35rem;
  border-radius: 999px;
  flex: 0 0 12px;
}

.status-dot-ok {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(112, 212, 139, 0.14);
}

.status-dot-bad {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 77, 77, 0.12);
}

.jobs {
  display: grid;
  gap: 0.9rem;
}

.job-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.job-meta {
  min-width: 0;
}

.job-meta p {
  margin: 0.4rem 0 0;
}

.job-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  text-transform: capitalize;
}

.error-text {
  color: #ffabab;
}

.status-processing,
.status-pending {
  border-color: rgba(189, 29, 29, 0.3);
}

.status-completed {
  border-color: rgba(112, 212, 139, 0.3);
}

.status-failed {
  border-color: rgba(255, 77, 77, 0.35);
}

@media (max-width: 720px) {
  .screen {
    width: min(100vw - 1rem, 1080px);
  }

  .app-shell {
    padding: 1rem 0 2rem;
  }

  .topbar,
  .section-head,
  .job-row,
  .status-row {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions,
  .portal-footer-card,
  .cuewave-hero,
  .cuewave-showcase {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

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

  .status-dot {
    margin-top: 0;
  }

  .app-icon-preview {
    max-width: 280px;
    margin: 0 auto;
  }
}
