:root {
  color-scheme: light;
  --page-bg: #f9fafb;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --border: rgba(209, 213, 219, 0.85);
  --text-color: #1f2937;
  --text-muted: #6b7280;
  --input-bg: #ffffff;
  --input-border: rgba(148, 163, 184, 0.45);
  --input-focus-border: #2563eb;
  --input-focus-ring: rgba(37, 99, 235, 0.32);
  --accent: linear-gradient(135deg, #3b82f6, #2563eb);
  --accent-hover: linear-gradient(135deg, #2563eb, #1d4ed8);
  --accent-shadow: rgba(37, 99, 235, 0.28);
  --accent-text: #ffffff;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --page-bg: #020617;
  --surface: rgba(15, 23, 42, 0.88);
  --surface-muted: rgba(30, 41, 59, 0.7);
  --border: rgba(71, 85, 105, 0.65);
  --text-color: #e2e8f0;
  --text-muted: #94a3b8;
  --input-bg: rgba(15, 23, 42, 0.78);
  --input-border: rgba(71, 85, 105, 0.85);
  --input-focus-border: #38bdf8;
  --input-focus-ring: rgba(56, 189, 248, 0.38);
  --accent: linear-gradient(135deg, #60a5fa, #2563eb);
  --accent-hover: linear-gradient(135deg, #3b82f6, #1d4ed8);
  --accent-shadow: rgba(59, 130, 246, 0.4);
  --accent-text: #f8fafc;
}

body {
  min-height: 100vh;
  background-color: var(--page-bg);
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--input-bg);
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 3px var(--input-focus-ring);
  outline: none;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

button {
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

button.create {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 32px -18px var(--accent-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

button.create:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 22px 36px -20px var(--accent-shadow);
}

button.create:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-shadow);
}

html.job-processing,
html.job-processing body,
html.job-processing * {
  cursor: progress !important;
}

.page-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.page-transition-overlay[aria-hidden='false'] {
  opacity: 1;
  pointer-events: auto;
}

.page-transition-overlay__card {
  width: min(96vw, 20rem);
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  padding: 1.25rem;
  box-shadow: 0 25px 45px -18px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(12px);
}

.dark .page-transition-overlay__card {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
}

button.cancel {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.65rem 1.5rem;
  border-radius: 0.9rem;
}

button.cancel:hover {
  background: var(--surface);
  color: var(--text-color);
}

.pdf-preview-card {
  width: 8rem;
  height: 10rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.25rem 0.75rem 0.85rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 16px 30px -18px rgba(15, 23, 42, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.pdf-preview-card svg {
  height: 3rem;
  width: 3rem;
  color: #ef4444;
}

.pdf-preview-card__name {
  margin: 0;
  word-break: break-word;
  line-height: 1.25;
}

.pdf-preview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px -18px rgba(15, 23, 42, 0.45);
}

.pdf-preview-card__remove {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -16px rgba(15, 23, 42, 0.4);
}

.pdf-preview-card__remove svg {
  width: 1rem;
  height: 1rem;
}

.pdf-preview-card__remove:hover {
  color: #ef4444;
  border-color: rgba(248, 113, 113, 0.45);
  transform: translateY(-1px);
}

:root[data-theme='dark'] .pdf-preview-card {
  box-shadow: 0 20px 40px -22px rgba(2, 6, 23, 0.8);
}

:root[data-theme='dark'] .pdf-preview-card svg {
  color: #f97316;
}

:root[data-theme='dark'] .pdf-preview-card__remove {
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(71, 85, 105, 0.7);
  color: var(--text-muted);
  box-shadow: 0 14px 30px -20px rgba(2, 6, 23, 0.72);
}

:root[data-theme='dark'] .pdf-preview-card__remove:hover {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.45);
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 9999px;
  font-size: 0;
  color: #b45309;
  background: linear-gradient(135deg, rgba(253, 224, 71, 0.18), rgba(251, 191, 36, 0.32));
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 16px 30px -24px rgba(180, 83, 9, 0.6);
}

.premium-badge--compact {
  padding: 0.3rem;
}

.premium-badge--micro {
  padding: 0.25rem;
}

.premium-badge__icon {
  height: 0.9rem;
  width: 0.9rem;
  color: #d97706;
}

.premium-badge--compact .premium-badge__icon {
  height: 0.85rem;
  width: 0.85rem;
}

.premium-badge--micro .premium-badge__icon {
  height: 0.8rem;
  width: 0.8rem;
}

:root[data-theme='dark'] .premium-badge {
  color: #fde68a;
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.35), rgba(234, 179, 8, 0.22));
  border-color: rgba(234, 179, 8, 0.45);
  box-shadow: 0 18px 36px -24px rgba(234, 179, 8, 0.6);
}

:root[data-theme='dark'] .premium-badge__icon {
  color: #facc15;
}
