:root {
  --purrch-bg: #f7f6f2;
  --purrch-card: #ffffff;
  --purrch-text: #111111;
  --purrch-muted: #66615b;
  --purrch-border: #e7e2da;
  --purrch-accent: #9a7652;
}

.purrch-brief,
.purrch-panel,
.purrch-configurator {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 20px;
  color: var(--purrch-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.purrch-card {
  background: var(--purrch-card);
  border: 1px solid var(--purrch-border);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 24px 70px rgba(17, 17, 17, 0.06);
}

.purrch-hero-card {
  margin-bottom: 28px;
}

.purrch-eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--purrch-accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.purrch-card h2,
.purrch-card h3 {
  margin: 0 0 14px;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.purrch-card h2 { font-size: clamp(40px, 8vw, 84px); }
.purrch-card h3 { font-size: clamp(28px, 5vw, 48px); }
.purrch-card p { color: var(--purrch-muted); font-size: 18px; line-height: 1.55; }

.purrch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.purrch-full { grid-column: 1 / -1; }

.purrch-brief label,
.purrch-configurator label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.purrch-brief input,
.purrch-brief select,
.purrch-brief textarea,
.purrch-configurator input,
.purrch-configurator select,
.purrch-configurator textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--purrch-border);
  border-radius: 18px;
  padding: 16px 18px;
  font: inherit;
  background: #fff;
}

.purrch-check {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
  color: var(--purrch-muted);
}

.purrch-check input {
  width: auto !important;
  margin-top: 5px;
}

.purrch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  background: #111;
  color: #fff !important;
  text-decoration: none;
  font-weight: 900;
  border: 2px solid #111;
  cursor: pointer;
}

.purrch-button-secondary {
  background: #fff;
  color: #111 !important;
}

.purrch-orders-list {
  display: grid;
  gap: 20px;
}

.purrch-order-card {
  display: grid;
  gap: 24px;
}

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

.purrch-payment-grid div {
  border: 1px solid var(--purrch-border);
  border-radius: 20px;
  padding: 18px;
  background: #fbfaf7;
}

.purrch-payment-grid span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--purrch-muted);
  text-transform: uppercase;
}

.purrch-payment-grid strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.purrch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.purrch-config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 20px;
}

.purrch-viewport {
  min-height: 560px;
  border: 1px solid var(--purrch-border);
  border-radius: 32px;
  background: linear-gradient(180deg, #fff, #f4f1ea);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.purrch-cube-preview {
  width: min(56vw, 380px);
  height: 420px;
  border-radius: 24px;
  border: 3px solid #111;
  background:
    linear-gradient(90deg, transparent 45%, #111 45% 49%, transparent 49%),
    linear-gradient(180deg, transparent 20%, #c8b292 20% 23%, transparent 23% 52%, #c8b292 52% 55%, transparent 55%);
  display: grid;
  place-items: end center;
  padding: 24px;
  text-align: center;
  color: var(--purrch-muted);
  font-weight: 800;
}

.purrch-config-fields {
  display: grid;
  gap: 12px;
}

@media (max-width: 760px) {
  .purrch-brief,
  .purrch-panel,
  .purrch-configurator {
    padding: 24px 14px;
  }

  .purrch-card {
    padding: 26px 20px;
    border-radius: 24px;
  }

  .purrch-grid,
  .purrch-payment-grid,
  .purrch-config-layout {
    grid-template-columns: 1fr;
  }

  .purrch-actions,
  .purrch-button {
    width: 100%;
  }

  .purrch-card h2 {
    font-size: clamp(42px, 13vw, 64px);
    overflow-wrap: normal;
    word-break: normal;
  }

  .purrch-viewport {
    min-height: 360px;
  }
}

.purrch-section-card {
  margin-bottom: 22px;
}

.purrch-section-card .purrch-eyebrow {
  margin-bottom: 18px;
}

.purrch-notice {
  margin: 0 0 20px;
  border-radius: 20px;
  padding: 16px 18px;
  font-weight: 800;
  border: 1px solid var(--purrch-border);
  background: #fff;
}

.purrch-notice-success {
  background: #f4fbf5;
  border-color: #cbe8cf;
  color: #1f6b2a;
}

.purrch-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.purrch-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--purrch-border);
}

.purrch-badge.is-unlocked {
  background: #111;
  color: #fff;
  border-color: #111;
}

.purrch-badge.is-locked {
  background: #fbfaf7;
  color: var(--purrch-muted);
}

.purrch-button-disabled {
  background: #eee9e1;
  border-color: #eee9e1;
  color: #6f675d !important;
  cursor: not-allowed;
}

.purrch-brief .purrch-card + .purrch-card {
  margin-top: 22px;
}

@media (max-width: 760px) {
  .purrch-order-head {
    flex-direction: column;
  }

  .purrch-badge {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .purrch-section-card {
    margin-bottom: 18px;
  }

  .purrch-payment-grid strong {
    font-size: 20px;
  }
}

.purrch-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.purrch-section-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.purrch-section-headline h3 {
  margin-bottom: 0;
}

.purrch-file-list,
.purrch-approval-list {
  display: grid;
  gap: 12px;
}

.purrch-file-row,
.purrch-approval-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--purrch-border);
  border-radius: 20px;
  padding: 18px;
  background: #fbfaf7;
}

.purrch-file-row strong,
.purrch-approval-row strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.purrch-file-row span,
.purrch-approval-row span,
.purrch-timeline small {
  display: block;
  margin-top: 4px;
  color: var(--purrch-muted);
  font-size: 13px;
  font-weight: 800;
}

.purrch-approval-row p,
.purrch-timeline p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.45;
}

.purrch-mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: #111;
  color: #fff !important;
  text-decoration: none;
  border: 1px solid #111;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.purrch-mini-button-light {
  background: #fff;
  color: #111 !important;
}

