:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --bg: #f3f4f6;
  --card-bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --border: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --card-bg: #131b2e;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #26324a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--blue);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .brand { font-size: 16px; }
.logout-form { margin: 0; }
.topbar-logout { color: white; text-decoration: none; opacity: 0.9; font-size: 14px; background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }

.wizard-main {
  flex: 1;
  padding: 20px 16px 40px;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.messages { max-width: 480px; margin: 12px auto 0; padding: 0 16px; }
.message {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}
.message-error { background: #fee2e2; color: #991b1b; }
.message-warning { background: #fef3c7; color: #92400e; }
.message-success { background: #dcfce7; color: #166534; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}

h1 { font-size: 22px; margin: 0 0 4px; }
.step-subtitle { color: var(--muted); margin: 0 0 20px; font-size: 14px; }

.btn {
  display: block;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 12px;
}
.btn-primary { background: var(--blue); color: white; }
.btn-primary:active { background: var(--blue-dark); }
.btn-secondary { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-link { background: none; color: var(--muted); text-decoration: underline; padding: 8px; font-weight: 400; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=password], select {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
}

#reader { width: 100%; border-radius: 14px; overflow: hidden; margin-bottom: 16px; }

.checklist { list-style: none; padding: 0; margin: 0 0 20px; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.checklist li:last-child { border-bottom: none; }
.status-icon { font-size: 18px; width: 22px; text-align: center; }
.status-done { color: var(--success); }
.status-pending { color: var(--muted); }
.status-active { color: var(--blue); }
.status-error { color: var(--danger); }

.summary-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.summary-row:last-child { border-bottom: none; }
.summary-row .label { color: var(--muted); }

details.troubleshoot { margin-top: 20px; }
details.troubleshoot summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
details.troubleshoot ul { padding-left: 20px; color: var(--muted); font-size: 14px; }

.job-list { list-style: none; padding: 0; }
.job-list li { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.job-list a { color: var(--blue); text-decoration: none; }
