:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e8ebef;
  --border-strong: rgba(2, 58, 81, 0.18);

  --text: #023a51;
  --muted: #59667d;

  --brand: #951616;
  --brand-2: #eb4962;
  --navy: #023a51;

  --focus: rgba(2, 58, 81, 0.16);
  --danger: #b91c1c;

  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(2, 58, 81, 0.05), 0 8px 24px rgba(2, 58, 81, 0.08);
  --shadow-md: 0 20px 60px rgba(2, 58, 81, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(255, 255, 255, 0.10), transparent 60%),
    radial-gradient(700px 460px at 92% 12%, rgba(149, 22, 22, 0.26), transparent 55%),
    linear-gradient(135deg, #070707, #140406, var(--brand));
  background-attachment: fixed;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 20px 54px;
  display: grid;
  gap: 18px;
}

.page > * {
  position: relative;
}

.page.auth {
  max-width: 980px;
  min-height: 100vh;
  align-content: center;
  justify-items: center;
  padding: 54px 20px;
}

.page.auth .card {
  width: 100%;
  max-width: 440px;
}

.page.auth .cardHeader {
  text-align: center;
  margin-bottom: 18px;
}

.logoLarge {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  display: block;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 14px;
  z-index: 20;
}

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

.logoMark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.wordmark {
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--brand);
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(149, 22, 22, 0.20);
  background: rgba(149, 22, 22, 0.06);
  white-space: nowrap;
}

.productName {
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 18px;
  line-height: 1.1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(800px 360px at 10% 0%, rgba(2, 58, 81, 0.10), transparent 55%),
    radial-gradient(720px 320px at 95% 25%, rgba(149, 22, 22, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88));
  box-shadow: var(--shadow-md);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

.heroContent {
  display: grid;
  gap: 10px;
  align-content: start;
}

.heroEyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 900;
  color: rgba(2, 58, 81, 0.72);
}

.heroTitle {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.heroLead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 62ch;
}

.chipRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(2, 58, 81, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(2, 58, 81, 0.86);
  font-size: 12px;
  font-weight: 800;
}

.heroPanel {
  display: grid;
  align-content: stretch;
}

.heroCard {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(2, 58, 81, 0.14);
  background: rgba(255, 255, 255, 0.86);
}

.heroCardTitle {
  font-weight: 900;
  letter-spacing: -0.01em;
}