.purrch-mini-button.is-disabled {
  background: #eee9e1;
  border-color: #eee9e1;
  color: #6f675d !important;
}

.purrch-mini-button.is-success {
  background: #e8f5ea;
  border-color: #cbe8cf;
  color: #1f6b2a !important;
}

.purrch-approval-form {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.purrch-approval-form-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 4px;
}

.purrch-approval-form textarea {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--purrch-border);
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  box-sizing: border-box;
}

.purrch-timeline {
  position: relative;
  display: grid;
  gap: 16px;
}

.purrch-timeline-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 14px;
}

.purrch-timeline-item > span {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 999px;
  background: #111;
  box-shadow: 0 0 0 6px #eee9e1;
}

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

@media (min-width: 1020px) {
  .purrch-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .purrch-section-headline,
  .purrch-file-row,
  .purrch-approval-row,
  .purrch-approval-form-wide {
    grid-template-columns: 1fr;
  }

  .purrch-section-headline {
    align-items: stretch;
  }

  .purrch-mini-button,
  .purrch-approval-form,
  .purrch-approval-form button {
    width: 100%;
  }
}

/* Purrch configurator v5 */
.purrch-config-layout-v5 {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: start;
}

.purrch-viewport-v5 {
  position: sticky;
  top: 24px;
  min-height: 720px;
  padding: 22px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
  background: radial-gradient(circle at 50% 18%, #ffffff 0, #f6f3ed 46%, #ece7dd 100%);
}

.purrch-model-stage {
  position: relative;
  width: 100%;
  min-height: 560px;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.purrch-model-room {
  position: relative;
  width: 320px;
  height: 430px;
  max-width: 92%;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.05) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, rgba(17, 17, 17, 0.04) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.22));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7), 0 40px 90px rgba(17, 17, 17, 0.08);
  transition: width .25s ease, height .25s ease;
  overflow: hidden;
}

.purrch-model-label {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 5;
  font-size: 11px;
  font-weight: 900;
  color: var(--purrch-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.purrch-model-base,
.purrch-model-cubby,
.purrch-model-column,
.purrch-model-steps i,
.purrch-model-shelves i,
.purrch-model-hammock,
.purrch-model-perch {
  position: absolute;
  display: block;
  box-shadow: 0 16px 30px rgba(17, 17, 17, 0.16);
}

.purrch-model-base {
  left: 8%;
  right: 8%;
  bottom: 26px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6f5138, #b38a61 48%, #6f5138);
}

.purrch-model-column {
  bottom: 58px;
  width: 24px;
  border-radius: 999px;
  background: repeating-linear-gradient(0deg, #b89870 0 8px, #d7c1a3 8px 13px);
}

.purrch-model-column-a { left: 28%; height: 72%; }
.purrch-model-column-b { right: 25%; height: 82%; }
.purrch-model-column-c { left: 53%; height: 58%; opacity: .92; }

.purrch-model-cubby {
  left: 17%;
  bottom: 86px;
  width: 48%;
  height: 108px;
  border-radius: 28px;
  background: linear-gradient(135deg, #eee4d5, #cdb793);
}

.purrch-model-cubby::after {
  content: "";
  position: absolute;
  inset: 23px 34px 20px 34px;
  border-radius: 22px;
  background: #6a513b;
  box-shadow: inset 0 0 0 10px rgba(255,255,255,0.28);
}

.purrch-model-steps i,
.purrch-model-shelves i {
  width: 88px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7a5638, #c99c6f);
}

.purrch-model-shelves i {
  width: 118px;
  height: 30px;
  background: linear-gradient(90deg, #8a6544, #d8b184);
}

.purrch-model-hammock {
  left: 30%;
  bottom: 62px;
  width: 34%;
  height: 38px;
  border-radius: 0 0 50% 50%;
  background: #e8dfd3;
  transform: skewX(-8deg);
}

.purrch-model-perch {
  right: 12%;
  top: 56px;
  width: 140px;
  height: 90px;
  border-radius: 52px 52px 40px 40px;
  background: linear-gradient(135deg, #fff7ee, #d7c6ad);
}

.purrch-model-perch::before {
  content: "";
  position: absolute;
  inset: 20px 18px;
  border-radius: 999px;
  border: 10px solid rgba(122,86,56,.32);
}

.purrch-model-led {
  position: absolute;
  left: 26%;
  bottom: 176px;
  width: 28%;
  height: 4px;
  border-radius: 999px;
  background: #fff2c4;
  box-shadow: 0 0 20px #ffd978;
  z-index: 4;
}

.purrch-price-card {
  border: 1px solid var(--purrch-border);
  border-radius: 24px;
  padding: 22px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(16px);
}

.purrch-price-card span,
.purrch-price-card small {
  display: block;
  color: var(--purrch-muted);
  font-weight: 800;
}

.purrch-price-card strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1;
  letter-spacing: -.05em;
}

.purrch-config-fields-v5 {
  gap: 18px;
}

.purrch-config-group {
  padding: 24px;
  box-shadow: none;
}

.purrch-grid-tight {
  gap: 12px;
}

.purrch-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 12px;
}

.purrch-option-grid .purrch-check {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--purrch-border);
  border-radius: 16px;
  background: #fbfaf7;
  font-size: 14px;
  font-weight: 800;
}

.purrch-render-card pre {
  max-height: 260px;
  overflow: auto;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--purrch-border);
  border-radius: 18px;
  background: #111;
  color: #f7f6f2;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .purrch-viewport-v5 {
    position: static;
    min-height: 560px;
  }

  .purrch-model-stage {
    min-height: 410px;
  }

  .purrch-model-room {
    transform: scale(.78);
  }

  .purrch-option-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .purrch-viewport-v5 {
    padding: 14px;
    min-height: 500px;
  }

  .purrch-model-room {
    transform: scale(.68);
  }

  .purrch-price-card {
    padding: 18px;
  }
}

.purrch-message-card {
  overflow: hidden;
}

.purrch-message-thread {
  display: grid;
  gap: 12px;
  margin: 18px 0 20px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.purrch-message,
.purrch-message-empty {
  max-width: 78%;
  border: 1px solid var(--purrch-border);
  border-radius: 22px;
  padding: 16px 18px;
  background: #fbfaf7;
}

.purrch-message.is-client {
  justify-self: end;
  background: #111;
  color: #fff;
  border-color: #111;
}

.purrch-message.is-support {
  justify-self: start;
}

.purrch-message div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.purrch-message span {
  color: inherit;
  opacity: .65;
  font-size: 12px;
}

.purrch-message p,
.purrch-message-empty p {
  margin: 0;
  color: inherit;
  font-size: 15px;
  line-height: 1.55;
}

.purrch-message-form {
  display: grid;
  gap: 12px;
}

.purrch-message-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--purrch-border);
  border-radius: 20px;
  padding: 16px 18px;
  font: inherit;
  resize: vertical;
}

