:root {
  --bg: #08090b;
  --panel: #121417;
  --text: #f8fafc;
  --muted: #a5a8ad;
  --red: #7f1d2d;
  --orange: #a83246;
  --border: rgba(255, 255, 255, 0.12);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(
      circle at top left,
      rgba(220, 38, 38, 0.2),
      transparent 35%
    ),
    linear-gradient(180deg, #020617, #0f172a);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}
a {
  color: #d8a0aa;
}
.container {
  width: min(1200px, calc(100% - 2rem));
  margin: auto;
  padding: 3rem 0;
}
.site-header {
  min-height: 145px;
  padding: 1rem max(1rem, calc((100% - 1200px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: rgba(8, 9, 11, 0.97);
  border-bottom: 1px solid var(--border);
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: white;
  text-decoration: none;
  font-size: 1.55rem;
  font-weight: 800;
}
.site-brand img {
  width: auto;
  max-height: 130px;
  object-fit: contain;
}
.site-brand small {
  display: block;
  margin-top: 0.4rem;
  color: #d8a0aa;
  font-size: 0.8rem;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-header nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.78rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
  color: #f8fafc;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}
.site-header nav a:hover {
  transform: translateY(-2px);
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(248, 113, 113, 0.42);
}
.public-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  flex-wrap: nowrap;
}
.public-links > a:first-child {
  background: rgba(255, 255, 255, 0.055);
}
.public-links .sales-login {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  font-size: 0.92rem;
}
.public-links .sales-login:hover {
  background: #ef4444;
  border-color: #b43a50;
  color: #fff;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.card {
  background: rgba(18, 20, 23, 0.96);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  margin-bottom: 1.25rem;
}
.narrow {
  max-width: 650px;
  margin: 2rem auto;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.three {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
}
h1,
h2 {
  line-height: 1.15;
}
p,
.note {
  color: #cbd5e1;
}
label {
  display: block;
  margin: 1rem 0 0.35rem;
  font-weight: 700;
}
input,
textarea,
select {
  width: 100%;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #171a1f;
  color: white;
  font: inherit;
}
textarea {
  min-height: 150px;
  resize: vertical;
}
button,
.button {
  display: inline-block;
  border: 0;
  border-radius: 14px;
  padding: 0.9rem 1.35rem;
  background: var(--red);
  color: white;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
button:hover,
.button:hover {
  background: #ef4444;
}
.secondary {
  background: #30343a;
}
.danger {
  background: #671421;
}
.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1rem;
}
.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 400;
}
.check input {
  width: auto;
  margin-top: 0.35rem;
}
.bot-field {
  position: absolute;
  left: -10000px;
}
.flash {
  background: rgba(249, 115, 22, 0.17);
  border: 1px solid rgba(249, 115, 22, 0.45);
  padding: 1rem;
  border-radius: 14px;
}
.error {
  color: #fecaca;
}
.files {
  white-space: pre-line;
  color: var(--muted);
  font-size: 0.9rem;
}
.quote {
  border-left: 4px solid var(--red);
}
.consent-box,
.consent-record {
  margin: 1.25rem 0;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 16px;
  background: rgba(127, 29, 45, 0.10);
}
.legal-footer {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background: #08090b;
  color: #94a3b8;
}
.legal-footer a {
  text-decoration: none;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.status {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(127, 29, 45, 0.26);
}
.filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}
.filter {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
}
.filter.selected {
  background: var(--red);
  color: white;
}
.admin-row,
.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.inline-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.inline-actions form {
  margin: 0;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.inline-actions select { width: auto; min-width: 140px; }
.inline-actions button, .inline-actions .button { padding: .65rem .9rem; font-size: .9rem; }
.danger-zone {
  margin-top: 1.5rem;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(103, 20, 33, 0.16);
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.eyebrow { color: #d8a0aa; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.line-items { min-width: 980px; }
.line-items textarea { min-width: 300px; min-height: 78px; }
.line-items input { min-width: 100px; }
.line-items th:nth-child(4), .line-items th:nth-child(5), .customer-unit, .customer-line { white-space: nowrap; }
.compact { padding: .55rem .7rem; font-size: .82rem; }
.quote-controls { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1rem 0 2rem; }
.quote-controls > div { display: flex; gap: 1.5rem; padding: 1rem; border: 1px solid var(--border); border-radius: 14px; }
.internal-note, .private-pricing small, .internal-value { color: #fbbf24; }
.internal-value small, .sales-quotes small { display: block; color: var(--muted); }
.private-pricing { border: 1px solid rgba(251,191,36,.35); border-radius: 16px; padding: 1rem; background: rgba(251,191,36,.06); }
.send-warning { display: flex; flex-direction: column; margin: 1.5rem 0; padding: 1rem; border: 1px solid rgba(248,113,113,.4); border-radius: 14px; background: rgba(127,29,45,.12); }
.accept-header { background:#08090b; border-bottom:4px solid #7f1d2d; min-height:180px; display:flex; align-items:center; justify-content:center; padding:1rem; }
.accept-header img { width:min(620px,90vw); height:auto; }
@media (max-width: 720px) {
  .grid,
  .three,
  .check-grid {
    grid-template-columns: 1fr;
  }
  .top,
  .site-header,
  .site-brand,
  .admin-row,
  .danger-zone, .quote-controls {
    align-items: flex-start;
    flex-direction: column;
  }
  .quote-controls > div { flex-direction: column; gap: .4rem; }
  .public-links {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .public-links a,
  .site-header nav a {
    width: 100%;
  }
  .site-header nav {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .site-brand {
    gap: 0.75rem;
  }
  .site-brand img {
    width: 260px;
  }
  .site-header nav {
    padding-bottom: 0.5rem;
  }
  .card {
    padding: 1.25rem;
  }
  table {
    font-size: 0.9rem;
  }
}

/* Header button alignment override */
.site-header nav .public-links {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.7rem !important;
  flex-wrap: nowrap !important;
  width: auto !important;
}

.site-header nav .public-links a {
  width: auto !important;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .site-header nav .public-links {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .site-header nav .public-links a {
    width: 100% !important;
  }
}


/* Precision Security 2026 visual refresh */
body {
  background:
    radial-gradient(circle at top left, rgba(127, 29, 45, 0.20), transparent 34%),
    radial-gradient(circle at bottom right, rgba(93, 23, 38, 0.12), transparent 36%),
    linear-gradient(180deg, #08090b, #121417);
}

.site-header {
  border-bottom-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.site-brand img {
  max-height: 128px;
  width: auto;
}

.site-brand small {
  color: #d8a0aa;
}

.card {
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.30);
}

button,
.button {
  background: linear-gradient(180deg, #9a2539, #7f1d2d);
  box-shadow: 0 8px 18px rgba(127, 29, 45, 0.24);
}

button:hover,
.button:hover {
  background: linear-gradient(180deg, #ad3148, #92243a);
}

.secondary {
  background: #30343a;
  box-shadow: none;
}

.secondary:hover {
  background: #3a3f46;
}

input,
textarea,
select {
  border-color: rgba(255, 255, 255, 0.13);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(154, 37, 57, 0.48);
  outline-offset: 1px;
  border-color: rgba(184, 67, 86, 0.62);
}

.legal-footer {
  background: #08090b;
  border-top-color: rgba(255, 255, 255, 0.09);
}

.legal-footer a {
  color: #d8a0aa;
}

@media (max-width: 720px) {
  .site-brand img {
    width: 310px;
    max-width: 100%;
    height: auto;
  }
}

/* Quote Center header sizing and alignment refinement */
.site-header {
  min-height: 170px;
  padding-left: max(1.5rem, calc((100% - 1100px) / 2));
  padding-right: max(1.5rem, calc((100% - 1100px) / 2));
}

.site-brand {
  gap: 1.8rem;
}

.site-brand img {
  width: 390px;
  max-width: 42vw;
  max-height: none;
  height: auto;
  flex-shrink: 0;
}

@media (max-width: 980px) {
  .site-header {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .site-brand img {
    width: 340px;
    max-width: 48vw;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: auto;
  }

  .site-brand {
    width: 100%;
  }

  .site-brand img {
    width: 310px;
    max-width: 100%;
  }
}

/* Final approved logo sizes */
.site-brand img {
  width: 460px !important;
  max-width: 46vw;
  height: auto;
}

@media (max-width: 980px) {
  .site-brand img {
    width: 400px !important;
    max-width: 50vw;
  }
}

@media (max-width: 720px) {
  .site-brand img {
    width: 310px !important;
    max-width: 100%;
  }
}

/* Current job-pricing and revision pages */
.site-brand img[src="/assets/brand/psaf-logo.png"] {
  content: url("/assets/brand/psaf-logo.png");
}
.parts-list {
  min-height: 340px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}
.pricing-mode {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid rgba(127, 29, 45, 0.55);
  border-radius: 16px;
  background: rgba(127, 29, 45, 0.09);
}
.price-preview {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.price-preview span {
  display: flex;
  flex-direction: column;
  min-width: 140px;
}
.price-preview strong {
  font-size: 1.25rem;
}
@media (max-width: 720px) {
  .price-preview {
    justify-content: flex-start;
  }
}
