:root {
  /* APTS brand palette */
  --brand-blue: #5F6FE5;
  --brand-blue-light: #98AEF9;
  --brand-orange: #E9833A;
  --brand-orange-light: #F29F64;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: #f6f7f9;
  color: #1c1f26;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--brand-orange);
  color: #fff;
}

.topbar a { color: #fff; }

.brand {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 24px;
  width: auto;
  border-radius: 4px;
}

.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

h1 { font-size: 22px; margin-bottom: 20px; }

table.reports {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border-radius: 8px;
  overflow: hidden;
}

table.reports th, table.reports td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

table.reports th {
  background: #fafafa;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #666;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.badge-needs_duplicate_resolution { background: #fde2e1; color: #b3261e; }
.badge-needs_review { background: #fff3cd; color: #93720b; }
.badge-formatting { background: #e9ebfd; color: var(--brand-blue); }
.badge-done { background: #d9f2e3; color: #1f7a44; }
.badge-list_ready { background: #d9f2e3; color: #1f7a44; }

.button, button {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  background: var(--brand-blue);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

button.secondary,
a.button.secondary {
  background: #e5e7eb;
  color: #333;
}

button.primary {
  background: var(--brand-orange);
}

.login-box {
  max-width: 320px;
  margin: 60px auto;
  background: #fff;
  padding: 28px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.login-logo {
  display: block;
  height: 48px;
  width: auto;
  margin: 0 auto 20px;
  border-radius: 6px;
}

.login-title {
  text-align: center;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #333;
  margin: 0 0 16px;
}

.login-box h1 {
  font-size: 18px;
  color: #333;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-box label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.login-box input {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.flashes {
  list-style: none;
  padding: 10px 14px;
  margin: 0 0 20px;
  background: #fff3cd;
  border-radius: 6px;
  color: #93720b;
}

.review-placeholder {
  background: #fff;
  border: 1px dashed #ccc;
  border-radius: 8px;
  padding: 20px;
  margin: 16px 0 24px;
  color: #666;
}

.empty { color: #666; }

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.dashboard-header h1 { margin-bottom: 0; }

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stacked-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.stacked-form input,
.stacked-form select {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.stacked-form label.checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.hint {
  color: #666;
  font-size: 14px;
  max-width: 600px;
}

.review-step {
  display: flex;
  gap: 16px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 18px 20px;
  margin: 16px 0;
  max-width: 640px;
}

.step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-weight: 600;
  margin: 0 0 4px;
}

.step-body .hint {
  margin: 0 0 12px;
}

.stacked-form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

button.danger {
  background: #b3261e;
  color: #fff;
}

.duplicate-group {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.duplicate-group legend {
  font-weight: 600;
  padding: 0 4px;
}

.duplicate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}
