* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34rem),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: #1b1b1f;
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px 48px;
}

header {
  margin-bottom: 28px;
  padding-top: 8px;
}

h1 {
  margin: 0 0 10px;
  font-size: 40px;
  letter-spacing: -0.02em;
  color: #0f172a;
}

header p {
  color: #4b5563;
  margin: 0;
  font-size: 16px;
}

.eyebrow {
  color: #2563eb;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 6px;
}

.controls {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.controls h2,
section h2 {
  color: #111827;
}

.card {
  background: #ffffff;
  padding: 24px;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.09);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.card-header h2 {
  margin: 0;
  font-size: 20px;
  color: #0f172a;
}

.card-body {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.card-body.stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section .label {
  font-weight: 600;
  color: #4b5563;
}

.section h3 {
  margin: 0;
  font-size: 15px;
  color: #4b5563;
}

.controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  min-width: 220px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.actions.inline {
  align-items: center;
  flex-wrap: wrap;
}

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

.connection .label {
  color: #4b5563;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pill.connected {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.pill.error {
  background: #fdecec;
  border-color: #f2b8b5;
  color: #b42318;
}

button {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button {
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 750;
}

button.account-button {
  background: #f3f4f6;
  border-color: #d1d5db;
}

button.account-button {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

#load-picklist {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border-color: #f97316;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.24);
}

#generate-replacements {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.28);
}

#select-available {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.24);
}

#print-labels {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #1d4ed8;
  color: #ffffff;
}

button.account-button.active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.2);
}

button.account-button.active {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  border-color: #1e3a8a;
  box-shadow: 0 12px 24px rgba(30, 58, 138, 0.25);
}

button.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

button.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #1d4ed8;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.status {
  flex-basis: 100%;
  margin: 0;
  font-size: 14px;
  color: #4b5563;
}

.status.error {
  color: #b42318;
}

.summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(620px, 100%);
  padding: 14px 16px;
  border-radius: 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.summary-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.summary-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 900;
}

.stat-pill small {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-found {
  background: #dcfce7;
  color: #166534;
}

.stat-missing {
  background: #fee2e2;
  color: #b91c1c;
}

.stat-total {
  background: #e0e7ff;
  color: #3730a3;
}

#view-replacements {
  background: #ffffff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
  margin-bottom: 24px;
}

.table-subtitle {
  margin: 18px 0 10px;
  color: #111827;
}

.table th,
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 14px;
}

.table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.table tbody tr:hover {
  background: #eef2ff;
}

.not-found-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table td:first-child,
.table th:first-child {
  padding-left: 20px;
}

.table thead {
  background: #f1f5f9;
}

.empty {
  padding: 16px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px dashed #cbd5f5;
  margin-bottom: 24px;
  color: #4b5563;
}

.hidden {
  display: none;
}

select,
input[type="date"] {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background: #ffffff;
  min-width: 280px;
}

select:focus,
input[type="date"]:focus,
button:focus {
  outline: 2px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

a {
  color: #1d4ed8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.account-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
