:root {
  --bg: #eef2f4;
  --surface: #ffffff;
  --surface-soft: #f7f9fa;
  --text: #14212c;
  --muted: #62707d;
  --line: #d6dee4;
  --navy: #09243a;
  --blue: #145277;
  --blue-dark: #0e3d59;
  --brass: #b78b3b;
  --danger: #a32626;
  --good: #147243;
  --warn: #93620b;
  --shadow: 0 18px 42px rgba(9, 36, 58, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(180deg, rgba(9, 36, 58, 0.08), rgba(238, 242, 244, 0) 360px),
    var(--bg);
  color: var(--text);
}

.site-header {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(9, 36, 58, 0.97), rgba(20, 82, 119, 0.94)),
    repeating-linear-gradient(90deg, transparent 0 44px, rgba(255, 255, 255, 0.04) 44px 45px);
  color: white;
  padding: 34px 20px 38px;
  border-bottom: 5px solid var(--brass);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto -12% -92px auto;
  width: 420px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.brand-block {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  width: 62px;
  height: 62px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.05);
  color: #f8d78c;
  font-weight: 800;
  letter-spacing: 1.6px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #f1c977;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.site-header h1 {
  margin: 0 0 8px;
  max-width: 760px;
  font-size: 30px;
  line-height: 1.15;
}

.site-header p {
  margin: 0;
  max-width: 690px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.shell {
  max-width: 1120px;
  margin: -18px auto 0;
  padding: 0 20px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.2;
}

.lookup-card,
.cart-card,
.submit-card {
  grid-column: 1 / -1;
}

.submit-card {
  padding-bottom: 16px;
}

.submit-card form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
  row-gap: 6px;
}

.submit-title-row {
  grid-column: 1 / -1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 520px;
  align-items: start;
  gap: 20px;
  margin-bottom: 12px;
}

.submit-title-row h2 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.2;
  max-width: 360px;
}

.email-field {
  width: 100%;
  margin: 0;
}

.email-field span {
  display: block;
  margin-bottom: 6px;
  color: #203241;
  font-size: 14px;
  font-weight: 800;
}

.email-field em {
  color: #c62828;
  font-style: normal;
  font-weight: 700;
}

.email-field input {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}

.customer-details-field,
.upload-field,
.details-field,
.submit-actions,
.submit-status {
  grid-column: 1 / -1;
}

#customerDetails {
  min-height: 78px;
}

.muted,
.fine-print {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.fine-print {
  margin-bottom: 0;
}

.lookup-row,
.two-col,
.submit-actions {
  display: flex;
  gap: 12px;
}

.lookup-row {
  margin: 16px 0;
}

.lookup-row input {
  min-height: 48px;
  font-size: 17px;
}

.two-col > label {
  flex: 1;
}

label {
  display: block;
  margin: 9px 0;
  color: #203241;
  font-size: 14px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  margin-top: 5px;
  border: 1px solid #cbd5dc;
  border-radius: 6px;
  padding: 9px 11px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20, 82, 119, 0.16);
}

textarea {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

input[type="file"] {
  padding: 8px;
  background: var(--surface-soft);
}

small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}

.optional {
  color: var(--muted);
  font-weight: 500;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 11px 17px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 8px 16px rgba(20, 82, 119, 0.18);
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(20, 82, 119, 0.22);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

button.secondary {
  min-height: 36px;
  background: #e6edf1;
  color: var(--navy);
  box-shadow: none;
}

button.secondary:hover {
  background: #d9e3e9;
  box-shadow: none;
}

.lookup-result {
  border: 1px solid var(--line);
  border-left: 5px solid var(--brass);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-soft);
}

.lookup-result.empty {
  color: var(--muted);
  background: #fbfcfd;
}

.part-hit {
  display: grid;
  gap: 10px;
}

.part-title {
  color: var(--navy);
  font-size: 20px;
  font-weight: 800;
}

.price-line {
  color: var(--good);
  font-weight: 800;
}

.availability {
  font-weight: 800;
}

.availability.good {
  color: var(--good);
}

.availability.warn {
  color: var(--warn);
}

.availability.bad {
  color: var(--danger);
}

.qty-add {
  display: flex;
  gap: 10px;
  align-items: end;
}

.qty-add label {
  max-width: 140px;
  margin: 0;
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.cart-list.empty {
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px dashed #bdc8d0;
  border-radius: 8px;
  padding: 16px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}

.cart-item:last-child {
  border-bottom: 0;
}

.cart-item strong {
  display: block;
}

.cart-item .desc {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.cart-item .money {
  color: var(--navy);
  text-align: right;
  font-weight: 800;
}

.cart-item .avail {
  margin-top: 4px;
  color: var(--good);
  font-size: 13px;
  font-weight: 700;
}

.remove-btn {
  min-height: auto;
  background: transparent;
  color: var(--danger);
  padding: 2px 0;
  font-size: 13px;
  text-decoration: underline;
  box-shadow: none;
}

.remove-btn:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.cart-total {
  margin-top: 15px;
  border-top: 2px solid var(--line);
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--navy);
  font-size: 18px;
}

.cart-details-box {
  height: 110px !important;
  min-height: 86px;
  max-height: 140px;
  overflow-y: auto;
  resize: vertical;
  background: #f9fbfc;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
}

.submit-actions {
  margin-top: 12px;
}

.submit-actions button {
  flex: 1;
}

#submitOrderBtn {
  background: var(--brass);
  color: #1e1a12;
}

#submitOrderBtn:hover {
  background: #a67b30;
}

.submit-status {
  min-height: 24px;
  font-weight: 800;
}

.submit-status.good {
  color: var(--good);
}

.submit-status.bad {
  color: var(--danger);
}

@media (max-width: 800px) {
  .site-header {
    padding: 28px 18px 32px;
  }

  .brand-block {
    align-items: flex-start;
  }

  .brand-mark {
    width: 54px;
    height: 54px;
  }

  .site-header h1 {
    font-size: 24px;
  }

  .shell {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }

  .lookup-row,
  .qty-add,
  .submit-actions,
  .two-col {
    flex-direction: column;
    align-items: stretch;
  }

  .qty-add label {
    max-width: none;
  }

  .submit-title-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .submit-title-row h2 {
    max-width: none;
  }

  .email-field {
    width: 100%;
  }
}