* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f0f2f5;
  color: #333;
  line-height: 1.6;
}

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

.navbar {
  background-color: #002868;
  color: white;
  padding: 1rem 0;
  border-bottom: 4px solid #C8102E;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.navbar h1 { font-size: 1.4rem; font-weight: 600; letter-spacing: 0.01em; }
.navbar .subtitle { font-size: 0.8rem; opacity: 0.7; margin-top: 2px; }

.btn {
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.2s, opacity 0.2s;
  display: inline-block;
  text-decoration: none;
}
.btn-primary { background-color: #C8102E; color: white; padding: 0.65rem 1.6rem; font-weight: 500; }
.btn-primary:hover { background-color: #a50d26; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background-color: #fff; color: #002868; border: 1px solid #002868; }
.btn-secondary:hover { background-color: #e8ecf5; }
.btn-link { background: none; color: #002868; padding: 0; font-size: 0.9rem; border: none; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }

.step-bar { display: flex; align-items: center; margin: 2rem 0 2.5rem; }
.step { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: #aaa; font-weight: 500; }
.step.active { color: #002868; }
.step.done { color: #2e7d32; }
.step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #ddd;
  color: #999;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.step.active .step-num { background: #002868; color: white; }
.step.done .step-num { background: #2e7d32; color: white; }
.step-connector { width: 32px; height: 2px; background: #ddd; flex-shrink: 0; }
.step-connector.done { background: #2e7d32; }

.form-container {
  background: white;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  max-width: 700px;
}
.form-container h2 { color: #002868; margin-bottom: 0.35rem; font-size: 1.4rem; }
.form-container .step-desc { color: #666; font-size: 0.9rem; margin-bottom: 2rem; }

.form-group { margin-bottom: 1.4rem; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 500; color: #444; margin-bottom: 0.4rem; }
.form-group input, .form-group select {
  width: 100%; padding: 0.65rem 0.85rem;
  border: 1px solid #ccc; border-radius: 4px;
  font-size: 0.95rem; color: #333; background: #fff;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: #002868;
  box-shadow: 0 0 0 2px rgba(0,40,104,0.1);
}
.form-group small { display: block; font-size: 0.78rem; color: #888; margin-top: 0.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.vendor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 2rem; }
.vendor-card {
  border: 2px solid #ddd; border-radius: 8px; padding: 1.5rem 1.25rem;
  cursor: pointer; transition: all 0.15s; text-align: center; background: white;
}
.vendor-card:hover { border-color: #002868; background: #f4f6fb; }
.vendor-card.selected { border-color: #002868; background: #f4f6fb; }
.vendor-card .vendor-name { font-weight: 600; color: #002868; font-size: 1rem; margin-top: 0.5rem; }
.vendor-card .vendor-auth { font-size: 0.78rem; color: #888; margin-top: 0.25rem; }
.vendor-icon { font-size: 2rem; }

.info-box {
  background: #edf2fb; border: 1px solid #b3c6e8;
  border-radius: 4px; padding: 1rem; margin: 1.25rem 0;
}
.info-box h4 { margin-bottom: 0.4rem; color: #002868; font-size: 0.88rem; }
.info-box p, .info-box li { font-size: 0.85rem; color: #444; }
.info-box ul { margin-left: 1.2rem; margin-top: 0.25rem; }
.info-box li { margin: 0.2rem 0; }

.warning-box {
  background: #fff3cd; border: 1px solid #ffc107;
  border-radius: 4px; padding: 1rem; margin: 1.25rem 0; color: #856404;
}
.warning-box h4 { margin-bottom: 0.4rem; font-size: 0.88rem; }
.warning-box p { font-size: 0.85rem; }

.site-list { margin: 1rem 0; }
.site-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.75rem 1rem; border: 1px solid #e0e0e0;
  border-radius: 4px; margin-bottom: 8px; cursor: pointer; transition: background 0.15s;
}
.site-item:hover { background: #f4f6fb; }
.site-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: #002868; cursor: pointer; }
.site-item .site-name { cursor: pointer; font-size: 0.92rem; flex: 1; }
.site-item .site-id { font-size: 0.75rem; color: #aaa; font-family: monospace; }

.select-all-row { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 0.5rem; }
.select-all-row button { font-size: 0.82rem; }

.carrier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 1rem 0; }
.carrier-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.65rem 1rem; border: 1px solid #e0e0e0;
  border-radius: 4px; cursor: pointer; transition: background 0.15s;
}
.carrier-item:hover { background: #f4f6fb; }
.carrier-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: #002868; cursor: pointer; }
.carrier-item .carrier-name { cursor: pointer; font-size: 0.92rem; }

.carrier-item:hover { background: #f4f6fb; }
.carrier-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: #002868; cursor: pointer; }
.carrier-item .carrier-name { cursor: pointer; font-size: 0.92rem; }

/* ↓ add this block ↓ */
.carrier-item input[type="checkbox"]:disabled {
  cursor: not-allowed;
}
.carrier-unavailable {
  opacity: 0.45;
  cursor: not-allowed;
}
.carrier-unavailable:hover {
  background: none;
}
.badge-soon {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #eee;
  color: #777;
  margin-left: auto;
  white-space: nowrap;
}

.action-row { display: flex; gap: 12px; align-items: center; margin-top: 2rem; }

.validate-status { font-size: 0.85rem; }
.validate-status.ok { color: #2e7d32; }
.validate-status.err { color: #C8102E; }

.results-container { margin-top: 1.5rem; }
.results-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 1.5rem; }
.summary-card { border-radius: 6px; padding: 1rem; text-align: center; }
.summary-card.success { background: #e8f5e9; border: 1px solid #a5d6a7; }
.summary-card.skipped { background: #fff3e0; border: 1px solid #ffcc80; }
.summary-card.failed  { background: #ffebee; border: 1px solid #ef9a9a; }
.summary-card .count { font-size: 2rem; font-weight: 700; }
.summary-card.success .count { color: #2e7d32; }
.summary-card.skipped .count { color: #e65100; }
.summary-card.failed  .count { color: #C8102E; }
.summary-card .label  { font-size: 0.8rem; color: #666; margin-top: 2px; }

.result-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 0.85rem 1rem; border: 1px solid #e0e0e0;
  border-radius: 4px; margin-bottom: 8px;
}
.result-row.success { border-left: 4px solid #2e7d32; }
.result-row.skipped { border-left: 4px solid #e65100; }
.result-row.failed  { border-left: 4px solid #C8102E; }
.result-icon { font-size: 1.1rem; margin-top: 1px; flex-shrink: 0; }
.result-site { font-weight: 500; font-size: 0.92rem; }
.result-detail { font-size: 0.82rem; color: #666; margin-top: 2px; }

.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

.toggle-row {
  display: flex; align-items: center; gap: 12px;
  padding: 1rem; background: #f4f6fb; border-radius: 4px; margin-bottom: 1.5rem;
}
.toggle-row label { font-size: 0.88rem; color: #444; cursor: pointer; }
input[type="checkbox"].toggle { width: 16px; height: 16px; accent-color: #002868; }

.section-title {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: #888; font-weight: 600; margin: 1.75rem 0 0.75rem;
}

/* ── Reveal input wrapper ── */
.input-reveal {
  position: relative;
  display: flex;
  align-items: center;
}
.input-reveal input {
  flex: 1;
  padding-right: 2.5rem;
}
.btn-reveal {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  color: #888;
  user-select: none;
  -webkit-user-select: none;
}
.btn-reveal:hover { color: #002868; }

/* ── Field error ── */
.field-error {
  display: block;
  font-size: 0.78rem;
  color: #C8102E;
  margin-top: 0.25rem;
}