/* ============================================================
   SolidifyUSA — Approval flow styles (recreated reference design)
   ============================================================ */

:root {
  /* SolidifyUSA brand palette (from solidifyusa.com) */
  --brand-blue: #114d7e; /* primary brand dark blue */
  --brand-blue-mid: #1a639e;
  --brand-blue-light: #e7f4ff;
  --brand-green: #9ab447; /* accent green */
  --green: #114d7e; /* interactive accent (CTAs, links) — brand blue */
  --green-light: var(--brand-blue-light);
  --blue: #114d7e; /* offer card side panel */
  --footer-blue: #114d7e;
  --text: #282f30;
  --text-muted: #505b60;
  --text-faint: #5f686c;
  --divider: #dce7eb;
  --control-border: #8a9ba5;
  --font-body: 'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;
  --card-shadow: 0 8px 24px rgba(17, 77, 126, 0.08);
  --signature-olive: #526921;
  --signature-olive-hover: #405319;
  --signature-radius: 19px;
  --portal-width: 1160px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  background: #fff;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font-family: inherit; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ---------- App bar ---------- */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--divider);
}
.app-bar-inner {
  max-width: calc(var(--portal-width) + 48px);
  margin: 0 auto;
  min-height: 68px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.app-logo { display: inline-flex; align-items: center; text-decoration: none; }
.app-logo img { height: 36px; width: auto; display: block; }
.footer-logo img { height: 26px; width: auto; display: block; }
.app-bar-contact {
  margin-left: auto;
  font-size: 15px;
  color: var(--text-muted);
  white-space: nowrap;
}
.app-bar-contact a { display: inline-flex; color: var(--brand-blue); background: var(--brand-blue-light); padding: 7px 12px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.app-bar-contact a:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .app-bar-contact { font-size: 12px; }
  .app-logo img { height: 24px; }
  .app-bar-inner { gap: 12px; padding: 0 16px; }
  .app-bar-loc-title { font-size: 16px; white-space: nowrap; }
  .app-bar-loc { gap: 4px; }
  .close-btn { width: 32px; height: 32px; flex-shrink: 0; }
  .contact-prefix { display: none; }
}

/* LOC page top bar: close + title */
.app-bar-loc { display: flex; align-items: center; gap: 8px; min-height: 64px; }
.close-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: rgba(0, 0, 0, 0.54);
  transition: background 160ms ease;
}
.close-btn:hover { background: rgba(0, 0, 0, 0.08); }
.app-bar-loc-title { font-size: 20px; font-weight: 400; }

/* ---------- Main ---------- */
.main { flex: 1; width: 100%; display: flex; flex-direction: column; }
.page-content { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 36px clamp(16px, 3vw, 32px) 24px; }
.section-kicker { color: var(--brand-blue); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; overflow-wrap: anywhere; }