.steps {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.steps li {
  margin: 6px 0;
}

.heroNote {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(149, 22, 22, 0.18);
  background: rgba(149, 22, 22, 0.05);
  color: rgba(2, 58, 81, 0.88);
  font-size: 13px;
  line-height: 1.4;
}

.card {
  padding: 18px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.cardHeader {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.title {
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 16px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.appGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 18px;
  align-items: start;
}

@media (max-width: 980px) {
  .appGrid {
    grid-template-columns: 1fr;
  }
}

.sectionHeader {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.sectionHeaderRow {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.sectionHeaderRow > div:first-child {
  min-width: 0;
}

@media (max-width: 560px) {
  .sectionHeaderRow {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

.sectionActions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(2, 58, 81, 0.16);
  background: rgba(2, 58, 81, 0.03);
  color: rgba(2, 58, 81, 0.86);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.sectionTitle {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.groupTitle {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 900;
  color: rgba(2, 58, 81, 0.72);
}

.dropzone {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1.5px dashed rgba(2, 58, 81, 0.22);
  background: linear-gradient(180deg, rgba(2, 58, 81, 0.04), rgba(149, 22, 22, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.dropzone:hover {
  border-color: rgba(2, 58, 81, 0.34);
  background: linear-gradient(180deg, rgba(2, 58, 81, 0.05), rgba(149, 22, 22, 0.03));
}

.dropzone.isDragging {
  border-color: rgba(149, 22, 22, 0.45);
  background: linear-gradient(180deg, rgba(149, 22, 22, 0.05), rgba(2, 58, 81, 0.04));
  transform: scale(1.01);
}

.dropzoneInput {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzoneInner {
  display: grid;
  gap: 4px;
  pointer-events: none;
}

.dropzoneTitle {
  font-weight: 900;
  letter-spacing: -0.01em;
}

.dropzoneHint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(2, 58, 81, 0.02);
  padding: 12px 12px;
}

.detailsSummary {
  cursor: pointer;
  font-weight: 800;
  color: var(--navy);
  list-style: none;
}

.detailsSummary::-webkit-details-marker {
  display: none;
}

.detailsSummary::before {
  content: '+';
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  border: 1px solid rgba(2, 58, 81, 0.16);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 900;
}

details[open] > .detailsSummary::before {
  content: '–';
}

.detailsBody {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

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

@media (max-width: 720px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(2, 58, 81, 0.08);
  border: 1px solid rgba(2, 58, 81, 0.12);
  overflow: hidden;
}

.bar > div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--navy), var(--brand));
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}

.checkbox input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

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

.label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
}

textarea.input {
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
}

.input:focus {
  border-color: rgba(2, 58, 81, 0.38);
  box-shadow: 0 0 0 4px var(--focus);
  background: var(--surface);
}

.preview {
  display: grid;
  gap: 12px;
  padding: 14px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.previewVideo {
  width: 100%;
  max-height: 360px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
}

.playerPreviewPanel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(2, 58, 81, 0.02);
}

.playerPreviewHeader {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.playerPreviewLabel {
  font-weight: 900;
  letter-spacing: -0.01em;
}

.playerPreview {
  --p-bg: #ffffff;
  --p-card: rgba(255, 255, 255, 0.94);
  --p-text: #023a51;
  --p-muted: #59667d;
  --p-border: rgba(2, 58, 81, 0.14);
  --p-bar-bg: rgba(2, 58, 81, 0.10);
  --p-accent: #023a51;
  --p-accent2: #951616;

  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--p-bg);
}

.playerThemeLight {
  --p-bg: #ffffff;
  --p-card: rgba(255, 255, 255, 0.94);
  --p-text: #023a51;
  --p-muted: #59667d;
  --p-border: rgba(2, 58, 81, 0.14);
  --p-bar-bg: rgba(2, 58, 81, 0.10);
  --p-accent: #023a51;
  --p-accent2: #951616;
}

.playerThemeDark {
  --p-bg: linear-gradient(180deg, #0b1220, #050914);
  --p-card: linear-gradient(180deg, rgba(17, 26, 43, 0.92), rgba(17, 26, 43, 0.55));
  --p-text: #e7eefc;
  --p-muted: rgba(231, 238, 252, 0.74);
  --p-border: rgba(255, 255, 255, 0.14);
  --p-bar-bg: rgba(255, 255, 255, 0.10);
  --p-accent: #60a5fa;
  --p-accent2: #34d399;
}

.playerThemeTransparent {
  --p-bg: repeating-linear-gradient(45deg, rgba(2, 58, 81, 0.06), rgba(2, 58, 81, 0.06) 10px, rgba(149, 22, 22, 0.06) 10px, rgba(149, 22, 22, 0.06) 20px);
  --p-card: rgba(255, 255, 255, 0.88);
  --p-text: #023a51;
  --p-muted: #59667d;
  --p-border: rgba(2, 58, 81, 0.14);
  --p-bar-bg: rgba(2, 58, 81, 0.10);
  --p-accent: #023a51;
  --p-accent2: #951616;
}

.playerWrap {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.playerLayoutCentered .playerWrap {
  max-width: 520px;
  margin: 0 auto;
}

.playerCard {
  border: 1px solid var(--p-border);
  background: var(--p-card);
  border-radius: 14px;
  padding: 12px;
}

.playerH1 {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--p-text);
  margin-bottom: 4px;
}

.playerSub {
  font-size: 12px;
  color: var(--p-muted);
  line-height: 1.35;
}

.playerCardRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.playerBar {
  height: 10px;
  border-radius: 999px;
  background: var(--p-bar-bg);
  border: 1px solid var(--p-border);
  overflow: hidden;
}

.playerBarFill {
  height: 100%;
  width: 22%;
  background: linear-gradient(90deg, var(--p-accent), var(--p-accent2));
}

.playerPills {
  display: inline-flex;
  gap: 8px;
}

.playerPill {
  border: 1px solid var(--p-border);
  color: var(--p-muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.playerPillStrong {
  color: var(--p-text);
}

.playerVideoMock {
  height: 148px;
  border-radius: 14px;
  border: 1px solid var(--p-border);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.playerVideoInner {
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 900;
}

.playerFooter {
  font-size: 12px;
  color: var(--p-muted);
  line-height: 1.35;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(149, 22, 22, 0.22);
  background: linear-gradient(180deg, var(--brand), #7b1111);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 20px rgba(149, 22, 22, 0.12);
  transition: transform 120ms ease, filter 120ms ease;
}

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

.button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}

.buttonSecondary {
  border-color: rgba(2, 58, 81, 0.18);
  background: rgba(2, 58, 81, 0.04);
  color: var(--navy);
  font-weight: 700;
  box-shadow: none;
}

.alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(149, 22, 22, 0.28);
  background: rgba(149, 22, 22, 0.06);
  color: var(--navy);
  margin: 0 0 12px;
  font-size: 13px;
}

.buttonSmall {
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
}

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

.jobRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

@media (min-width: 680px) {
  .jobRow {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .jobActions {
    justify-content: flex-end;
  }

  .jobError {
    grid-column: 1 / -1;
  }
}

.jobMain {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.jobTitle {
  font-weight: 900;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jobMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

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

.jobActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.statusPill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(2, 58, 81, 0.16);
  background: rgba(2, 58, 81, 0.04);
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.statusReady {
  border-color: rgba(2, 58, 81, 0.22);
  background: rgba(2, 58, 81, 0.06);
}

.statusWorking {
  border-color: rgba(149, 22, 22, 0.22);
  background: rgba(149, 22, 22, 0.05);
  color: var(--brand);
}

.statusQueued {
  border-color: rgba(89, 102, 125, 0.22);
  background: rgba(89, 102, 125, 0.06);
  color: var(--muted);
}

.statusFailed {
  border-color: rgba(149, 22, 22, 0.28);
  background: rgba(149, 22, 22, 0.08);
  color: var(--danger);
}

.statusUnknown {
  border-color: rgba(89, 102, 125, 0.22);
  background: rgba(89, 102, 125, 0.06);
  color: var(--muted);
}

.jobError {
  margin: 2px 0 0;
}