.purrch-section-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

@media (max-width: 760px) {
  .purrch-section-headline {
    align-items: stretch;
    flex-direction: column;
  }

  .purrch-message,
  .purrch-message-empty {
    max-width: 100%;
  }
}

/* v7 approvals/files polish */
.purrch-progress-wrap{margin-top:18px;max-width:520px}.purrch-progress-meta{display:flex;justify-content:space-between;gap:16px;font-size:13px;color:#6b6259;margin-bottom:8px}.purrch-progress-bar{height:8px;background:#eee9e2;border-radius:999px;overflow:hidden}.purrch-progress-bar span{display:block;height:100%;background:#17120f;border-radius:999px}.purrch-file-row small,.purrch-approval-row small{display:block;margin-top:4px;color:#7b7268;font-size:12px}.purrch-file-row p,.purrch-approval-row p{margin:8px 0 0;color:#5f564e}.purrch-approval-row.is-approved{border-color:#cfe8d5}.purrch-approval-row.is-changes_requested{border-color:#e8d6bf}.purrch-approval-row.is-locked{opacity:.76}

.purrch-payment-plan {
    display: grid;
    gap: 12px;
}

.purrch-payment-step {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.purrch-payment-step strong,
.purrch-payment-step span {
    display: block;
}

.purrch-payment-step span {
    color: rgba(17, 17, 17, 0.56);
    font-size: 0.88rem;
    margin-top: 4px;
}

.purrch-payment-step.is-paid {
    opacity: 0.72;
}

.purrch-payment-summary-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(17, 17, 17, 0.08);
}

@media (max-width: 720px) {
    .purrch-payment-step,
    .purrch-payment-summary-line {
        flex-direction: column;
    }
}

/* v14 Three.js preview foundation */
.purrch-three-inline-wrap {
    margin-top: 18px;
}

.purrch-three-preview-card {
    overflow: hidden;
}

.purrch-three-preview {
    position: relative;
    min-height: 420px;
    margin-top: 22px;
    border: 1px solid var(--purrch-border, rgba(17,17,17,.1));
    border-radius: 28px;
    background:
        radial-gradient(circle at 22% 18%, rgba(215, 200, 180, .20), transparent 32%),
        linear-gradient(135deg, #fbfaf7 0%, #f5f1eb 100%);
    overflow: hidden;
}

.purrch-three-canvas,
.purrch-three-canvas canvas {
    display: block;
    width: 100%;
    height: 420px;
}

.purrch-three-preview.is-fallback .purrch-three-canvas {
    display: none;
}

.purrch-three-fallback {
    position: relative;
    height: 420px;
    transform-style: preserve-3d;
}

.purrch-three-fallback [class*="purrch-three-fallback-"] {
    position: absolute;
    border-radius: 999px;
    background: #d8c4a2;
    box-shadow: 0 18px 50px rgba(25, 20, 15, .12);
}

.purrch-three-fallback-base {
    left: 18%;
    right: 18%;
    bottom: 42px;
    height: 34px;
    background: #a77a52 !important;
}

.purrch-three-fallback-column {
    width: 28px;
    height: 280px;
    left: 50%;
    bottom: 66px;
    transform: translateX(-50%);
    background: repeating-linear-gradient(0deg, #b79768 0 7px, #d0b180 7px 14px) !important;
}

.purrch-three-fallback-cubby {
    width: 160px;
    height: 100px;
    left: 22%;
    bottom: 80px;
    border-radius: 28px !important;
    background: #eee3d4 !important;
}

.purrch-three-fallback-step {
    width: 92px;
    height: 22px;
    right: 22%;
    background: #b8895a !important;
}

.purrch-three-fallback-step.s1 { bottom: 108px; }
.purrch-three-fallback-step.s2 { bottom: 176px; right: 29%; }
.purrch-three-fallback-step.s3 { bottom: 244px; right: 23%; }

.purrch-three-fallback-perch {
    width: 170px;
    height: 78px;
    left: 50%;
    top: 52px;
    transform: translateX(-50%);
    border-radius: 40px 40px 32px 32px !important;
    background: #efe3d4 !important;
}

.purrch-three-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.purrch-three-meta div {
    border: 1px solid var(--purrch-border, rgba(17,17,17,.1));
    border-radius: 20px;
    padding: 14px 16px;
    background: #fff;
}

.purrch-three-meta strong,
.purrch-three-meta span {
    display: block;
}

.purrch-three-meta strong {
    font-size: 13px;
    margin-bottom: 4px;
}

.purrch-three-meta span {
    color: rgba(17,17,17,.6);
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 860px) {
    .purrch-three-preview {
        min-height: 340px;
        border-radius: 22px;
    }

    .purrch-three-canvas,
    .purrch-three-canvas canvas,
    .purrch-three-fallback {
        height: 340px;
    }

    .purrch-three-meta {
        grid-template-columns: 1fr;
    }
}

/* v31 empty client panel state */
.purrch-empty-orders-card {
    padding: clamp(28px, 4vw, 56px);
}
.purrch-empty-orders-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
}
.purrch-empty-orders-grid h3 {
    max-width: 760px;
}
.purrch-empty-orders-grid > div > p:not(.purrch-eyebrow) {
    max-width: 720px;
    color: var(--purrch-muted, #625f59);
    font-size: clamp(18px, 1.35vw, 24px);
    line-height: 1.45;
}
.purrch-empty-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.purrch-empty-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.purrch-empty-steps > div {
    border: 1px solid var(--purrch-border, #e3ddd3);
    border-radius: 24px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.74);
}
.purrch-empty-steps span {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--purrch-accent, #9a6a3b);
    font-weight: 900;
    letter-spacing: 0.08em;
}
.purrch-empty-steps strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    margin-bottom: 10px;
}
.purrch-empty-steps p {
    margin: 0;
    color: var(--purrch-muted, #625f59);
    line-height: 1.45;
}
@media (max-width: 900px) {
    .purrch-empty-orders-grid {
        grid-template-columns: 1fr;
    }
    .purrch-empty-steps {
        grid-template-columns: 1fr;
    }
}

/* Purrch v32 client dashboard polish */
.purrch-client-dashboard {
  max-width: 1180px;
}

.purrch-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  background:
    radial-gradient(circle at 92% 8%, rgba(154, 118, 82, .13), transparent 30%),
    linear-gradient(135deg, #fff, #fbfaf7);
}

.purrch-dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.purrch-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 20px;
  margin-bottom: 22px;
}

.purrch-account-card,
.purrch-dashboard-aside {
  box-shadow: 0 18px 55px rgba(17, 17, 17, .045);
}

.purrch-soft-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f1ede6;
  color: #111;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
}

.purrch-profile-form {
  margin-top: 18px;
}

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

.purrch-profile-grid label {
  display: grid;
  gap: 8px;
  font-weight: 900;
  color: var(--purrch-text);
}

.purrch-profile-grid label span {
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--purrch-muted);
}

