/* MediSupply Portal — Mock Supplier Registration
 * Enterprise-styled mock portal for engineering challenge purposes.
 * Deliberately neutral corporate design to simulate real vendor portals.
 */

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

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background: #eef1f5;
  color: #2c3440;
  min-height: 100vh;
  line-height: 1.5;
  font-size: 14px;
}

/* Header — mimics enterprise portal top bar */
.portal-header {
  background: #1a3a5c;
  color: #ffffff;
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #c8102e;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.portal-brand-icon {
  width: 28px;
  height: 28px;
  background: #c8102e;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
}

.portal-meta {
  font-size: 12px;
  color: #b8c5d6;
}

/* Main container */
.portal-main {
  max-width: 880px;
  margin: 32px auto;
  background: #ffffff;
  border: 1px solid #d5dce5;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Progress indicator */
.progress-bar {
  display: flex;
  border-bottom: 1px solid #d5dce5;
  background: #f7f9fb;
}

.progress-step {
  flex: 1;
  padding: 16px 20px;
  text-align: center;
  font-size: 13px;
  color: #7a8699;
  border-right: 1px solid #d5dce5;
  position: relative;
}

.progress-step:last-child { border-right: none; }

.progress-step.active {
  color: #1a3a5c;
  font-weight: 600;
  background: #ffffff;
}

.progress-step.done {
  color: #4a7a4a;
}

.progress-step .step-num {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d5dce5;
  color: #7a8699;
  font-size: 12px;
  line-height: 22px;
  margin-right: 8px;
  font-weight: 600;
}

.progress-step.active .step-num {
  background: #1a3a5c;
  color: #ffffff;
}

.progress-step.done .step-num {
  background: #4a7a4a;
  color: #ffffff;
}

/* Content area */
.portal-content {
  padding: 36px 48px;
}

.step-title {
  font-size: 22px;
  color: #1a3a5c;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-subtitle {
  font-size: 13px;
  color: #7a8699;
  margin-bottom: 28px;
}

/* Form elements */
.form-row {
  margin-bottom: 20px;
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 13px;
  color: #2c3440;
  margin-bottom: 6px;
  font-weight: 500;
}

label .req {
  color: #c8102e;
  margin-left: 2px;
}

label .hint {
  color: #7a8699;
  font-weight: 400;
  font-size: 12px;
  margin-left: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 9px 11px;
  font-size: 14px;
  border: 1px solid #b8c5d6;
  border-radius: 2px;
  background: #ffffff;
  color: #2c3440;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #1a3a5c;
  box-shadow: 0 0 0 2px rgba(26,58,92,0.15);
}

.field-hint {
  font-size: 12px;
  color: #7a8699;
  margin-top: 4px;
}

.field-error {
  font-size: 12px;
  color: #c8102e;
  margin-top: 4px;
  display: none;
}

.field-error.visible { display: block; }

input.invalid, select.invalid {
  border-color: #c8102e;
}

/* Checkboxes */
.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  padding: 12px 14px;
  border: 1px solid #d5dce5;
  border-radius: 2px;
  background: #fafbfc;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.checkbox-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.checkbox-item label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

/* Review list */
.review-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eef1f5;
}

.review-section:last-of-type { border-bottom: none; }

.review-section h3 {
  font-size: 14px;
  color: #1a3a5c;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.review-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 8px 16px;
}

.review-grid dt {
  color: #7a8699;
  font-size: 13px;
}

.review-grid dd {
  color: #2c3440;
  font-size: 13px;
  font-weight: 500;
}

/* Buttons */
.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #eef1f5;
}

button {
  padding: 10px 22px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-weight: 500;
}

.btn-primary {
  background: #1a3a5c;
  color: #ffffff;
  border-color: #1a3a5c;
}

.btn-primary:hover { background: #12283f; }

.btn-secondary {
  background: #ffffff;
  color: #1a3a5c;
  border-color: #b8c5d6;
}

.btn-secondary:hover { background: #f7f9fb; }

.btn-submit {
  background: #c8102e;
  color: #ffffff;
  border-color: #c8102e;
}

.btn-submit:hover { background: #a40d25; }

/* Notice box */
.notice {
  padding: 12px 14px;
  background: #fff9e6;
  border: 1px solid #f0d98a;
  border-radius: 2px;
  font-size: 13px;
  color: #6b5419;
  margin-bottom: 24px;
}

.notice-critical {
  background: #fdecec;
  border-color: #f0a8a8;
  color: #8a1c1c;
}

/* Footer */
.portal-footer {
  max-width: 880px;
  margin: 16px auto 32px;
  text-align: center;
  color: #7a8699;
  font-size: 11px;
}

/* Spinner for async country load */
.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #d5dce5;
  border-top-color: #1a3a5c;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 6px;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

.confirm-banner {
  text-align: center;
  padding: 40px 20px;
}

.confirm-banner .checkmark {
  width: 56px;
  height: 56px;
  background: #4a7a4a;
  color: white;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}

.confirm-banner h2 {
  font-size: 22px;
  color: #1a3a5c;
  margin-bottom: 8px;
}

.confirm-banner p {
  color: #7a8699;
}
