/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: #f3f2f1;
  color: #323130;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  background: #0078d4;
  color: #fff;
  padding: 0 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.header-logo { display: flex; align-items: center; gap: 14px; }
.header-title { display: flex; flex-direction: column; }
.header-brand { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.header-sub { font-size: 11px; opacity: 0.82; letter-spacing: 0.01em; }
.header-company-logo { height: 44px; width: auto; object-fit: contain; display: block; }

/* ── Steps bar ── */
.steps-bar {
  background: #fff;
  border-bottom: 1px solid #edebe9;
  padding: 0 24px;
}
.steps-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 52px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  transition: opacity 0.2s;
  cursor: default;
  white-space: nowrap;
}
.step.active, .step.done { opacity: 1; }
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #edebe9;
  color: #605e5c;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.step.active .step-num { background: #0078d4; color: #fff; }
.step.done .step-num { background: #107c10; color: #fff; }
.step-label { font-size: 13px; font-weight: 600; color: #323130; }
.step-line { flex: 1; height: 2px; background: #edebe9; margin: 0 8px; min-width: 20px; }

/* ── Main ── */
main { flex: 1; padding: 32px 24px; }
.wizard-container { max-width: 1000px; margin: 0 auto; }

/* ── Wizard step visibility ── */
.wizard-step { display: none; }
.wizard-step.active { display: block; }

.step-title { font-size: 22px; font-weight: 700; color: #0078d4; margin-bottom: 6px; }
.step-desc { font-size: 14px; color: #605e5c; margin-bottom: 28px; }

/* ── Licence grid ── */
.licence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.licence-card {
  background: #fff;
  border: 2px solid #edebe9;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  position: relative;
}
.licence-card:hover { border-color: #0078d4; box-shadow: 0 4px 16px rgba(0,120,212,0.13); transform: translateY(-2px); }
.licence-card.selected { border-color: #0078d4; box-shadow: 0 0 0 3px rgba(0,120,212,0.2); }
.licence-card.popular { }
.popular-tag {
  position: absolute;
  top: 0; right: 0;
  background: #0078d4;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-bottom-left-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.licence-header {
  padding: 16px 18px 12px;
  color: #fff;
}
.licence-header h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.licence-badge { display: inline-block; font-size: 11px; background: rgba(255,255,255,0.22); padding: 2px 8px; border-radius: 10px; font-weight: 600; }

.licence-header.kiosk    { background: linear-gradient(135deg, #605e5c, #3b3a39); }
.licence-header.plan1    { background: linear-gradient(135deg, #2b88d8, #005a9e); }
.licence-header.plan2    { background: linear-gradient(135deg, #0078d4, #004578); }
.licence-header.basic    { background: linear-gradient(135deg, #00b4ef, #0078d4); }
.licence-header.standard { background: linear-gradient(135deg, #0078d4, #003f7f); }
.licence-header.premium  { background: linear-gradient(135deg, #7f56d9, #0078d4); }

.licence-body { padding: 14px 18px 18px; }
.licence-price { font-size: 22px; font-weight: 800; color: #0078d4; margin-bottom: 8px; }
.licence-price strong { font-size: 28px; }
.licence-price span { font-size: 13px; font-weight: 400; color: #605e5c; }
.licence-pitch { font-size: 13px; color: #605e5c; margin-bottom: 12px; line-height: 1.5; }
.licence-body ul { list-style: none; padding: 0; margin-bottom: 12px; }
.licence-body ul li { font-size: 13px; padding: 3px 0 3px 18px; position: relative; }
.licence-body ul li::before { content: '✓'; position: absolute; left: 0; color: #107c10; font-weight: 700; }
.licence-best { font-size: 11px; font-weight: 600; color: #0078d4; background: #eff6fc; border-radius: 4px; padding: 5px 10px; }

/* ── Users & Term ── */
.form-section { margin-bottom: 28px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 10px; color: #323130; }

.user-count-row { display: flex; align-items: center; gap: 0; width: 160px; }
.count-btn {
  width: 40px; height: 44px;
  background: #0078d4; color: #fff; border: none; cursor: pointer;
  font-size: 22px; font-weight: 700; transition: background 0.15s;
  border-radius: 0;
}
.count-btn:first-child { border-radius: 6px 0 0 6px; }
.count-btn:last-child { border-radius: 0 6px 6px 0; }
.count-btn:hover { background: #106ebe; }
.count-input {
  width: 80px; height: 44px;
  border: 2px solid #0078d4; border-left: none; border-right: none;
  text-align: center; font-size: 18px; font-weight: 700;
  color: #0078d4; outline: none;
}
.count-input::-webkit-outer-spin-button,
.count-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.term-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.term-card {
  background: #fff;
  border: 2px solid #edebe9;
  border-radius: 8px;
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}
.term-card input[type="radio"] { display: none; }
.term-card:hover { border-color: #0078d4; }
.term-card.selected { border-color: #0078d4; box-shadow: 0 0 0 3px rgba(0,120,212,0.18); }
.term-name { font-size: 15px; font-weight: 700; color: #323130; margin-bottom: 2px; }
.term-billing { font-size: 13px; color: #0078d4; font-weight: 600; margin-bottom: 6px; }
.term-note { font-size: 12px; color: #605e5c; margin-bottom: 10px; }
.term-price-preview { font-size: 16px; font-weight: 700; color: #0078d4; }

/* ── Add-ons ── */
.addon-cards { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.addon-card {
  background: #fff;
  border: 2px solid #edebe9;
  border-radius: 8px;
  padding: 20px 20px 20px 16px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.addon-card:hover { border-color: #0078d4; }
.addon-card.selected { border-color: #0078d4; box-shadow: 0 0 0 3px rgba(0,120,212,0.18); }
.addon-check-area { padding-top: 3px; flex-shrink: 0; }
.addon-checkbox { display: none; }
.addon-check-box {
  width: 22px; height: 22px;
  border: 2px solid #c8c6c4;
  border-radius: 4px;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.addon-card.selected .addon-check-box {
  background: #0078d4;
  border-color: #0078d4;
}
.addon-card.selected .addon-check-box::after {
  content: '';
  position: absolute;
  left: 5px; top: 2px;
  width: 7px; height: 12px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}
.addon-body { flex: 1; }
.addon-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.addon-header h3 { font-size: 15px; font-weight: 700; color: #323130; }
.addon-price { font-size: 16px; font-weight: 800; color: #0078d4; white-space: nowrap; }
.addon-price span { font-size: 12px; font-weight: 400; color: #605e5c; }
.addon-body p { font-size: 13px; color: #605e5c; margin-bottom: 8px; }
.addon-body ul { list-style: none; padding: 0; }
.addon-body ul li { font-size: 13px; padding: 2px 0 2px 18px; position: relative; color: #323130; }
.addon-body ul li::before { content: '✓'; position: absolute; left: 0; color: #107c10; font-weight: 700; }
.addon-total { margin-top: 10px; font-size: 13px; font-weight: 600; color: #0078d4; }

/* ── Client form ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: #323130; }
.field input {
  height: 40px;
  border: 1.5px solid #c8c6c4;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: #323130;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.field input:focus { border-color: #0078d4; box-shadow: 0 0 0 2px rgba(0,120,212,0.15); }
.field input.error { border-color: #d13438; }
.field-err { font-size: 12px; color: #d13438; min-height: 16px; }
.req { color: #d13438; }

.form-section-title { font-size: 15px; font-weight: 700; color: #0078d4; margin: 24px 0 14px; border-bottom: 2px solid #eff6fc; padding-bottom: 6px; }

.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-opt { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.radio-opt input[type="radio"] { width: 18px; height: 18px; accent-color: #0078d4; cursor: pointer; }

.conditional-field {
  display: none;
  margin-top: 16px;
  margin-bottom: 8px;
}
.conditional-field.visible { display: block; }
.conditional-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.conditional-field input {
  width: 100%;
  max-width: 400px;
  height: 40px;
  border: 1.5px solid #c8c6c4;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.conditional-field input:focus { border-color: #0078d4; box-shadow: 0 0 0 2px rgba(0,120,212,0.15); }
.conditional-field .field-err { font-size: 12px; color: #d13438; }

/* ── Companies House lookup ── */
.ch-lookup-row { display: flex; gap: 10px; align-items: center; max-width: 400px; }
.ch-lookup-row input { flex: 1; min-width: 0; max-width: none; }
.ch-lookup-row .btn { flex-shrink: 0; height: 40px; padding: 0 18px; font-size: 13px; white-space: nowrap; }
.ch-details-section { display: none; margin-top: 20px; }
.ch-details-section.visible { display: block; }
.ch-status-ok {
  margin-top: 10px;
  padding: 10px 14px;
  background: #dff6dd;
  border-left: 4px solid #107c10;
  border-radius: 4px;
  font-size: 13px;
  color: #107c10;
}
.ch-status-error {
  margin-top: 10px;
  padding: 10px 14px;
  background: #fde7e9;
  border-left: 4px solid #d13438;
  border-radius: 4px;
  font-size: 13px;
  color: #d13438;
}

/* ── Review ── */
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.review-section {
  background: #fff;
  border: 1px solid #edebe9;
  border-radius: 8px;
  padding: 18px;
}
.review-section h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #605e5c; margin-bottom: 12px; }
.review-section p, .review-section .rv { font-size: 14px; line-height: 1.7; color: #323130; }

.price-summary {
  background: #eff6fc;
  border: 2px solid #0078d4;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.price-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; color: #323130; }
.price-row.total { font-size: 18px; font-weight: 800; color: #0078d4; border-top: 2px solid #0078d4; margin-top: 8px; padding-top: 10px; }

.terms-note {
  background: #fff4ce;
  border: 1px solid #ffb900;
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 13px;
  color: #323130;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ── Buttons ── */
.step-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; }
.btn {
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: #0078d4; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #106ebe; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-secondary { background: #edebe9; color: #323130; }
.btn-secondary:hover { background: #d2d0ce; }
.btn-large { padding: 13px 36px; font-size: 16px; }

.submit-error { margin-top: 14px; font-size: 14px; color: #d13438; text-align: center; }

/* ── Confirmation ── */
.confirm-box {
  text-align: center;
  padding: 60px 24px;
  max-width: 560px;
  margin: 0 auto;
}
.confirm-icon {
  width: 72px; height: 72px;
  background: #107c10;
  color: #fff;
  border-radius: 50%;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.confirm-box h2 { font-size: 26px; color: #107c10; margin-bottom: 12px; }
.confirm-box p { font-size: 15px; color: #605e5c; line-height: 1.7; margin-bottom: 16px; }
.confirm-contact { background: #eff6fc; border-radius: 8px; padding: 16px 20px; margin-top: 20px; }
.confirm-contact p { color: #323130; font-size: 14px; margin: 3px 0; }

/* ── Sub-step breadcrumb ── */
.substeps-bar {
  background: #eff6fc;
  border-bottom: 1px solid #cce4f6;
  padding: 8px 24px;
  display: none;
}
.substeps-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.substep {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #605e5c;
  background: transparent;
  transition: background 0.15s, color 0.15s;
}
.substep.active { background: #0078d4; color: #fff; }
.substep.done   { color: #107c10; }
.substep-arrow  { color: #c8c6c4; font-size: 16px; padding: 0 2px; }

/* ── Mailbox setup table ── */
.mailbox-table-wrap { margin-bottom: 28px; }
.mailbox-table-wrap h3 { font-size: 15px; font-weight: 700; color: #0078d4; margin-bottom: 6px; }
.table-hint { font-size: 13px; color: #605e5c; margin-bottom: 12px; line-height: 1.5; }
.table-scroll { overflow-x: auto; }
.mailbox-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.mailbox-table thead th { background: #0078d4; color: #fff; padding: 10px 12px; text-align: left; font-size: 13px; font-weight: 600; }
.mailbox-table tbody tr:nth-child(even) { background: #f9f8f7; }
.mailbox-table td { padding: 8px 10px; border-bottom: 1px solid #edebe9; vertical-align: middle; }
.mailbox-table td.row-num { color: #a19f9d; font-size: 13px; text-align: center; width: 40px; }
.mb-input {
  width: 100%;
  height: 36px;
  border: 1.5px solid #c8c6c4;
  border-radius: 5px;
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.mb-input:focus { border-color: #0078d4; box-shadow: 0 0 0 2px rgba(0,120,212,0.12); }
.mb-input.error { border-color: #d13438; }
.email-input-group { display: flex; align-items: center; gap: 0; }
.email-input-group .mb-prefix { border-radius: 5px 0 0 5px; flex: 1; min-width: 0; }
.email-domain-suffix {
  background: #f3f2f1;
  border: 1.5px solid #c8c6c4;
  border-left: none;
  border-radius: 0 5px 5px 0;
  padding: 0 10px;
  height: 36px;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #605e5c;
  white-space: nowrap;
  font-weight: 600;
}

/* ── Domain existing note ── */
.domain-existing-note {
  margin-top: 12px;
  padding: 12px 16px;
  background: #eff6fc;
  border-left: 4px solid #0078d4;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  line-height: 1.6;
  color: #323130;
}

/* ── Domain availability check ── */
.domain-check-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.domain-check-row input { flex: 1; min-width: 200px; }
.domain-check-row .btn { white-space: nowrap; height: 40px; }
.domain-checking { font-size: 13px; color: #605e5c; padding: 8px 0; }
.domain-result { margin-top: 10px; padding: 10px 14px; border-radius: 6px; font-size: 14px; }
.domain-available   { background: #dff6dd; border: 1px solid #107c10; color: #0b5a08; }
.domain-unavailable { background: #fde7e9; border: 1px solid #d13438; color: #a4262c; }
.domain-error       { background: #fff4ce; border: 1px solid #ffb900; color: #323130; }

/* ── Domain purchase note ── */
.domain-purchase-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff4ce;
  border: 1px solid #ffb900;
  border-radius: 6px;
  padding: 14px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.6;
}
.domain-purchase-note strong { display: block; margin-bottom: 4px; color: #323130; }
.domain-purchase-note p { margin: 0; color: #605e5c; }

/* ── Review mailbox table ── */
.review-section-full {
  background: #fff;
  border: 1px solid #edebe9;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}
.review-section-full h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #605e5c; margin-bottom: 12px; }
.review-mb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.review-mb-table th { background: #f3f2f1; color: #605e5c; padding: 7px 10px; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.review-mb-table td { padding: 7px 10px; border-bottom: 1px solid #f3f2f1; }
.review-mb-table tr:last-child td { border-bottom: none; }

/* ── Shared mailboxes step ── */
.shared-mailbox-info {
  display: flex;
  gap: 16px;
  background: #eff6fc;
  border: 1px solid #0078d4;
  border-radius: 8px;
  padding: 20px;
  align-items: flex-start;
}
.info-icon {
  font-size: 24px;
  color: #0078d4;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.info-body h4 { font-size: 14px; font-weight: 700; color: #0078d4; margin-bottom: 6px; }
.info-body p  { font-size: 13px; color: #323130; line-height: 1.6; margin: 0; }

.shared-examples {
  background: #fff;
  border: 1px solid #edebe9;
  border-radius: 8px;
  padding: 18px 20px;
  margin-top: 24px;
}
.shared-examples h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #605e5c; margin-bottom: 12px; }
.shared-examples ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.shared-examples ul li { font-size: 13px; padding: 6px 10px; background: #f3f2f1; border-radius: 4px; }

/* ── Footer ── */
footer {
  background: #323130;
  color: #c8c6c4;
  padding: 16px 24px;
  font-size: 12px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  align-items: center;
}
.footer-inner a { color: #c8c6c4; text-decoration: none; }
.footer-inner a:hover { color: #fff; text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 680px) {
  .licence-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: 1; }
  .header-company-logo { height: 32px; }
  .step-label { display: none; }
  .term-cards { grid-template-columns: 1fr; }
}
