@font-face {
  font-family: "CotifulVelocity";
  src: url("fonts/velocity.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #f3f1eb;
  --surface: #ffffff;
  --surface-soft: #faf9f5;
  --ink: #151512;
  --muted: #6e6a61;
  --line: #dfd8ca;
  --teal: #1d211d;
  --teal-2: #383d34;
  --teal-soft: #e8ebe4;
  --oxblood: #6d2e39;
  --oxblood-soft: #f0dce0;
  --olive: #687055;
  --sand: #d6bc8c;
  --amber: #9f6845;
  --shadow: 0 18px 44px rgba(21, 21, 18, 0.075);
  color-scheme: light;
  font-family: "Segoe UI Variable Text", Aptos, "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(159, 104, 69, 0.08), transparent 34%),
    linear-gradient(180deg, #fbfaf7 0, var(--bg) 420px),
    var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 92px;
}

.hidden {
  display: none !important;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
}

.sidebar {
  padding: 28px 24px;
  background:
    linear-gradient(180deg, rgba(214, 188, 140, 0.2), transparent 34%),
    #fbfaf7;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid var(--line);
}

.brand-row {
  display: grid;
  gap: 11px;
}

.brand-logo {
  width: 172px;
  height: 92px;
  object-fit: contain;
  object-position: left center;
}

.brand-caption {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  min-height: 42px;
  width: 100%;
  text-align: left;
  color: #46433c;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  padding: 0 13px;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
  background: rgba(21, 21, 18, 0.06);
  border-left-color: #11110f;
  border-radius: 0 7px 7px 0;
}

.side-note {
  margin-top: auto;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.side-note span,
.kicker {
  display: block;
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.side-note span {
  color: var(--amber);
}

.side-note strong {
  display: block;
  line-height: 1.25;
}

.side-note p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.main {
  min-width: 0;
  padding: 30px;
}

.topbar,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.topbar {
  margin-bottom: 24px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: "Segoe UI Variable Display", "Bahnschrift", Aptos, "Segoe UI", sans-serif;
  font-size: 35px;
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 760;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 7px;
  font-size: 17px;
  line-height: 1.2;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.top-actions,
.form-actions,
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  min-height: 40px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 7px;
  border: 1px solid transparent;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 780;
  text-decoration: none;
}

.button.primary {
  color: #fff;
  background: #11110f;
}

.button.primary:hover {
  background: var(--teal-2);
}

.button.secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.button.secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.button.text {
  padding: 0;
  border: 0;
  color: var(--teal);
  background: transparent;
}

.import-button input {
  display: none;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card,
.panel,
.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 18px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
}

.metric-card span {
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 31px;
  line-height: 1;
}

.metric-card.dark {
  background: #11110f;
  border-color: #11110f;
  color: #fff;
}

.metric-card.dark span,
.metric-card.dark small {
  color: rgba(255, 255, 255, 0.72);
}

.two-column,
.costing-layout,
.offer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.panel,
.form-panel {
  padding: 22px;
}

.form-panel {
  margin-bottom: 18px;
}

.spaced {
  margin-top: 18px;
}

.stack,
.card-grid,
.timeline,
.cost-list {
  display: grid;
  gap: 12px;
}

.cost-history-block {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.compact-table table td span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-card,
.data-card,
.timeline-card,
.cost-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.mini-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.mini-card strong,
.data-card strong,
.timeline-card strong {
  display: block;
  margin-bottom: 5px;
}

.mini-card p,
.data-card p,
.timeline-card p {
  margin-bottom: 0;
  font-size: 13px;
}

.badge,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.badge.hot {
  background: var(--oxblood-soft);
  color: var(--oxblood);
}

.data-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
}

.data-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.product-visual {
  position: relative;
  min-height: 172px;
  margin-bottom: 14px;
  border-radius: 7px;
  border: 1px solid rgba(31, 36, 34, 0.08);
  background:
    radial-gradient(circle at 74% 25%, rgba(109, 46, 57, 0.15), transparent 29%),
    linear-gradient(135deg, rgba(29, 33, 29, 0.18), transparent 52%),
    repeating-linear-gradient(90deg, rgba(31, 36, 34, 0.055) 0 1px, transparent 1px 12px),
    #eeeae0;
  background-position: center;
  background-size: cover;
}

.photo-count {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 17, 15, 0.72);
  font-size: 11px;
  font-weight: 850;
}

.product-visual.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 21, 18, 0.42);
}

.product-modal-card {
  position: relative;
  z-index: 1;
  width: min(1160px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(21, 21, 18, 0.22);
  padding: 24px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.25fr);
  gap: 20px;
  align-items: start;
}

.modal-image {
  min-height: 460px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(21, 21, 18, 0.06), rgba(255, 255, 255, 0.1)),
    #f0ece2;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

.modal-image.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 750;
}

