:root {
  --primary-red: #d3281c;
  --primary-red-hover: #b81f14;
  --input-bg: #faf8f2;
  --input-border: #92a0b2;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-label: #475569;
  --card-border: #e2e8f0;
  --green: #0a9c3d;
  --green-subtle: #e6f7ec;
  --radius-lg: 20px;
  --radius-card: 14px;
  --radius-input: 10px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: start;
}

/* ================= LEFT HERO COLUMN ================= */
.hero-col {
  padding-right: 8px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.badge-ring {
  width: 12px;
  height: 12px;
  border: 2.5px solid var(--primary-red);
  border-radius: 50%;
  display: inline-block;
}

.hero-title {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.18;
  margin: 20px 0 16px;
  letter-spacing: -0.6px;
}

.hero-desc {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 28px;
}

.hero-img-card {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.07);
  border: 1px solid #f1f5f9;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.hero-img-card:hover .hero-img {
  transform: scale(1.02);
}

/* ================= RIGHT FORM COLUMN ================= */
.form-col {
  min-width: 0;
}

.form-card {
  background: #ffffff;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.form-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 18px;
  letter-spacing: -0.4px;
}

/* Stepper */
.stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  gap: 8px;
}
.st {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-weight: 700;
  font-size: 13.5px;
}
.st .dot {
  width: 22px;
  height: 22px;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  flex: none;
  background: #fff;
  transition: all 0.2s;
}
.st.active {
  color: var(--primary-red);
}
.st.active .dot {
  background: var(--primary-red);
  border-color: var(--primary-red);
  color: #fff;
}
.st.done {
  color: var(--green);
}
.st.done .dot {
  background: var(--green);
  border-color: var(--green);
  color: transparent;
  position: relative;
}
.st.done .dot:after {
  content: "";
  position: absolute;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  top: 3px;
}

/* Form Fields */
.step[hidden], [hidden] {
  display: none !important;
}

.field {
  position: relative;
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-label);
  margin-bottom: 7px;
}
.req {
  color: var(--primary-red);
  font-weight: 700;
}

.field input, .field select {
  width: 100%;
  height: 50px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-input);
  padding: 0 16px;
  font: 600 15px 'Manrope', sans-serif;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}
.field input:focus, .field select:focus {
  background: #ffffff;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(211, 40, 28, 0.1);
}

.field.has-prefix input {
  padding-left: 48px;
}
.field .prefix {
  position: absolute;
  left: 16px;
  top: 39px;
  color: #475569;
  font-weight: 700;
  z-index: 1;
}

.field.invalid input, .field.invalid select, .combo.invalid .combo-input {
  border-color: var(--primary-red);
  background: #fff5f5;
}
.err {
  display: block;
  color: var(--primary-red);
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  min-height: 0;
}
.err:empty {
  display: none;
}

.row {
  display: flex;
  gap: 16px;
}
.row .field {
  flex: 1;
  min-width: 0;
}

.sub {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 18px;
  color: var(--text-dark);
}

.otp-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  margin-top: 8px;
  color: #475569;
  font-weight: 600;
}
.link {
  background: none;
  border: 0;
  color: var(--primary-red);
  font: 700 13px 'Manrope', sans-serif;
  cursor: pointer;
  padding: 0;
}
.link:disabled {
  color: #94a3b8;
  cursor: default;
}

