* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-alt: #e8eef7;
  --surface: #ffffff;
  --surface-muted: #f8fbff;
  --surface-soft: #eef4ff;
  --text: #102033;
  --muted: #5f7188;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --success: #15803d;
  --warning: #b45309;
  --danger: #dc2626;
  --border: rgba(15, 23, 42, 0.1);
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 42%, #eef3fb 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

a {
  color: inherit;
}

.shell {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.page-hero {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: -0.05em;
}

.page-hero p {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.7;
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
}

.dashboard-grid.is-two-col {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: start;
}

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

.topbar {
  width: min(1200px, calc(100% - 2rem));
  margin: 1rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar h1,
.auth-card h1,
.upload-shell h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.topbar p,
.auth-card p,
.upload-shell p,
.panel p,
.job-meta,
code {
  color: var(--muted);
}

.topbar form {
  margin: 0;
}

.topbar button,
.btn,
.action-link,
.upload-form button,
.auth-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 0.82rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.topbar button,
.upload-form button,
.auth-card button,
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.topbar button:hover,
.upload-form button:hover,
.auth-card button:hover,
.btn-primary:hover,
.action-link:hover {
  transform: translateY(-1px);
}

.topbar button:disabled,
.upload-form button:disabled,
.auth-card button:disabled,
.action-link.is-loading {
  cursor: wait;
  opacity: 0.85;
}

.cards,
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card,
.panel,
.auth-card,
.upload-shell .upload-form,
.panel-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.card {
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), transparent 65%);
  pointer-events: none;
}

.card span {
  color: var(--muted);
  font-weight: 600;
}

.card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.panel {
  margin-top: 1rem;
}

.panel.is-compact {
  margin-top: 0;
}

.panel-card {
  display: grid;
  gap: 0.9rem;
}

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

.panel-head h2,
.upload-shell h1,
.auth-card h1 {
  margin-bottom: 0.25rem;
}

.panel-head a,
.action-link {
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.job-list {
  display: grid;
  gap: 0.9rem;
}

.job-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.95), rgba(255, 255, 255, 0.98));
}

.job-row h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

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

.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.job-actions form {
  margin: 0;
}

.action-link {
  padding-inline: 1rem;
  color: var(--accent-strong);
}

.action-link.is-danger {
  color: var(--danger);
}

.job-meta {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
  text-align: right;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-pill.is-completed {
  background: rgba(21, 128, 61, 0.12);
  color: var(--success);
}

.status-pill.is-processing {
  background: rgba(245, 158, 11, 0.14);
  color: var(--warning);
}

.status-pill.is-failed {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

.auth-shell {
  display: grid;
  place-items: center;
  padding: 2rem;
}

.auth-card {
  width: min(440px, 100%);
  padding: 1.5rem;
}

.auth-card form,
.upload-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.upload-shell {
  width: min(920px, calc(100% - 2rem));
  margin: 2rem auto 4rem;
}

.upload-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: start;
}

.support-card {
  display: grid;
  gap: 0.9rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.support-card h2,
.support-card p {
  margin: 0;
}

label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0.95rem 1rem;
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  outline-offset: 1px;
  border-color: rgba(37, 99, 235, 0.35);
}

.alert {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.18);
  color: #991b1b;
}

.loading-indicator,
.button-spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
  flex: none;
}

.button-spinner {
  display: none;
}

button.is-loading .button-spinner,
.action-link.is-loading .button-spinner {
  display: inline-block;
}

button.is-loading .button-label,
.action-link.is-loading .button-label {
  opacity: 0.85;
}

button:disabled .button-spinner {
  display: inline-block;
}

button:disabled {
  opacity: 0.85;
}

code {
  color: var(--accent-strong);
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

body.is-sidebar-collapsed .admin-layout {
  grid-template-columns: 92px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem 1.1rem;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px);
}

.admin-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

body.is-sidebar-collapsed .admin-sidebar {
  padding-inline: 0.75rem;
}