.thumb-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.thumb {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background-position: center;
  background-size: cover;
  background-color: #f0ece2;
}

.thumb.active {
  border-color: #11110f;
  box-shadow: 0 0 0 2px rgba(21, 21, 18, 0.12);
}

.detail-stack {
  display: grid;
  gap: 12px;
}

.detail-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

.detail-block h3 {
  margin-bottom: 9px;
}

.detail-block pre {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  color: var(--muted);
  line-height: 1.45;
}

.contact-modal-card {
  width: min(980px, 100%);
}

.stacked-cell {
  display: grid;
  gap: 5px;
  min-width: 180px;
}

.stacked-cell span {
  display: block;
}

.stacked-cell small {
  color: #8a4d10;
  font-weight: 750;
}

.quality-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-left: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  background: #fff;
  color: var(--muted);
}

.quality-badge.ok {
  border-color: rgba(42, 111, 77, 0.28);
  background: #edf7ef;
  color: #226341;
}

.quality-badge.warn {
  border-color: rgba(165, 101, 28, 0.32);
  background: #fff5e7;
  color: #8a4d10;
}

.quality-badge.general {
  border-color: rgba(65, 91, 134, 0.28);
  background: #eef3fb;
  color: #2c4f81;
}

.quality-badge.muted {
  background: #f2f0ea;
  color: var(--muted);
}

.inline-link {
  font-weight: 850;
  color: #11110f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-check-grid {
  display: grid;
  gap: 8px;
}

.contact-check-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.contact-check-row:last-child {
  border-bottom: 0;
}

.contact-check-row > span:first-child {
  color: var(--muted);
  font-weight: 800;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.info-grid div {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fffefa;
}

.info-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.techpack-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.8fr);
  gap: 12px;
  align-items: stretch;
}

.techpack-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.techpack-photo {
  min-height: 118px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.techpack-photo.main {
  grid-row: span 2;
}

.techpack-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.techpack-photo-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-weight: 750;
}

.legacy-tech-field {
  display: none;
}

.techpack-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.choice-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.compact-choice-panel {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.7fr) minmax(170px, 0.8fr) auto;
  align-items: end;
}

.compact-choice-panel > div:first-child {
  align-self: center;
}

.compact-choice-panel h3 {
  margin: 3px 0 0;
}

.choice-group {
  display: grid;
  gap: 8px;
}

.choice-group strong {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.choice-pill input {
  width: 14px;
  min-height: 14px;
}

.composition-grid .choice-pill {
  max-width: 100%;
}

.table-editor-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.table-editor-head h3 {
  margin: 3px 0 0;
}

.editable-table-wrap,
.tech-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.editable-table,
.tech-table {
  min-width: 760px;
  width: 100%;
  border-collapse: collapse;
}

.editable-table th,
.editable-table td,
.tech-table th,
.tech-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 9px;
}

.editable-table th:last-child,
.editable-table td:last-child,
.tech-table th:last-child,
.tech-table td:last-child {
  border-right: 0;
}

.editable-table input {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  background: #fff;
  padding: 8px;
}

.editable-table input:focus {
  outline: 2px solid rgba(36, 79, 73, 0.18);
  background: #fbfaf6;
}

.tech-table {
  min-width: 0;
}

.tech-table td {
  color: var(--ink);
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.grid-form,
.toolbar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.grid-form .wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 7px;
  padding: 0 12px;
}

input,
select {
  min-height: 42px;
}

textarea {
  padding-top: 11px;
  padding-bottom: 11px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(36, 79, 73, 0.18);
  border-color: var(--teal);
}

.add-cost-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) 130px 95px auto;
  gap: 10px;
  margin: 18px 0;
}

.fabric-calculator,
.search-assistant {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(150px, 0.75fr) minmax(170px, 0.85fr) minmax(170px, 0.75fr);
  gap: 13px;
  align-items: end;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(23, 63, 58, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(232, 235, 228, 0.9), rgba(255, 255, 255, 0.88)),
    var(--surface);
}

.fabric-calculator h3,
.search-assistant h3 {
  margin-bottom: 6px;
}