/* ---------- Summary (approval) page ---------- */
.congrats-heading, .offer-intro h1 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; line-height: 1.15; letter-spacing: -.04em; }
.approval-hero, .approved-products { width: 100%; max-width: var(--portal-width); }
.approval-hero { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: clamp(20px, 4vw, 38px); border-radius: var(--signature-radius); background: var(--brand-blue-light); }
.approval-hero h1, .admin-intro h1, .offer-intro h1 { margin: 6px 0 8px; }
#congrats-subtitle, #approval-terms { color: var(--text-muted); line-height: 1.5; }
.approval-limit { border-left: 1px solid #c7dbe8; padding-left: 28px; min-width: 0; }
.approval-amount { color: var(--brand-blue); font-size: clamp(25px, 4vw, 40px); font-weight: 800; letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#approval-terms { margin-top: 4px; font-size: 13px; }
.approved-products { margin-top: 28px; }
.approved-products h2 { font-size: 17px; margin-bottom: 12px; }
#offer-widgets { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; }
.offer-widget { min-width: 0; }
.offer-widget:only-child { width: min(100%, 400px); justify-self: center; }
.product-card { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; width: 100%; height: 100%; padding: 20px; background: #fff; border: 1px solid var(--divider); border-radius: var(--signature-radius); text-align: left; transition: border-color 140ms ease, box-shadow 140ms ease; }
.product-card:hover { border-color: #a2bdcd; box-shadow: var(--card-shadow); }
.product-card-panel { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; color: var(--brand-blue); background: var(--brand-blue-light); }
.product-card-panel .gauge { width: 21px; height: 21px; }
.offer-widget-label { font-size: 16px; font-weight: 800; }
.offer-figures { display: grid; gap: 4px; min-width: 0; }
.offer-value { font-size: clamp(19px, 2.4vw, 25px); font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.offer-title { font-size: 13px; color: var(--text-muted); }
.see-all-offers-btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 8px 13px; min-height: 36px; margin-top: 6px; background: var(--signature-olive); color: #fff; font-size: 13px; font-weight: 700; }
.product-card:hover .see-all-offers-btn { background: var(--signature-olive-hover); }
@media (max-width: 660px) {
  .approval-hero { grid-template-columns: 1fr; gap: 14px; }
  .approval-limit { border-left: 0; border-top: 1px solid #c7dbe8; padding: 12px 0 0; }
  #offer-widgets { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }
  .product-card { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; gap: 5px 9px; align-items: center; padding: 13px; }
  .product-card-panel { width: 35px; height: 35px; grid-row: 1 / 3; }
  .offer-figures { grid-column: 2; }
  .see-all-offers-btn { grid-area: 1 / 3 / 3 / 4; margin: 0; font-size: 12px; padding-inline: 9px; }
}
@media (max-width: 340px) {
  .see-all-offers-btn { grid-area: auto / 2 / auto / 3; justify-self: start; }
}

/* ---------- LOC (full offer) page ---------- */
.option-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  width: 100%;
  margin: 0 auto 18px;
  max-width: var(--portal-width);
}
.option-pill {
  min-width: 135px;
  padding: 8px 16px;
  border-radius: 16px;
  border: 1px solid var(--control-border);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  transition: background 160ms ease, border-color 160ms ease;
}
.option-pill:hover { background: #f3f9ff; }
.option-pill.selected { background: var(--green-light); border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.option-pill-amount { font-size: 17px; font-weight: 800; }
.option-pill-term { font-size: 13px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.option-pill-freq { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.option-pill.selected .option-pill-term,
.option-pill.selected .option-pill-freq { color: #0e3a62; }

.loc-subtitle {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-muted);
}
.offer-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 36%);
  align-items: center;
  gap: 14px 24px;
  width: 100%;
  max-width: var(--portal-width);
  margin-bottom: 20px;
}
.offer-intro .btn-lockin-top { justify-self: center; }
@media (max-width: 680px) {
  .offer-intro { grid-template-columns: minmax(0, 1fr); }
  .offer-intro .btn-lockin-top { width: 100%; justify-self: stretch; padding-inline: 16px; }
}
.offer-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; max-width: var(--portal-width); gap: 14px; }

/* Calculator card */
.calc-card {
  width: 100%;
  background: var(--brand-blue-light);
  border: 1px solid #c7dbe8;
  border-radius: var(--signature-radius);
  padding: clamp(16px, 3vw, 27px);
}
.calc-card-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.calc-card-title h2 { font-size: 21px; font-weight: 800; color: var(--brand-blue); }
.calc-card-title .gauge { color: var(--brand-blue); flex-shrink: 0; }
.calc-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.calc-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.calc-input-box {
  display: flex; align-items: baseline; gap: 4px;
  border: 1px solid var(--control-border);
  border-radius: 11px;
  padding: 12px 14px;
  background: #fff;
}
.calc-input-box:focus-within { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.calc-input-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--brand-blue);
  font-size: 20px;
  font-weight: 800;
  width: 100%;
  min-width: 0;
}
.calc-input-box input:disabled { opacity: 0.85; cursor: default; }
.calc-input-box .currency { font-size: 20px; font-weight: 800; color: var(--brand-blue); }
.calc-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* Slider */
.slider { margin-top: 14px; }
.slider input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #678ba6;
}
.slider input[type='range']:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 5px; }
.slider input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--green);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.slider input[type='range']::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--green);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.slider input[type='range']:disabled { opacity: 0.6; cursor: default; }
.slider input[type='range']:disabled::-webkit-slider-thumb { cursor: default; }
.slider-value-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* Details card */
.details-card {
  width: 100%;
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: var(--signature-radius);
  padding: clamp(16px, 3vw, 27px);
}
.details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 26px; }
.details-grid:has(#cost-column[hidden]) { grid-template-columns: minmax(0, 1fr); }
.details-column h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.detail-row {
  display: flex; justify-content: space-between; gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 14px;
}
.detail-row dt { color: var(--text-muted); }
.detail-row dd { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.footnote { font-size: 13px; color: var(--text-muted); margin-top: 16px; max-width: 70ch; }
@media (max-width: 760px) {
  .details-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 570px) {
  .calc-controls { grid-template-columns: 1fr; }
}
@media (min-width: 960px) {
  .offer-detail-grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.4fr); align-items: start; }
  .offer-detail-grid .calc-controls { grid-template-columns: 1fr; }
}

