:root {
  --ink: #14202c;
  --muted: #647087;
  --line: #e3e8ef;
  --bg: #f4f7fb;
  --card: #ffffff;
  --blue-dark: #0f5fa6;
  --blue-light: #2fc0ee;
  --orange-dark: #e04e10;
  --orange-light: #f7801f;
  --accent: var(--blue-dark);
  --accent-ink: #ffffff;
  --danger: #b3413a;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}
header.topbar {
  background: #ffffff;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--orange-dark), var(--orange-light), var(--blue-light), var(--blue-dark)) 1;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
header.topbar .brand { display: flex; align-items: center; gap: 12px; }
header.topbar img.logo { height: 34px; display: block; }
header.topbar .tagline { font-size: 12px; color: var(--muted); }
header.topbar a.admin-link { color: var(--muted); opacity: .7; text-decoration: none; font-size: 12px; }
header.topbar a.admin-link:hover { opacity: 1; text-decoration: underline; }

.layout {
  display: grid;
  grid-template-columns: 320px 1fr 360px;
  gap: 16px;
  padding: 16px;
  align-items: start;
}
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.card h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--blue-dark);
  margin: 0 0 10px; font-weight: 700;
}

label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
select, input[type=text], input[type=number], input[type=date], input[type=email], input[type=tel], textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; background: #fff;
  font-family: inherit;
}
textarea { resize: vertical; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(47,192,238,.15); }

button {
  cursor: pointer; border: none; border-radius: 6px; padding: 8px 12px; font-size: 13px; font-weight: 600;
  background: var(--blue-dark); color: var(--accent-ink);
}
button:hover { background: #0c5090; }
button.secondary { background: #eef1f4; color: var(--ink); }
button.secondary:hover { background: #e4e8ee; }
button.small { padding: 4px 8px; font-size: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }

button#submitQuoteBtn {
  background: linear-gradient(90deg, var(--orange-dark), var(--orange-light));
}
button#submitQuoteBtn:hover { filter: brightness(1.05); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; }
tr:hover td { background: #fafbfc; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11px; background: #eef1f4; color: var(--muted); }
.pill.ok { background: #e4f3ec; color: #1f5a4a; }
.pill.warn { background: #fbeee7; color: #a24a1f; }

.results-list { max-height: 60vh; overflow-y: auto; }

.totals-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; }
.totals-row.grand { font-weight: 700; font-size: 15px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }

.banner { padding: 10px 12px; border-radius: 8px; margin-bottom: 10px; font-size: 13px; }
.banner.success { background: #e4f3ec; color: #1f5a4a; }
.banner.error { background: #fbe9e7; color: var(--danger); }

.small-note { color: var(--muted); font-size: 12px; margin-top: 6px; }
a.quote-link { color: var(--blue-dark); font-weight: 600; }
a.product-link { color: var(--blue-dark); font-size: 12px; text-decoration: none; }
a.product-link:hover { text-decoration: underline; }

.qty-input { width: 60px; }
.price-input { width: 90px; }

.field-row { display: flex; gap: 8px; }
.field-row > div { flex: 1; }