.fabric-calculator p,
.search-assistant p {
  margin-bottom: 0;
  font-size: 13px;
}

.fabric-result {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #121a17;
  color: #fff;
}

.fabric-result span,
.fabric-result small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.fabric-result strong {
  font-size: 22px;
  line-height: 1;
}

.cost-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) 130px 92px auto;
  gap: 12px;
  align-items: center;
}

.cost-row input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.summary {
  position: sticky;
  top: 20px;
}

.summary dl {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.summary dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.summary dt {
  color: var(--muted);
}

.summary dd {
  margin: 0;
  font-weight: 850;
  text-align: right;
}

.summary-line.multi dd {
  display: grid;
  gap: 3px;
}

.summary-line.multi dd small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.warning-box {
  padding: 13px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 13px;
  line-height: 1.45;
}

.filter-bar {
  margin: 0 0 14px;
}

.search-assistant {
  grid-template-columns: minmax(250px, 1.4fr) minmax(145px, 0.65fr) minmax(150px, 0.65fr) minmax(170px, 0.75fr) minmax(160px, 0.7fr) auto;
  margin-bottom: 18px;
  align-items: end;
}

.search-results {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.search-link {
  display: grid;
  gap: 5px;
  min-height: 118px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(23, 63, 58, 0.15);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  text-decoration: none;
}

.search-link:hover {
  border-color: var(--teal);
  box-shadow: 0 12px 26px rgba(23, 63, 58, 0.1);
}

.search-link span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
}

.search-link strong {
  font-size: 13px;
  line-height: 1.35;
}

.search-link small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.search-meta {
  display: grid;
  gap: 5px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(21, 21, 18, 0.08);
}

.search-meta em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.lead-collector {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(23, 63, 58, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(232, 235, 228, 0.72), rgba(255, 255, 255, 0.92)),
    var(--surface);
}

.lead-collector h3 {
  margin-bottom: 6px;
}

.lead-collector p {
  margin-bottom: 0;
  font-size: 13px;
}

.collector-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.collector-grid .wide {
  grid-column: 1 / -1;
}

.bulk-scan-results {
  display: grid;
  gap: 8px;
}

.scan-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.scan-result-card.error {
  border-color: #d8a8a8;
  background: #fff4f4;
}

.scan-result-card p,
.scan-result-card span {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.lead-playbook {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.lead-playbook article {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lead-playbook span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
}

.lead-playbook strong {
  font-size: 15px;
}

.lead-playbook p {
  margin-bottom: 0;
  font-size: 13px;
}

.message-builder {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) minmax(180px, 0.7fr) minmax(150px, 0.55fr) auto;
  gap: 13px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(132, 52, 67, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(243, 221, 226, 0.62), rgba(255, 255, 255, 0.9)),
    var(--surface);
}

.message-builder h3 {
  margin-bottom: 6px;
}

.message-builder p {
  margin-bottom: 0;
  font-size: 13px;
}

.message-builder textarea {
  grid-column: 1 / -1;
  min-height: 140px;
  background: #fff;
}

.chip {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  font-weight: 780;
}

.chip.active,
.chip:hover {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.toolbar-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr) minmax(160px, 0.55fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.78);
}

.radar-console {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(36, 79, 73, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, #fffdfa 0%, #f3f7f1 100%);
}

.radar-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.radar-metrics article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.radar-metrics span,
.product-category-section .section-head span,
.customer-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.radar-metrics strong {
  font-size: 22px;
}

.radar-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.radar-form .wide {
  grid-column: span 2;
}

.radar-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.query-pill {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.product-category-section {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.section-head.compact {
  margin-bottom: 0;
}

.product-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-card-lite {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
}

.product-card-carousel {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #eee9df;
}

.product-card-carousel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f7f3eb;
}

.product-card-carousel.empty {
  color: var(--muted);
  font-weight: 850;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.carousel-arrow.prev {
  left: 8px;
}

.carousel-arrow.next {
  right: 8px;
}

.product-card-body {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.product-card-body h3 {
  margin: 0;
  font-size: 18px;
}

.customer-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.customer-card {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
}

.customer-card strong {
  display: block;
  font-size: 18px;
}

.offer-items-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
}

.offer-items-list {
  display: grid;
  gap: 10px;
}

.offer-item-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) 90px 120px minmax(150px, 0.75fr) minmax(150px, 0.75fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
}

.offer-catalog {
  display: grid;
  gap: 14px;
}

.offer-product-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  break-inside: avoid;
}

.offer-product-card figure {
  display: grid;
  place-items: center;
  min-height: 150px;
  margin: 0;
  background: #f3f1eb;
  border-radius: 8px;
  overflow: hidden;
}

.offer-product-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

td strong {
  display: block;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 850;
  padding: 0;
}

.link-button.danger {
  color: var(--oxblood);
}

.offer-preview {
  min-height: 600px;
  background: #fffefa;
}

.offer-doc {
  display: grid;
  gap: 18px;
}

.offer-doc-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.offer-logo {
  display: block;
  width: 142px;
  height: 42px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 6px;
}

.offer-visual {
  height: 210px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 25% 22%, rgba(113, 52, 60, 0.17), transparent 34%),
    linear-gradient(145deg, rgba(112, 120, 82, 0.26), rgba(36, 79, 73, 0.12)),
    repeating-linear-gradient(45deg, rgba(31, 36, 34, 0.06) 0 1px, transparent 1px 10px),
    #ebe2d3;
  background-position: center;
  background-size: cover;
}

.offer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.offer-row span {
  color: var(--muted);
}

.offer-techpack {
  display: grid;
  gap: 12px;
}

.timeline-card {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 14px;
  align-items: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 14px 16px;
  color: #fff;
  background: var(--teal);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.print-surface {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  html,
  body {
    width: auto;
    min-height: 0;
    background: #fff;
  }

  body * {
    visibility: hidden;
  }

  body > *:not(.print-surface) {
    display: none !important;
  }

  .print-surface,
  .print-surface * {
    visibility: visible;
  }

  .print-surface {
    display: block;
    position: static;
    inset: auto;
    padding: 0;
    background: white;
    color: #1f2422;
  }

  .print-brand {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 18mm;
    display: flex;
    align-items: flex-start;
    background: #fff;
  }

  .print-brand img {
    width: 38mm;
    height: 13mm;
    object-fit: contain;
    object-position: left top;
  }

  .print-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 9mm;
    display: flex;
    align-items: end;
    justify-content: center;
    font-family: "CotifulVelocity", Arial, sans-serif;
    font-size: 12px;
    color: #111;
    background: #fff;
  }

  .print-offer {
    font-family: Arial, sans-serif;
    max-width: 186mm;
    margin: 0 auto;
    padding: 20mm 0 13mm;
  }

  .print-offer.print-customer-offer {
    max-width: 186mm;
    padding: 0;
  }

  .print-offer.print-techpack {
    max-width: 190mm;
    padding-top: 0;
    font-size: 10px;
  }

  .print-offer.print-costing {
    max-width: 188mm;
    padding-top: 0;
    font-size: 10px;
  }

  .print-offer h1 {
    font-family: "CotifulVelocity", Georgia, "Times New Roman", serif;
    font-size: 32px;
  }

  .print-offer table {
    min-width: 0;
    width: 100%;
  }

  .print-offer .offer-product-card {
    grid-template-columns: 42mm minmax(0, 1fr);
    gap: 6mm;
    padding: 4mm;
  }

  .print-offer .offer-product-card figure {
    min-height: 35mm;
  }

  .print-offer .offer-doc {
    gap: 10px;
  }

  .print-techpack .techpack-print-doc {
    display: grid;
    gap: 6px;
  }

  .print-costing .costing-print-doc {
    display: grid;
    gap: 8px;
  }

  .print-techpack .offer-logo {
    display: none;
  }

  .print-techpack .offer-doc-head {
    padding-bottom: 6px;
  }

  .print-techpack .techpack-hero {
    grid-template-columns: minmax(0, 1.2fr) 50mm;
    gap: 7px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-techpack .detail-block {
    padding: 7px 8px;
  }

  .print-costing .detail-block {
    padding: 8px 9px;
  }

  .print-techpack .detail-block h3 {
    margin-bottom: 5px;
    font-size: 13px;
  }

  .print-techpack .offer-row {
    padding: 4px 0;
    gap: 8px;
  }

  .print-techpack .techpack-photo-grid {
    gap: 4px;
  }

  .print-techpack .techpack-photo,
  .print-techpack .techpack-photo-empty {
    min-height: 34mm;
    max-height: 58mm;
    border-radius: 5px;
  }

  .print-offer .offer-doc-head,
  .print-offer .offer-row,
  .print-offer .detail-block,
  .print-offer .offer-techpack,
  .print-offer .tech-table-wrap {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-offer .offer-visual {
    height: 95px;
  }

  .print-offer .tech-table th,
  .print-offer .tech-table td,
  .print-offer th,
  .print-offer td {
    padding: 6px 7px;
    font-size: 10px;
  }

  .print-costing .muted-row {
    color: #777;
    background: #f6f3ed;
  }

  .print-costing .internal-note {
    border: 1px solid #111;
    padding: 7px 9px;
    font-weight: 700;
  }

  .print-techpack .tech-table-wrap {
    overflow: visible;
  }

  .print-techpack .tech-table {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
  }

  .print-techpack .tech-table th,
  .print-techpack .tech-table td {
    padding: 3px 4px;
    font-size: 7.5px;
    line-height: 1.2;
    word-break: break-word;
  }

  .print-offer .button,
  .print-offer .link-button {
    display: none;
  }
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 18px;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .side-note {
    display: none;
  }

  .two-column,
  .costing-layout,
  .offer-layout {
    grid-template-columns: 1fr;
  }

  .summary {
    position: static;
  }
}

@media (max-width: 840px) {
  .main {
    padding: 18px;
  }

  .topbar,
  .section-head {
    display: grid;
  }

  .top-actions {
    justify-content: flex-start;
  }

  h1 {
    font-size: 29px;
  }

  .metric-grid,
  .card-grid,
  .lead-playbook,
  .message-builder,
  .grid-form,
  .toolbar-grid,
  .toolbar-panel,
  .add-cost-row,
  .compact-choice-panel,
  .fabric-calculator,
  .collector-grid,
  .radar-form,
  .radar-metrics,
  .product-card-grid,
  .customer-card-grid,
  .offer-item-row,
  .offer-product-card,
  .search-assistant,
  .search-results {
    grid-template-columns: 1fr;
  }

  .radar-form .wide {
    grid-column: auto;
  }

  .cost-row,
  .timeline-card,
  .product-detail-grid,
  .contact-check-row,
  .info-grid,
  .modal-head {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 12px;
  }

  .product-modal-card {
    max-height: calc(100vh - 24px);
    padding: 16px;
  }

  .modal-image {
    min-height: 320px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

 .auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 20%, rgba(214, 188, 140, 0.26), transparent 32%),
    linear-gradient(135deg, #fbfaf7 0%, #f0ece3 100%);
}

.auth-card {
  width: min(900px, 100%);
  min-height: 520px;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  overflow: hidden;
  border: 1px solid rgba(21, 21, 18, 0.1);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(21, 21, 18, 0.13);
}

.auth-brand-panel {
  display: grid;
  align-content: space-between;
  gap: 28px;
  padding: 38px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(109, 46, 57, 0.22), transparent 38%),
    linear-gradient(180deg, #171813 0%, #27291f 100%);
}

.auth-logo {
  width: 164px;
  height: auto;
  object-fit: contain;
  object-position: left center;
  display: block;
  filter: brightness(0) invert(1);
}

.auth-eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-brand-panel h2 {
  max-width: 310px;
  margin: 0;
  color: #fff;
  font-family: "Segoe UI Variable Display", "Bahnschrift", Aptos, "Segoe UI", sans-serif;
  font-size: 31px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.auth-brand-note {
  max-width: 300px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.auth-form-panel {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 46px 54px;
}

.auth-form-panel h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.auth-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-title-logo {
  width: 134px;
  height: auto;
  display: inline-block;
  object-fit: contain;
}

.auth-title span {
  font-family: "Segoe UI Variable Display", Aptos, "Segoe UI", sans-serif;
  font-weight: 850;
}

.auth-copy {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-card label {
  display: grid;
  gap: 8px;
  color: #46433c;
  font-weight: 800;
  font-size: 13px;
}

.auth-card input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-card input:focus {
  border-color: #11110f;
  box-shadow: 0 0 0 4px rgba(21, 21, 18, 0.08);
}

.auth-submit {
  min-height: 48px;
  margin-top: 4px;
  border-radius: 12px;
}

.auth-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-status.error {
  color: var(--oxblood);
}

@media (max-width: 760px) {
  .auth-card {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    padding: 28px;
  }

  .auth-brand-panel h2 {
    font-size: 25px;
  }

  .auth-form-panel {
    padding: 30px 26px;
  }

  .auth-form-panel h1 {
    font-size: 28px;
  }

  .auth-title-logo {
    width: 112px;
  }
}
