* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1220;
  color: #e5edf7;
}

a {
  color: #8cc8ff;
}

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

button {
  border: 0;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  background: #2563eb;
  color: white;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

label {
  display: grid;
  gap: 0.35rem;
  color: #d8e1ee;
}

input,
select,
textarea,
.json-block {
  width: 100%;
  border: 1px solid #23324f;
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  background: #0f172a;
  color: #f8fbff;
}

textarea {
  resize: vertical;
}

.page-shell,
.login-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

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

.login-shell {
  width: min(440px, calc(100% - 2rem));
  padding: 0;
}

.panel {
  background: #111a2f;
  border: 1px solid #22314d;
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.login-panel {
  padding: 1.5rem;
}

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

.header-actions,
.inline-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

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

.lower-grid {
  margin-top: 1rem;
}

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

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.muted,
.eyebrow {
  color: #99a9c2;
}

.eyebrow {
  margin: 0 0 0.3rem;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.error {
  color: #ffb4b4;
}

.secondary-link,
.secondary-button {
  color: #d6e8ff;
}

.secondary-button {
  background: #1b2740;
}

.secondary-button:hover {
  background: #243352;
}

.checkbox-label {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.checkbox-label input {
  width: auto;
}

.progress-shell {
  width: 100%;
  height: 12px;
  background: #0f172a;
  border: 1px solid #22314d;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
  transition: width 0.25s ease;
}

.json-block {
  min-height: 180px;
  white-space: pre-wrap;
  word-break: break-word;
}

#video-preview {
  width: 100%;
  border-radius: 12px;
  background: black;
}

.recent-jobs {
  display: grid;
  gap: 0.5rem;
}

.recent-job {
  display: grid;
  gap: 0.25rem;
  border: 1px solid #23324f;
  border-radius: 12px;
  padding: 0.85rem;
  background: #0f172a;
}

.recent-job button {
  justify-self: start;
  padding: 0.5rem 0.75rem;
}

code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 860px) {
  .grid,
  .two-col,
  .page-header {
    grid-template-columns: 1fr;
    display: grid;
  }

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