.admin-brand {
  padding: 0.25rem 0.75rem 1rem;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

body.is-sidebar-collapsed .admin-sidebar-head,
body.is-sidebar-collapsed .admin-nav-link,
body.is-sidebar-collapsed .admin-sidebar-footer {
  justify-content: center;
}

body.is-sidebar-collapsed .admin-brand,
body.is-sidebar-collapsed .admin-sidebar-footer .admin-muted,
body.is-sidebar-collapsed .admin-sidebar-footer strong,
body.is-sidebar-collapsed .sidebar-toggle-label {
  display: none;
}

body.is-sidebar-collapsed .admin-nav-link {
  padding-inline: 0.7rem;
}

body.is-sidebar-collapsed .admin-nav-label {
  display: none;
}

.admin-brand span {
  color: var(--accent);
}

.admin-nav {
  display: grid;
  gap: 0.35rem;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.admin-nav-link:hover,
.admin-nav-link.is-active {
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.admin-nav-icon {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-strong);
  font-size: 0.95rem;
}

.admin-nav-label {
  white-space: nowrap;
}

.admin-sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 0.3rem;
  padding: 1rem 0.75rem 0;
  border-top: 1px solid var(--border);
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-strong);
  box-shadow: var(--shadow);
}

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

.sidebar-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
}

.admin-muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-logout {
  width: 100%;
  margin-top: 0.5rem;
}

.admin-main {
  min-width: 0;
  padding: 1.5rem 1.5rem 2rem;
}

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

.admin-topbar h1 {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.06em;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-intro {
  max-width: 70ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.btn,
.tab-button,
.action-link,
.upload-form button,
.auth-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 0.8rem 1rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn:hover,
.tab-button:hover,
.action-link:hover,
.upload-form button:hover,
.auth-card button:hover {
  transform: translateY(-1px);
}

.btn-primary,
.upload-form button,
.auth-card button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.btn-secondary,
.action-link {
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-strong);

.status-cell {
  display: grid;
  gap: 0.45rem;
}

.status-select {
  min-width: 0;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0.7rem 0.85rem;
  font: inherit;
}

.status-select.status-draft {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.4);
  color: #475569;
}

.status-select.status-published {
  background: rgba(21, 128, 61, 0.14);
  border-color: rgba(21, 128, 61, 0.35);
  color: var(--success);
}

.status-select.status-unpublished {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.32);
  color: var(--danger);
}

.status-select option[value="draft"] {
  color: #475569;
}

.status-select option[value="published"] {
  color: var(--success);
}

.status-select option[value="unpublished"] {
  color: var(--danger);
}

.tag-summary {
  display: grid;
  gap: 0.55rem;
}

.tag-summary-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
}

.tag-summary-pill.is-alt {
  background: rgba(14, 165, 233, 0.08);
  color: #0f6fa6;
}

.btn-tag-view {
  min-height: 38px;
  width: fit-content;
  padding-inline: 0.85rem;
}

.tags-dialog {
  width: min(760px, calc(100vw - 2rem));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.tags-dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
}

.tags-dialog-shell {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.tags-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.tags-dialog-header h2 {
  margin: 0.2rem 0 0;
}

.tags-dialog-body {
  display: grid;
  gap: 1rem;
}

.tags-dialog-section {
  display: grid;
  gap: 0.55rem;
}

.tags-dialog-section h3 {
  margin: 0;
  font-size: 0.95rem;
}

.tags-dialog-list {
  gap: 0.45rem;
}
  box-shadow: var(--shadow);
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), transparent 65%);
  pointer-events: none;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 2rem;
  letter-spacing: -0.06em;
}

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

