:root {
  color-scheme: light dark;
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1c1f26;
  --muted: #5b6270;
  --border: #dbe2ef;
  --primary: #3867ff;
  --primary-hover: #2c51c7;
  --success: #22c55e;
  --error: #ef4444;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
}

.auth-card {
  background: var(--card);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 24px 45px rgba(56, 103, 255, 0.08);
  width: min(360px, 90vw);
  text-align: center;
}

.auth-card h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.topbar h1 {
  margin: 0;
}

.content {
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: 0 16px 35px rgba(24, 39, 75, 0.08);
}

.card h2 {
  margin-top: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

input[type="password"],
input[type="file"] {
  font: inherit;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.btn {
  font: inherit;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-hover);
}

.btn.secondary {
  background: #fff;
  border: 1px solid var(--border);
}

.btn.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

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

.small {
  font-size: 0.85rem;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.8rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.status-pill.processing {
  background: rgba(56, 103, 255, 0.1);
  color: #1d4ed8;
}

.status-pill.completed {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.status-pill.failed {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.progress-bar {
  width: 120px;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3867ff, #4fdaff);
  transition: width 0.3s ease;
}

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .content {
    padding: 1.5rem;
  }
}