/* Closing requirements */
/* rep call to action ("to secure your funding, contact your rep ___") */
.rep-cta {
  width: 100%;
  max-width: 980px;
  margin-top: 32px;
  padding: 26px 30px;
  border-radius: 16px;
  border: 1px solid var(--divider);
  background: var(--brand-blue-light);
  color: var(--text);
  text-align: center;
}
.rep-cta-title { margin: 0; font-size: 19px; font-weight: 500; line-height: 1.4; }
.rep-cta-title strong { font-weight: 800; }
.rep-cta-actions { margin-top: 16px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rep-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-blue);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rep-cta-email { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.rep-cta-link:hover { box-shadow: var(--card-shadow); text-decoration: underline; }
.summary-page .rep-cta { max-width: var(--portal-width); }
@media (max-width: 640px) {
  .rep-cta { padding: 22px 18px; }
  .rep-cta-title { font-size: 17px; }
}

.closing-requirements { width: 100%; max-width: var(--portal-width); margin-top: 22px; padding: clamp(16px, 3vw, 27px); border: 1px solid var(--divider); border-radius: var(--signature-radius); }
.closing-requirements h3 { font-size: 20px; font-weight: 500; margin-bottom: 16px; }
.req-list { list-style: none; }
.req-item { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; font-size: 16px; line-height: 1.5; }
.req-item svg { flex-shrink: 0; margin-top: 4px; color: var(--text-faint); }

/* Payment schedule */
.payment-schedule { width: 100%; max-width: var(--portal-width); margin-top: 14px; }
.schedule-toggle {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  border: 1px solid var(--divider);
  border-radius: var(--signature-radius);
  font-size: 15px;
  font-weight: 800;
}
.schedule-toggle[aria-expanded='true'] { border-radius: var(--signature-radius) var(--signature-radius) 0 0; }
.schedule-toggle .chev { transition: transform 180ms ease; color: var(--text-muted); }
.schedule-toggle[aria-expanded='true'] .chev { transform: rotate(180deg); }
.schedule-panel { border: 1px solid var(--divider); border-top: none; border-radius: 0 0 var(--signature-radius) var(--signature-radius); background: #fff; }
.schedule-panel[hidden] { display: none; }
.schedule-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 20px 18px 8px; }
.schedule-summary-item .k { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.schedule-summary-item .v { font-size: 18px; font-weight: 500; }
@media (max-width: 640px) { .schedule-summary { grid-template-columns: 1fr; } }
.schedule-table-wrap { overflow-x: auto; padding: 0 18px 18px; }
.schedule-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.schedule-table th, .schedule-table td { padding: 10px 12px; text-align: right; font-size: 14px; border-bottom: 1px solid var(--divider); }
.schedule-table th { color: var(--text-muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.schedule-table td:first-child, .schedule-table th:first-child { text-align: left; }
.schedule-table tr:last-child td { border-bottom: none; }
.schedule-pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 0 18px 18px; font-size: 13px; color: var(--text-muted); }
.pager-btn {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background 160ms ease;
}
.pager-btn:hover:not(:disabled) { background: rgba(0, 0, 0, 0.08); color: var(--text); }
.pager-btn:disabled { opacity: 0.3; cursor: default; }

.disclaimer { width: 100%; max-width: 980px; font-size: 13px; color: var(--text-muted); margin-top: 20px; line-height: 1.55; }

/* ---------- Pre-footer + footer ---------- */
.pre-footer {
  width: 100%;
  max-width: 1180px;
  margin: 40px auto 0;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.trademark-note { font-size: 12px; color: var(--text-muted); line-height: 1.5; max-width: 72ch; }
.security-mark { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.security-mark svg { color: var(--brand-green); }

.footer { background: var(--footer-blue); color: #fff; margin-top: 24px; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-inner .copyright { font-size: 12px; }
.footer-links { display: flex; gap: 20px; font-size: 12px; }
.footer-links a { color: #cfd8e3; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 700px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .pre-footer { justify-content: center; text-align: center; }
}

/* ---------- Empty state ---------- */
.empty-state { max-width: 560px; text-align: center; margin: 64px auto; }
.empty-state h2 { font-size: 24px; font-weight: 500; margin-bottom: 12px; }
.empty-state p { color: var(--text-muted); line-height: 1.6; }
.empty-state a { color: var(--green); font-weight: 500; }

/* ---------- Approval balloons ---------- */
.balloon-overlay {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 9999;
}

.balloon {
  position: absolute;
  left: var(--balloon-x);
  bottom: -112px;
  width: var(--balloon-size);
  animation: balloon-rise var(--balloon-duration) cubic-bezier(.32, .22, .55, .92) var(--balloon-delay) both;
}
.balloon svg {
  display: block;
  width: 100%;
  height: auto;
  animation: balloon-sway 1.35s ease-in-out infinite alternate;
}
.balloon-overlay--burst .balloon { bottom: -80px; }

@keyframes balloon-rise {
  0% { transform: translate(-50%, 0); opacity: 0; }
  12% { opacity: .86; }
  84% { opacity: .83; }
  100% { transform: translate(calc(-50% + var(--balloon-drift)), calc(-100vh - 90px)); opacity: 0; }
}
@keyframes balloon-sway {
  from { transform: rotate(-8deg); }
  to { transform: rotate(8deg); }
}
@media (max-width: 560px) {
  .balloon { width: calc(var(--balloon-size) * .76); }
}
@media (prefers-reduced-motion: reduce) {
  .balloon-overlay { display: none; }
}

/* ---------- Load-in animation ---------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise-in { animation: rise-in 480ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.rise-in-delay-1 { animation-delay: 90ms; }
.rise-in-delay-2 { animation-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  .rise-in, .rise-in-delay-1, .rise-in-delay-2 { animation: none; }
}

/* ============================================================
   Backend additions — loader, product calculator variants, admin
   ============================================================ */

/* ---------- App loader ---------- */
#app-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(17, 77, 126, 0.12);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid #d7e4fa;
  border-top-color: #114d7e;
  animation: loader-spin 0.8s linear infinite;
}
@keyframes loader-spin { to { transform: rotate(360deg); } }

/* ---------- Calculator card variants per product ---------- */
/* ---------- Admin console ---------- */
.admin-badge {
  margin-left: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.admin-page { text-align: left; background: #f6faff; }
.admin-intro, .admin-workspace { width: 100%; max-width: var(--portal-width); }
.admin-intro { margin-bottom: 22px; }
.admin-intro .congrats-subtitle { font-size: 15px; line-height: 1.5; color: var(--text-muted); }
.admin-workspace { display: grid; grid-template-columns: minmax(0, 1fr); }
.admin-workspace-rail { min-width: 0; }
@media (min-width: 1050px) {
  .admin-workspace { grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  #admin-form-card .offer-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, .6fr) minmax(0, .9fr) minmax(0, 1fr) minmax(0, .88fr) 22px; gap: 6px; }
}

.admin-card {
  width: 100%;
  max-width: var(--portal-width);
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: var(--signature-radius);
  padding: 22px;
  margin: 0 auto 16px;
}
.admin-card h2 { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.admin-card h3.admin-subhead { font-size: 15px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin: 26px 0 12px; }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.admin-field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.admin-field input, .admin-field textarea, .admin-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--control-border);
  border-radius: 11px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
}
.admin-field input:focus, .admin-field textarea:focus { outline: 2px solid var(--brand-blue-mid); outline-offset: 0; border-color: var(--brand-blue-mid); }
.admin-hint { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.admin-hint-inline { font-weight: 400; color: var(--text-muted); }

/* product toggles */
.admin-products { display: flex; gap: 12px; flex-wrap: wrap; }
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 2px solid var(--divider);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle:focus-within:has(input:focus-visible) { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.toggle.on { border-color: var(--brand-blue); background: var(--brand-blue-light); }
.toggle-dot { width: 12px; height: 12px; border-radius: 50%; }
.toggle-dot.loc { background: var(--blue); }
.toggle-dot.term { background: #49af67; }
.toggle-dot.law { background: #58595b; }

/* offer rows */
.offer-group { margin-bottom: 14px; }
.offer-group-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.offer-row {
  display: grid;
  grid-template-columns: 130px 84px 88px 100px 116px 28px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.offer-row .of-unit-fixed {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}
.offer-row input, .offer-row select {
  width: 100%;
  min-width: 0;
  padding: 9px 6px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
}
.offer-row .of-remove {
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  border: 0;
  background: transparent;
  padding: 4px 0;
}
.offer-row .of-remove:hover { color: #c62828; }
.of-payment-panel {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid var(--divider);
  border-radius: 10px;
  background: #f6faff;
  font-size: 13px;
}
.of-payment-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.of-estimate { font-weight: 700; font-variant-numeric: tabular-nums; }
.of-manual-toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.offer-row .of-manual { width: 17px; height: 17px; flex-basis: 17px; }
.of-entered { margin-top: 8px; }
.of-entered label { display: block; margin-bottom: 4px; }
.of-entered input { background: #fff; max-width: 200px; }
.of-payment-warning { color: #783c08; font-weight: 700; margin-top: 8px; }
.schedule-notice { padding: 13px 16px; color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.admin-field .admin-visibility-check { margin-top: 8px; font-size: 13px; }
.btn-small { padding: 6px 14px; font-size: 13px; }

.admin-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn-primary {
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--signature-olive);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
}
.btn-primary:hover:not(:disabled) { background: var(--signature-olive-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-ghost {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--divider);
  color: var(--brand-blue);
  font-weight: 500;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}
.btn-ghost:hover { background: var(--brand-blue-light); }
.btn-danger { color: #c62828; }
.btn-danger:hover { background: #fdecea; }

.admin-alert {
  width: 100%;
  max-width: var(--portal-width);
  margin: 0 auto 20px;
  padding: 14px 18px;
  border-radius: 10px;
  background: #eaf4ea;
  border: 1px solid #9ab447;
  font-size: 15px;
}
.admin-alert-error { background: #fdecea; border-color: #c62828; }

/* links */
.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--divider);
  border-radius: 10px;
  margin-bottom: 10px;
}
.link-row-primary { border-color: var(--brand-blue); background: #f5f9ff; }
.link-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.link-label { font-size: 14px; font-weight: 500; }
.link-row code {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
  white-space: normal;
}

/* table */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 2px solid var(--divider);
}
.admin-table td { padding: 12px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.admin-table a { color: var(--brand-blue); font-weight: 500; }
.td-date { white-space: nowrap; color: var(--text-muted); }
#approvals-table { min-width: 390px; }
#approvals-table th, #approvals-table td { padding: 9px 6px; }
#approvals-table .td-actions { white-space: nowrap; }
#approvals-table .td-actions .btn-small { font-size: 12px; padding: 5px 9px; }
#approvals-table .td-link { white-space: nowrap; }
#approvals-table .td-link .btn-small { font-size: 12px; padding: 3px 8px; margin-left: 4px; }
@media (min-width: 1050px) {
  #approvals-table { table-layout: fixed; min-width: 0; font-size: 13px; }
  #approvals-table th { font-size: 10px; letter-spacing: .03em; }
  #approvals-table td { overflow-wrap: anywhere; }
  #approvals-table th:nth-child(1) { width: 28%; }
  #approvals-table th:nth-child(2) { width: 22%; }
  #approvals-table th:nth-child(3) { width: 23%; }
  #approvals-table th:nth-child(4) { width: 13%; }
  #approvals-table th:nth-child(5) { width: 14%; }
  #approvals-table .td-date { white-space: normal; overflow-wrap: normal; }
  #approvals-table .td-actions { white-space: normal; }
  #approvals-table .td-actions .btn-small { display: block; padding-inline: 6px; margin-bottom: 3px; }
  #approvals-table .td-link { white-space: normal; }
  #approvals-table .td-link .btn-small { display: block; margin: 4px 0 0; padding-inline: 6px; }
}

@media (max-width: 720px) {
  .admin-grid { grid-template-columns: 1fr; }
  .offer-row { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
  .admin-card { padding: 20px 18px; }
}
@media (max-width: 560px) {
  .admin-badge { margin-left: 0; font-size: 10px; letter-spacing: .02em; padding: 4px 7px; }
  .app-bar-loc { gap: 3px; }
  .app-bar-loc-title { font-size: 13px; }
  .app-bar-contact a { padding: 5px 7px; }
}
@media (max-width: 370px) {
  .app-bar-loc-title { display: none; }
}

/* ============================================================
   Early payoff discount (admin-configured, approval side)
   ============================================================ */
.early-payoff {
  width: 100%;
  max-width: 980px;
  margin-top: 32px;
  padding: 22px 28px;
  border-radius: 16px;
  border: 1px solid #cbe3d4;
  background: #f2f9f4;
}
.early-payoff h3 { font-size: 20px; font-weight: 500; margin-bottom: 10px; color: #2e7d4f; }
.early-payoff-notes { font-size: 16px; line-height: 1.55; color: var(--text); white-space: pre-line; }
@media (max-width: 640px) { .early-payoff { padding: 18px 16px; } }

/* ============================================================
   Lock in this offer (CTA + modal)
   ============================================================ */
.lockin-cta { width: 100%; max-width: var(--portal-width); margin-top: 20px; padding: 20px; border: 1px solid var(--divider); border-radius: var(--signature-radius); text-align: center; }
.btn-lockin {
  display: inline-block;
  padding: 15px 42px;
  border: none;
  border-radius: 999px;
  background: var(--signature-olive);
  color: #fff;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-lockin:hover:not(:disabled) { background: var(--signature-olive-hover); }
.btn-lockin:disabled { cursor: default; opacity: 0.85; }
.lockin-cta-hint { margin: 14px auto 0; max-width: 640px; font-size: 14px; line-height: 1.55; color: var(--text-muted); }

.lockin-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 29, 41, 0.55);
  backdrop-filter: blur(2px);
}
.lockin-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 30px 32px 26px;
  border-radius: var(--signature-radius);
  background: #fff;
  box-shadow: var(--card-shadow);
}
.lockin-modal h3 { font-size: 22px; font-weight: 500; margin-bottom: 6px; }
.lockin-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.lockin-close:hover { background: rgba(0, 0, 0, 0.06); }
.lockin-summary {
  margin: 4px 0 20px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--brand-blue-light);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
}
.lockin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lockin-grid .lockin-field:first-child { grid-column: 1 / -1; }
.lockin-field { margin-bottom: 14px; }
.lockin-field label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; color: var(--text-muted); }
.lockin-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: #fff;
}
.lockin-field input:focus { outline: none; border-color: var(--brand-blue-mid); box-shadow: 0 0 0 3px rgba(26, 99, 158, 0.15); }
.lockin-field input[type='file'] { padding: 8px; cursor: pointer; }
.lockin-req { color: #c62828; font-weight: 700; }
.lockin-file-hint { margin: 5px 0 0; font-size: 12px; color: var(--text-faint); }
.lockin-error {
  margin: 4px 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fdecea;
  color: #b71c1c;
  font-size: 14px;
}
.lockin-modal .btn-lockin { width: 100%; margin-top: 6px; }
.lockin-privacy { margin-top: 10px; font-size: 12px; color: var(--text-faint); text-align: center; }
.lockin-success { text-align: center; padding: 30px 10px 10px; }
.lockin-success svg { margin-bottom: 12px; }
.lockin-success h3 { margin-bottom: 10px; }
.lockin-success p { font-size: 15.5px; line-height: 1.6; color: var(--text-muted); }
.lockin-success a { color: var(--brand-blue); font-weight: 500; }
@media (max-width: 560px) {
  .lockin-grid { grid-template-columns: 1fr; }
  .lockin-modal { padding: 22px 18px 18px; }
}

/* ============================================================
   Admin console — early payoff checkbox + lockins
   ============================================================ */
.admin-field .admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.admin-check input { flex: 0 0 18px; width: 18px; height: 18px; accent-color: var(--signature-olive); cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  .product-card, .option-pill, .rep-cta-link, .schedule-toggle .chev, .btn-lockin { transition: none; }
}