.tabbar {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.tab-button {
  background: transparent;
  color: var(--muted);
  border: 0;
  min-height: 40px;
  padding-inline: 1rem;
}

.tab-button.is-active {
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  font-size: 0.75rem;
  font-weight: 800;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.table-card,
.upload-card,
.progress-card {
  padding: 1.15rem;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.table-head h2,
.support-card h2 {
  margin: 0 0 0.25rem;
  letter-spacing: -0.04em;
}

.table-head p,
.support-card p,
.table-meta,
.row-title span,
.progress-step span,
.field small {
  color: var(--muted);
}

.table-meta {
  font-size: 0.9rem;
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(248, 251, 255, 0.65);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead th {
  position: sticky;
  top: 0;
  text-align: left;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(248, 251, 255, 0.96);
}

th,
td {
  padding: 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  vertical-align: top;
}

tbody tr:hover td {
  background: rgba(37, 99, 235, 0.04);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.row-title {
  display: grid;
  gap: 0.25rem;
}

.row-title strong {
  letter-spacing: -0.03em;
}

.mono,
.truncate,
.video-thumb span {
  font-variant-ligatures: none;
}

.mono {
  color: var(--muted);
  font-size: 0.9rem;
  word-break: break-all;
}

.truncate {
  max-width: 280px;
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.status-cell {
  display: grid;
  gap: 0.5rem;
}

.status-select-shell {
  position: relative;
}

.status-select {
  min-width: 0;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.98));
  color: var(--text);
  padding: 0.82rem 2.35rem 0.82rem 1rem;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7), 0 8px 16px rgba(15, 23, 42, 0.05);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

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

.status-select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 10px 20px rgba(15, 23, 42, 0.08);
}

.status-select-shell .status-select-caret {
  position: absolute;
  right: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  font-size: 0.8rem;
}

.status-select.status-draft {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.18), rgba(255, 255, 255, 0.98));
  border-color: rgba(148, 163, 184, 0.42);
  color: #334155;
}

.status-select.status-published {
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.18), rgba(255, 255, 255, 0.98));
  border-color: rgba(21, 128, 61, 0.38);
  color: var(--success);
}

.status-select.status-unpublished {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.16), rgba(255, 255, 255, 0.98));
  border-color: rgba(220, 38, 38, 0.34);
  color: var(--danger);
}

.status-select:disabled {
  opacity: 0.75;
  cursor: wait;
}

.row-actions form {
  margin: 0;
}

.video-thumb {
  width: 68px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.14);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.08));
  display: grid;
  place-items: center;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb span {
  color: var(--accent-strong);
  font-weight: 900;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-groups {
  display: grid;
  gap: 0.7rem;
}

.tag-group {
  display: grid;
  gap: 0.35rem;
}

.tag-group-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag-group-label.is-alt {
  color: #0f6fa6;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.tag-empty {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.tag.is-alt {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.16);
  color: #0f6fa6;
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.empty-state {
  display: grid;
  gap: 0.3rem;
  padding: 1.5rem 0.5rem;
  text-align: center;
}

.empty-state span {
  color: var(--muted);
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.upload-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.edit-form {
  gap: 1rem;
}

.edit-preview {
  width: 100%;
  min-height: 220px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.08));
}

.edit-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.edit-preview-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

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

.field span {
  font-size: 0.95rem;
  font-weight: 800;
}

.field small {
  font-size: 0.8rem;
}

.progress-card {
  position: sticky;
  top: 1.5rem;
}

.progress-stage {
  margin-bottom: 1rem;
}

.progress-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.progress-bar-wrap {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #0ea5e9);
  transition: width 260ms ease;
}

.progress-steps {
  display: grid;
  gap: 0.75rem;
}

.progress-step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
}

.progress-step strong {
  display: block;
  margin-bottom: 0.15rem;
}

.progress-dot {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-strong);
  font-weight: 900;
}

.progress-step.is-active {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.06);
}

.progress-step.is-active .progress-dot,
.progress-step.is-done .progress-dot {
  background: var(--surface-soft);
}

.progress-step.is-done .progress-dot {
  color: var(--success);
}

.progress-step.is-done strong,
.progress-step.is-done span {
  color: var(--text);
}

.upload-shell .alert {
  width: min(100%, 760px);
  margin-bottom: 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .topbar,
  .job-row,
  .panel-head,
  .dashboard-grid.is-two-col,
  .upload-layout {
    flex-direction: column;
    align-items: flex-start;
  }

  .job-meta {
    justify-items: start;
    text-align: left;
  }

  .dashboard-grid.is-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .stats-grid,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .progress-card {
    position: static;
  }

  .admin-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-head,
  .progress-stage-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .admin-main {
    padding-inline: 1rem;
  }

  .upload-form-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-head {
    flex-direction: column;
  }

  .row-actions {
    flex-direction: column;
  }

  .table-wrap {
    border-radius: 16px;
  }

  th,
  td {
    padding: 0.85rem;
  }
}