.purrch-profile-grid input,
.purrch-profile-grid select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--purrch-border);
  border-radius: 18px;
  padding: 15px 17px;
  font: inherit;
  background: #fff;
}

.purrch-button-small {
  min-height: 48px;
  padding-inline: 22px;
}

.purrch-tool-list,
.purrch-empty-steps-cards {
  display: grid;
  gap: 12px;
}

.purrch-tool-list div,
.purrch-empty-steps-cards div {
  border: 1px solid var(--purrch-border);
  border-radius: 20px;
  padding: 16px;
  background: #fbfaf7;
}

.purrch-tool-list span,
.purrch-empty-steps-cards span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--purrch-accent);
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: .12em;
}

.purrch-tool-list strong,
.purrch-empty-steps-cards strong {
  display: block;
  font-size: 17px;
  letter-spacing: -.03em;
}

.purrch-tool-list p,
.purrch-empty-steps-cards p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

.purrch-empty-orders-card-v32 {
  display: grid;
  grid-template-columns: 220px minmax(0, .9fr) minmax(320px, 1fr);
  align-items: center;
  gap: 24px;
  background:
    radial-gradient(circle at 12% 30%, rgba(154,118,82,.15), transparent 35%),
    linear-gradient(135deg, #fff, #f8f5ef);
}

.purrch-empty-orders-card-v32 h3 {
  max-width: 620px;
}

.purrch-empty-visual {
  position: relative;
  min-height: 210px;
  border-radius: 28px;
  border: 1px solid var(--purrch-border);
  background: linear-gradient(180deg, #fff, #f2eee7);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.purrch-empty-mark {
  position: relative;
  z-index: 2;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #111;
  color: #fff;
  font-size: 42px;
  font-weight: 1000;
  box-shadow: 0 20px 45px rgba(17, 17, 17, .16);
}

.purrch-empty-visual span {
  position: absolute;
  width: 118px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a6544, #d8b184);
  opacity: .84;
}

.purrch-empty-visual span:nth-child(2) { top: 48px; left: 38px; }
.purrch-empty-visual span:nth-child(3) { top: 96px; right: 28px; width: 92px; }
.purrch-empty-visual span:nth-child(4) { bottom: 48px; left: 54px; width: 144px; }

@media (max-width: 1020px) {
  .purrch-dashboard-hero,
  .purrch-dashboard-grid,
  .purrch-empty-orders-card-v32 {
    grid-template-columns: 1fr;
  }

  .purrch-dashboard-hero-actions {
    justify-content: flex-start;
  }

  .purrch-empty-visual {
    min-height: 170px;
  }
}

@media (max-width: 760px) {
  .purrch-dashboard-hero-actions,
  .purrch-profile-grid {
    grid-template-columns: 1fr;
  }

  .purrch-profile-grid {
    display: grid;
  }

  .purrch-section-headline {
    display: grid;
    gap: 12px;
  }

  .purrch-empty-orders-card-v32 {
    gap: 18px;
  }
}

/* Purrch v33 client panel navigation and settings layout */
.purrch-client-dashboard-v33 {
  max-width: 1180px;
  padding-top: clamp(92px, 9vw, 136px);
}
.purrch-dashboard-hero-v33 {
  margin-bottom: 16px;
}
.purrch-panel-nav {
  position: sticky;
  top: 82px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  margin: 0 0 22px;
  border: 1px solid var(--purrch-border, #e3ddd3);
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(17,17,17,.06);
}
.purrch-panel-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--purrch-text, #111);
  text-decoration: none;
  font-weight: 900;
  border: 1px solid transparent;
  background: transparent;
}
.purrch-panel-nav a:hover,
.purrch-panel-nav a:focus {
  background: #111;
  color: #fff;
}
.purrch-dashboard-section {
  scroll-margin-top: 130px;
  margin-bottom: 22px;
}
.purrch-section-heading-v33 {
  margin: 0 0 16px;
  align-items: end;
}
.purrch-section-heading-v33 h3,
.purrch-new-order-card-v33 h3,
.purrch-history-card-v33 h3,
.purrch-settings-card-v33 h3 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: .94;
  letter-spacing: -.065em;
}
.purrch-empty-orders-card-v33 {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: clamp(20px, 4vw, 42px);
  align-items: stretch;
  background:
    radial-gradient(circle at 92% 10%, rgba(154, 118, 82, .12), transparent 32%),
    linear-gradient(135deg, #fff, #fbfaf7);
}
.purrch-empty-copy-v33 h3 {
  margin: 0 0 16px;
  font-size: clamp(40px, 5.5vw, 76px);
  line-height: .92;
  letter-spacing: -.07em;
}
.purrch-empty-copy-v33 > p:not(.purrch-eyebrow) {
  max-width: 680px;
  color: var(--purrch-muted, #625f59);
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.5;
}
.purrch-empty-steps-v33 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.purrch-empty-steps-v33 > div {
  border: 1px solid var(--purrch-border, #e3ddd3);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255,255,255,.78);
}
.purrch-empty-steps-v33 span {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--purrch-accent, #9a6a3b);
  font-weight: 1000;
  letter-spacing: .12em;
}
.purrch-empty-steps-v33 strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.1;
}
.purrch-empty-steps-v33 p {
  margin: 0;
  color: var(--purrch-muted, #625f59);
  font-size: 14px;
  line-height: 1.45;
}
.purrch-new-order-card-v33 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  background: #111;
  color: #fff;
}
.purrch-new-order-card-v33 .purrch-eyebrow,
.purrch-new-order-card-v33 p { color: rgba(255,255,255,.72); }
.purrch-new-order-card-v33 .purrch-button { background: #fff; color: #111; }
.purrch-history-card-v33,
.purrch-settings-card-v33 {
  background: #fff;
}
.purrch-history-card-v33 > p:not(.purrch-eyebrow),
.purrch-settings-card-v33 .purrch-section-headline p:not(.purrch-eyebrow) {
  max-width: 720px;
  color: var(--purrch-muted, #625f59);
  font-size: 17px;
  line-height: 1.5;
}
.purrch-settings-card-v33 .purrch-profile-form {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--purrch-border, #e3ddd3);
}
.purrch-client-dashboard-v33 .purrch-profile-grid {
  gap: 16px;
}
.purrch-client-dashboard-v33 .purrch-profile-grid input,
.purrch-client-dashboard-v33 .purrch-profile-grid select {
  min-height: 56px;
}
@media (max-width: 900px) {
  .purrch-client-dashboard-v33 {
    padding: 92px 12px 40px;
  }
  .purrch-panel-nav {
    top: 74px;
    border-radius: 24px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .purrch-panel-nav::-webkit-scrollbar { display: none; }
  .purrch-panel-nav a {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 16px;
  }
  .purrch-dashboard-hero-v33,
  .purrch-empty-orders-card-v33,
  .purrch-new-order-card-v33 {
    grid-template-columns: 1fr;
  }
  .purrch-section-heading-v33 {
    display: grid;
    gap: 12px;
  }
  .purrch-section-heading-v33 .purrch-button,
  .purrch-new-order-card-v33 .purrch-button {
    width: 100%;
  }
  .purrch-empty-steps-v33,
  .purrch-profile-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .purrch-dashboard-hero-v33 h2,
  .purrch-empty-copy-v33 h3,
  .purrch-section-heading-v33 h3,
  .purrch-new-order-card-v33 h3,
  .purrch-history-card-v33 h3,
  .purrch-settings-card-v33 h3 {
    font-size: clamp(34px, 12vw, 52px);
    line-height: 1;
    letter-spacing: -.06em;
    overflow-wrap: normal;
    word-break: normal;
  }
  .purrch-empty-orders-card-v33,
  .purrch-settings-card-v33,
  .purrch-history-card-v33,
  .purrch-new-order-card-v33 {
    border-radius: 24px;
    padding: 22px;
  }
}

/* Purrch v34 client panel tabs */
.purrch-panel-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--purrch-text, #111);
  text-decoration: none;
  font-weight: 900;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.purrch-panel-tabs button:hover,
.purrch-panel-tabs button:focus,
.purrch-panel-tabs button.is-active {
  background: #111;
  color: #fff;
}
.purrch-panel-tab-panel[hidden] {
  display: none !important;
}
.purrch-new-order-card-v33 .purrch-button {
  background: #fff !important;
  color: #111 !important;
  border-color: #fff !important;
}
@media (max-width: 900px) {
  .purrch-panel-tabs button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 16px;
  }
}

/* v35 brief wizard */
.purrch-brief-intro-card { position: relative; overflow: hidden; }
.purrch-brief-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.purrch-brief-step-tab {
  border: 1px solid var(--purrch-border);
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  text-align: left;
  font-weight: 900;
  color: var(--purrch-text);
  cursor: pointer;
}
.purrch-brief-step-tab span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--purrch-accent);
}
.purrch-brief-step-tab.is-active {
  background: #111;
  border-color: #111;
  color: #fff;
}
.purrch-brief-step { display: none; margin-bottom: 20px; }
.purrch-brief-step.is-active { display: block; }
.purrch-brief-step-head { max-width: 760px; margin-bottom: 28px; }
.purrch-social-card,
.purrch-brief-summary {
  border: 1px solid var(--purrch-border);
  border-radius: 24px;
  padding: 22px;
  margin: 0 0 24px;
  background: #fbfaf7;
}
.purrch-social-card h4,
.purrch-brief-summary h4 { margin: 0 0 14px; font-size: 22px; }
.purrch-social-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.purrch-social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--purrch-border);
  border-radius: 999px;
  background: #fff;
  color: #111;
  text-decoration: none;
  font-weight: 900;
}
.purrch-social-button.is-disabled { opacity: .58; cursor: not-allowed; }
.purrch-help-text { font-size: 14px !important; margin: 14px 0 0 !important; }
.purrch-form-divider { margin-top: 12px !important; }
.purrch-brief-summary ul { margin: 0; padding-left: 20px; color: var(--purrch-muted); line-height: 1.7; }
.purrch-brief-controls { display: flex; gap: 12px; justify-content: space-between; margin-top: 10px; }
.purrch-brief .purrch-section-card { min-height: 420px; }

@media (max-width: 760px) {
  .purrch-brief-steps { grid-template-columns: 1fr 1fr; gap: 8px; }
  .purrch-brief-step-tab { padding: 12px; border-radius: 16px; }
  .purrch-social-buttons { grid-template-columns: 1fr; }
  .purrch-brief-controls { flex-direction: column-reverse; }
  .purrch-brief-controls .purrch-button { width: 100%; }
  .purrch-brief .purrch-section-card { min-height: auto; }
}

/* v36 order detail: tabs, spacing and overflow fixes */
.purrch-order-detail-v36 { max-width: 1240px; margin-left: auto; margin-right: auto; }
.purrch-order-detail-v36, .purrch-order-detail-v36 * { box-sizing: border-box; }
.purrch-order-detail-hero-v36 { overflow: hidden; }
.purrch-order-detail-hero-grid-v36 { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(260px,.7fr); gap:28px; align-items:end; }
.purrch-order-detail-hero-grid-v36 h2 { margin:0 0 10px; overflow-wrap:anywhere; }
.purrch-order-detail-progress-v36 { min-width:0; }
.purrch-order-tabs-v36 { display:flex; flex-wrap:wrap; gap:10px; margin:22px 0; padding:10px; border:1px solid rgba(80,68,52,.14); border-radius:28px; background:rgba(250,248,244,.9); }
.purrch-order-tabs-v36 button { appearance:none; border:1px solid rgba(80,68,52,.15); background:#fff; color:#111; border-radius:999px; padding:12px 18px; font-weight:800; cursor:pointer; line-height:1; }
.purrch-order-tabs-v36 button.is-active { background:#111; color:#fff; border-color:#111; }
.purrch-order-tab-panel-v36[hidden] { display:none !important; }
.purrch-order-tab-panel-v36 { margin-top:18px; }
.purrch-detail-grid-v36 { display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:start; }
.purrch-order-summary-grid-v36 { grid-template-columns:repeat(3, minmax(0,1fr)); }
.purrch-order-detail-v36 .purrch-payment-grid > div,
.purrch-order-detail-v36 .purrch-file-row,
.purrch-order-detail-v36 .purrch-approval-row,
.purrch-order-detail-v36 .purrch-payment-step { min-width:0; overflow:hidden; }
.purrch-order-detail-v36 .purrch-payment-grid strong,
.purrch-order-detail-v36 .purrch-file-row strong,
.purrch-order-detail-v36 .purrch-approval-row strong,
.purrch-order-detail-v36 .purrch-payment-step strong { overflow-wrap:anywhere; word-break:normal; }
.purrch-order-detail-v36 .purrch-file-row { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.purrch-order-detail-v36 .purrch-file-row > div { min-width:0; }
.purrch-order-detail-v36 .purrch-file-row .purrch-mini-button { flex:0 0 auto; }
.purrch-approval-actions-v36 { display:grid; grid-template-columns:auto minmax(260px,1fr); gap:12px; align-items:center; margin-top:12px; }
.purrch-approval-actions-v36 .purrch-approval-form-wide { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; }
.purrch-approval-actions-v36 textarea { width:100%; min-height:68px; resize:vertical; }
.purrch-order-detail-v36 .purrch-message-form { display:grid; gap:14px; }
.purrch-order-detail-v36 .purrch-message-form textarea { width:100%; }

@media (max-width: 900px) {
  .purrch-order-detail-v36 { padding-inline:18px; }
  .purrch-order-detail-hero-grid-v36, .purrch-detail-grid-v36 { grid-template-columns:1fr; }
  .purrch-order-summary-grid-v36 { grid-template-columns:1fr 1fr; }
  .purrch-order-tabs-v36 { overflow-x:auto; flex-wrap:nowrap; -webkit-overflow-scrolling:touch; border-radius:22px; }
  .purrch-order-tabs-v36 button { white-space:nowrap; }
  .purrch-approval-actions-v36, .purrch-approval-actions-v36 .purrch-approval-form-wide { grid-template-columns:1fr; }
}
@media (max-width: 560px) {
  .purrch-order-detail-v36 { padding-inline:14px; }
  .purrch-order-summary-grid-v36 { grid-template-columns:1fr; }
  .purrch-order-detail-v36 .purrch-file-row { align-items:flex-start; flex-direction:column; }
  .purrch-order-detail-v36 .purrch-file-row .purrch-mini-button { width:100%; text-align:center; }
}

/* v37: AJAX-friendly client panel polish */
.purrch-message-form button[disabled],
.purrch-approval-form button[disabled] {
  opacity: .55;
  cursor: progress;
}
.purrch-message-thread {
  scroll-margin-top: 120px;
}
.purrch-timeline-v37 {
  display: grid;
  gap: 14px;
  max-width: 860px;
}
.purrch-timeline-v37 .purrch-timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(80,68,52,.12);
}
.purrch-timeline-v37 .purrch-timeline-dot {
  width: 11px;
  height: 11px;
  margin-top: 7px;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 0 0 6px #eee9e1;
}
.purrch-timeline-v37 .purrch-timeline-copy {
  min-width: 0;
}
.purrch-timeline-v37 .purrch-timeline-copy strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.purrch-timeline-v37 .purrch-timeline-copy small {
  display: block;
  margin-top: 6px;
  color: var(--purrch-muted);
  font-weight: 800;
}
.purrch-timeline-v37 .purrch-timeline-copy p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--purrch-muted);
}
@media (max-width: 760px) {
  .purrch-timeline-v37 .purrch-timeline-item {
    grid-template-columns: 16px minmax(0, 1fr);
  }
}

/* v38 refinements */
.purrch-brief-wizard[data-start-step="2"] .purrch-brief-controls {
  justify-content: flex-start;
}
.purrch-social-button.is-disabled {
  opacity: .55;
  cursor: not-allowed;
}
.purrch-settings-subtitle {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--purrch-border, #e7dfd4);
}
.purrch-profile-form textarea,
.purrch-message-form textarea {
  width: 100%;
  border: 1px solid var(--purrch-border, #e7dfd4);
  border-radius: 22px;
  padding: 18px 20px;
  font: inherit;
  resize: vertical;
  background: #fff;
}
.purrch-profile-grid .purrch-full {
  grid-column: 1 / -1;
}
.purrch-ajax-error {
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid #e2b8b8;
  border-radius: 16px;
  background: #fff5f5;
  color: #6f2525;
  font-weight: 700;
}
.purrch-message-form button[disabled],
.purrch-approval-form button[disabled] {
  opacity: .65;
  cursor: wait;
}
@media (max-width: 760px) {
  .purrch-brief-steps {
    grid-template-columns: 1fr;
  }
  .purrch-brief-step-tab {
    min-width: 0;
  }
}

/* v39 brief: show completed account step for logged-in customers */
.purrch-brief-step-tab.is-completed:not(.is-active){
  background:#fbfaf7;
  border-color:rgba(154,118,82,.35);
}
.purrch-brief-step-tab em{
  display:inline-flex;
  margin-top:8px;
  padding:5px 9px;
  border-radius:999px;
  background:#efe9df;
  color:#665b50;
  font-size:11px;
  font-style:normal;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.purrch-brief-step-tab.is-active em{
  background:rgba(255,255,255,.15);
  color:#fff;
}
.purrch-account-ready-card{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:0 0 22px;
}
.purrch-account-ready-card div{
  border:1px solid var(--purrch-border,#e7e2da);
  border-radius:20px;
  padding:18px 20px;
  background:#fbfaf7;
}
.purrch-account-ready-card span{
  display:block;
  margin-bottom:8px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.12em;
  color:var(--purrch-muted,#66615b);
  text-transform:uppercase;
}
.purrch-account-ready-card strong{
  display:block;
  font-size:20px;
  overflow-wrap:anywhere;
}
@media (max-width:760px){
  .purrch-account-ready-card{grid-template-columns:1fr;}
}


/* v40: order detail stats card overflow fix */
.purrch-order-detail-v36 .purrch-payment-grid,
.purrch-order-detail-v36 .purrch-payment-grid-compact,
.purrch-order-detail-v36 .purrch-order-summary-grid-v36 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.purrch-order-detail-v36 .purrch-payment-grid > div {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: visible;
}

.purrch-order-detail-v36 .purrch-payment-grid span {
  line-height: 1.18;
  max-width: 100%;
}

.purrch-order-detail-v36 .purrch-payment-grid strong {
  display: block;
  max-width: 100%;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.purrch-order-detail-v36 .purrch-payment-grid strong .purrch-nowrap,
.purrch-order-detail-v36 .purrch-money-nowrap {
  white-space: nowrap;
}

.purrch-order-detail-v36 .purrch-detail-grid-v36 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

@media (max-width: 1180px) {
  .purrch-order-detail-v36 .purrch-payment-grid,
  .purrch-order-detail-v36 .purrch-payment-grid-compact,
  .purrch-order-detail-v36 .purrch-order-summary-grid-v36 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .purrch-order-detail-v36 .purrch-payment-grid,
  .purrch-order-detail-v36 .purrch-payment-grid-compact,
  .purrch-order-detail-v36 .purrch-order-summary-grid-v36 {
    grid-template-columns: 1fr;
  }

  .purrch-order-detail-v36 .purrch-payment-grid > div {
    min-height: auto;
    padding: 16px;
  }

  .purrch-order-detail-v36 .purrch-payment-grid strong {
    font-size: 24px;
  }
}


/* v41: AJAX endpoint and approval layout hardening */
.purrch-order-detail-v36 .purrch-approval-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
  overflow: visible !important;
}
.purrch-order-detail-v36 .purrch-approval-row > div:first-child {
  min-width: 0;
}
.purrch-order-detail-v36 .purrch-approval-row strong {
  line-height: 1.15;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.purrch-order-detail-v36 .purrch-approval-actions-v36 {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.purrch-order-detail-v36 .purrch-approval-actions-v36 .purrch-approval-form {
  margin: 0;
}
.purrch-order-detail-v36 .purrch-approval-actions-v36 .purrch-approval-form-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}
.purrch-order-detail-v36 .purrch-approval-actions-v36 textarea {
  min-width: 0;
}
.purrch-order-detail-v36 .purrch-ajax-error {
  grid-column: 1 / -1;
  width: 100%;
}
@media (max-width: 760px) {
  .purrch-order-detail-v36 .purrch-approval-actions-v36,
  .purrch-order-detail-v36 .purrch-approval-actions-v36 .purrch-approval-form-wide {
    grid-template-columns: 1fr;
  }
}

/* v45 configurator: editable front plan + live 3D */
.purrch-config-layout-v45 {
  display: grid;
  grid-template-columns: minmax(420px, .95fr) minmax(460px, 1.05fr);
  gap: 22px;
  align-items: start;
  max-width: 1320px;
  margin-inline: auto;
}

.purrch-viewport-v45 {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 20px;
  min-width: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 12%, #fff 0, #f8f5ef 48%, #ebe5da 100%);
}

.purrch-config-fields-v45 {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.purrch-config-hero-v45 {
  max-width: 1320px;
  margin-inline: auto;
}

.purrch-preview-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 8px;
  border: 1px solid var(--purrch-border);
  border-radius: 999px;
  background: rgba(255,255,255,.76);
}

.purrch-preview-tabs button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.purrch-preview-tabs button.is-active {
  background: #111;
  color: #fff;
}

.purrch-preview-panel {
  display: none;
}

.purrch-preview-panel.is-active {
  display: block;
}

.purrch-plan-card {
  border: 1px solid var(--purrch-border);
  border-radius: 28px;
  padding: 22px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 26px 80px rgba(17,17,17,.06);
}

.purrch-plan-editor {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 220 / 270;
  min-height: 440px;
  margin: 22px auto 12px;
  border: 1px solid rgba(17,17,17,.12);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(17,17,17,.055) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(180deg, rgba(17,17,17,.045) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(180deg, #fff, #f8f5ef);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.purrch-plan-safe-zone {
  position: absolute;
  inset: 7% 7% 8% 7%;
  border: 1px dashed rgba(122,86,56,.32);
  border-radius: 22px;
  background: rgba(255,255,255,.22);
}

.purrch-plan-safe-zone span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  color: var(--purrch-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.purrch-plan-item {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  border: 0;
  display: grid;
  place-items: center;
  cursor: grab;
  box-shadow: 0 14px 34px rgba(17,17,17,.16);
  transition: box-shadow .18s ease, transform .18s ease;
  touch-action: none;
}

.purrch-plan-item.is-dragging {
  cursor: grabbing;
  z-index: 20;
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 24px 60px rgba(17,17,17,.24);
}

.purrch-plan-item span {
  pointer-events: none;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .02em;
}

.purrch-plan-item.is-column {
  width: 28px;
  height: 128px;
  border-radius: 999px;
  background: repeating-linear-gradient(0deg, #b89870 0 8px, #d7c1a3 8px 13px);
  color: #5a412b;
}

.purrch-plan-item.is-step {
  width: 92px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7a5638, #c99c6f);
  color: #fff;
}

.purrch-plan-item.is-shelf {
  width: 126px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a6544, #d8b184);
  color: #fff;
}

.purrch-plan-item.is-cubby {
  width: 134px;
  height: 90px;
  border-radius: 34px;
  background: linear-gradient(135deg, #eee4d5, #cdb793);
  color: #6a513b;
}

.purrch-plan-item.is-cubby::after {
  content: "";
  position: absolute;
  inset: 26px 26px;
  border-radius: 999px;
  border: 10px solid rgba(106,81,59,.35);
  background: rgba(255,255,255,.24);
}

.purrch-plan-item.is-hammock {
  width: 122px;
  height: 42px;
  border-radius: 0 0 50% 50%;
  background: #e8dfd3;
  color: #6a513b;
}

.purrch-plan-item.is-perch {
  width: 144px;
  height: 76px;
  border-radius: 48px 48px 38px 38px;
  background: linear-gradient(135deg, #fff7ee, #d7c6ad);
  color: #6a513b;
}

.purrch-plan-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--purrch-muted);
  font-size: 12px;
  font-weight: 900;
}

.purrch-plan-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--purrch-border);
  border-radius: 999px;
  background: #fff;
}

.purrch-plan-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  background: #a97749;
}

.purrch-plan-legend .is-column { background: #d0b180; }
.purrch-plan-legend .is-step { background: #8a6544; }
.purrch-plan-legend .is-shelf { background: #d8b184; }
.purrch-plan-legend .is-zone { background: #e8dfd3; }

.purrch-config-note {
  margin: 12px 0 0;
  color: var(--purrch-muted);
  font-size: 13px;
  line-height: 1.5;
}

.purrch-viewport-v45 .purrch-three-preview-card {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.purrch-viewport-v45 .purrch-three-preview-card .purrch-section-headline {
  padding: 22px;
  border: 1px solid var(--purrch-border);
  border-radius: 28px;
  background: rgba(255,255,255,.88);
}

.purrch-viewport-v45 .purrch-three-meta {
  display: none;
}

.purrch-viewport-v45 .purrch-three-preview {
  margin-top: 16px;
  min-height: 520px;
}

.purrch-viewport-v45 .purrch-three-canvas,
.purrch-viewport-v45 .purrch-three-canvas canvas {
  min-height: 520px;
  height: 520px;
}

@media (max-width: 1100px) {
  .purrch-config-layout-v45 {
    grid-template-columns: 1fr;
  }
  .purrch-viewport-v45 {
    position: static;
  }
}

@media (max-width: 700px) {
  .purrch-config-layout-v45 {
    gap: 14px;
  }
  .purrch-viewport-v45,
  .purrch-plan-card,
  .purrch-config-group {
    padding: 16px;
  }
  .purrch-preview-tabs {
    border-radius: 22px;
    flex-direction: column;
  }
  .purrch-plan-editor {
    min-height: 360px;
  }
  .purrch-plan-item.is-column { height: 94px; width: 22px; }
  .purrch-plan-item.is-step { width: 76px; height: 24px; }
  .purrch-plan-item.is-shelf { width: 96px; height: 28px; }
  .purrch-plan-item.is-cubby { width: 112px; height: 76px; }
  .purrch-plan-item.is-perch { width: 112px; height: 64px; }
}