/* Actions & Buttons */
.actions {
  display: flex;
  margin-top: 24px;
}
.actions.two {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.btn {
  font: 700 15.5px 'Manrope', sans-serif;
  border: 0;
  border-radius: 999px;
  height: 50px;
  padding: 0 32px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  transition: background-color 0.15s, transform 0.1s;
}
.btn:active {
  transform: scale(0.99);
}
.btn.full {
  width: 100%;
}
.btn.primary {
  background: var(--primary-red);
  color: #ffffff;
}
.btn.primary:hover {
  background: var(--primary-red-hover);
}
.btn.primary:disabled {
  background: #fca5a5;
  color: #ffffff;
  cursor: not-allowed;
}
.btn.outline {
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  color: #334155;
  min-width: 120px;
}
.btn.outline:hover {
  background: #f8fafc;
}
.btn.ghost {
  background: #f8fafc;
  border: 1.5px dashed #94a3b8;
  color: #334155;
  height: 44px;
  padding: 0 20px;
  font-size: 13.5px;
  font-weight: 700;
  width: 100%;
  margin-bottom: 16px;
  border-radius: var(--radius-input);
}
.btn.ghost:hover {
  background: #f1f5f9;
  border-color: var(--primary-red);
  color: var(--primary-red);
}
.arr:after {
  content: "→";
  font-style: normal;
  font-weight: 800;
}

/* Product list item & step 2 styling */
.prod {
  background: #fafcfe;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.prod:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.prod-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.ptitle {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
}
.prod .rm {
  background: #fee2e2;
  border: none;
  color: var(--primary-red);
  font: 700 12px 'Manrope', sans-serif;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background-color 0.15s;
}
.prod .rm:hover {
  background: #fecaca;
}
.field select {
  appearance: none;
  background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23333' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 16px center;
}
.field select:disabled, .field input:disabled {
  opacity: 0.6;
  background-color: #f1f5f9;
  cursor: not-allowed;
}
.unit {
  position: absolute;
  right: 16px;
  top: 39px;
  color: #64748b;
  font-weight: 700;
}
.qty input {
  padding-right: 38px;
}

/* Searchable Combobox */
.combo {
  position: relative;
  margin-bottom: 18px;
}
.combo > label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-label);
  margin-bottom: 7px;
}
.combo-input {
  width: 100%;
  height: 50px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-input);
  padding: 0 38px 0 16px;
  font: 600 15px 'Manrope', sans-serif;
  color: var(--text-dark);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.combo-input:focus {
  background: #ffffff;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(211, 40, 28, 0.1);
}
.combo.has-val .combo-input {
  background: #ffffff;
}
.combo.disabled .combo-input {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f1f5f9;
}
.combo:after {
  content: "";
  position: absolute;
  right: 16px;
  top: 48px;
  width: 7px;
  height: 7px;
  border: solid #475569;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  pointer-events: none;
  transition: transform 0.2s;
}
.combo.open:after {
  transform: rotate(-135deg);
  top: 51px;
}
.combo-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: 80px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-input);
  max-height: 220px;
  overflow: auto;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}
.combo-list div {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 500;
  cursor: pointer;
}
.combo-list div:hover {
  background: #fff5f5;
  color: var(--primary-red);
  font-weight: 700;
}
.combo-list .none {
  color: #94a3b8;
  cursor: default;
}

/* Terms Checkbox */
.check {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 20px 0 0;
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-red);
}
.check a {
  color: var(--primary-red);
  font-weight: 700;
  text-decoration: underline;
}

/* Invoice Upload Box */
.upload {
  border: 2px dashed var(--input-border);
  border-radius: var(--radius-input);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--input-bg);
  transition: border-color 0.15s, background-color 0.15s;
}
.upload.drag, .upload:hover {
  border-color: var(--primary-red);
  background: #fff8f8;
}
.upload p {
  margin: 4px 0;
}
.muted {
  color: var(--text-muted);
  font-size: 13px;
}
.up-ico {
  font-size: 28px;
  color: var(--primary-red);
}
#previewImg {
  max-width: 100%;
  max-height: 240px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.pdf {
  display: inline-grid;
  place-items: center;
  width: 80px;
  height: 100px;
  background: #fee2e2;
  color: var(--primary-red);
  font-weight: 800;
  border-radius: 8px;
  font-size: 16px;
}
.pv-info {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  font-weight: 600;
  font-size: 13px;
  word-break: break-all;
}

/* Success Screen */
.success-panel {
  padding: 30px 10px;
  text-align: center;
}
.tick {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #00d68f;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 10px #c9f5e4;
}
#success p {
  margin: 0 0 16px;
  line-height: 1.6;
  font-size: 15px;
}
.foot {
  margin-top: 36px !important;
  font-size: 13.5px !important;
  color: var(--text-muted);
}
#success a {
  color: var(--primary-red);
  font-weight: 700;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 960px) {
  .layout-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-title {
    font-size: 32px;
  }
  .page-wrap {
    padding: 24px 16px 40px;
  }
  .form-card {
    padding: 28px 20px;
  }
}

@media (max-width: 480px) {
  .row {
    flex-direction: column;
    gap: 0;
  }
  .field .prefix {
    top: 39px;
  }
  .unit {
    top: 39px;
  }
  .combo:after {
    top: 48px;
  }
  .combo.open:after {
    top: 51px;
  }
  .hero-title {
    font-size: 26px;
  }
  .form-title {
    font-size: 24px;
  }
  .st b {
    font-size: 11px;
  }
  .st {
    gap: 4px;
  }
  .stepper {
    padding: 0 0 12px;
  }
}
