body.reformas-page {
  color-scheme: light;
  --ink: #1d2227;
  --muted: #5c6670;
  --line: #d8ddd6;
  --paper: #f4f1ea;
  --white: #ffffff;
  --green: #214b44;
  --green-2: #3d7368;
  --clay: #a55d43;
  --gold: #c89b4a;
  --blue: #4a6f95;
  --shadow: 0 20px 54px rgba(23, 32, 29, 0.14);
  --soft-frame: 1px solid rgba(216, 221, 214, 0.96);
  --gold-frame: 1px solid rgba(200, 155, 74, 0.54);

  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.38), transparent 30%),
    linear-gradient(180deg, rgba(244, 241, 234, 0.9) 0%, rgba(236, 242, 236, 0.78) 52%, rgba(251, 251, 248, 0.92) 100%),
    url("/assets/projects/madrid-chamberi/cover.jpg") center top / cover no-repeat;
}

body.reformas-page .site-header {
  border-bottom-color: rgba(216, 221, 214, 0.78);
}

.reformas-header {
  grid-template-columns: auto 1fr auto;
}

.reformas-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.reformas-whatsapp-compact,
.reformas-logout {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 0.86rem;
}

.reformas-main {
  min-height: calc(100vh - 72px);
}

.reformas-gate,
.reformas-dashboard {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
  padding: clamp(28px, 5vw, 58px) clamp(18px, 5vw, 72px) clamp(50px, 7vw, 86px);
}

.reformas-gate {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  align-items: stretch;
  min-height: calc(100vh - 72px);
}

.reformas-gate-copy {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  height: 100%;
  max-width: 760px;
}

.reformas-gate h1,
.reformas-identity h1 {
  margin: 0;
  max-width: 11ch;
  color: var(--ink);
  font-size: clamp(1.48rem, 2.05vw, 2.2rem);
  line-height: 1.03;
  text-wrap: balance;
}

.reformas-cover {
  position: relative;
  display: grid;
  min-height: clamp(460px, 70vh, 760px);
  height: 100%;
  margin: 0;
  overflow: hidden;
  border: var(--soft-frame);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.reformas-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 18, 16, 0.02) 0%, rgba(14, 18, 16, 0.08) 45%, rgba(14, 18, 16, 0.32) 100%),
    linear-gradient(90deg, rgba(14, 18, 16, 0.22) 0%, rgba(14, 18, 16, 0.04) 48%);
  pointer-events: none;
}

.reformas-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.reformas-cover figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  display: grid;
  gap: 10px;
  max-width: min(540px, calc(100% - 36px));
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px);
}

.reformas-cover .reformas-intro-copy,
.reformas-identity-copy > p:not(.eyebrow) {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.4vw, 1.12rem);
  line-height: 1.56;
}

.reformas-cover .eyebrow {
  margin-bottom: 0;
}

.reformas-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin-top: 0;
}

.reformas-proof-grid div,
.reformas-auth-card,
.panel,
.customer-panel {
  border: var(--soft-frame);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.reformas-proof-grid div {
  display: grid;
  gap: 6px;
  min-height: 108px;
  padding: 18px;
}

.reformas-proof-grid strong {
  color: var(--green);
  font-size: 1.02rem;
}

.reformas-proof-grid span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.42;
}

.reformas-auth-card {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
}

.auth-tablist {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 3px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  background: rgba(251, 251, 248, 0.88);
}

.auth-tab {
  flex: 1 1 0;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform var(--soft-transition),
    color var(--soft-transition),
    background var(--soft-transition);
}

.auth-tab:hover {
  transform: translateY(-1px);
}

.auth-tab[aria-pressed="true"] {
  color: var(--white);
  background: var(--green);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.form-heading h2,
.panel-heading h2,
.contact-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.2rem, 2.4vw, 1.9rem);
  line-height: 1.08;
}

.auth-form label,
.fields-grid .field {
  display: grid;
  gap: 7px;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 760;
}

.auth-form label.reformas-remember {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  background: rgba(251, 251, 248, 0.92);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.45;
}

.auth-form label.reformas-remember input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--green);
}

.auth-form label.reformas-remember span {
  display: block;
}

.password-field {
  position: relative;
  display: block;
}

.auth-form input,
.auth-form textarea,
.auth-form select,
.fields-grid input,
.fields-grid textarea,
.fields-grid select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
  transition:
    border-color var(--soft-transition),
    box-shadow var(--soft-transition),
    background var(--soft-transition);
}

.password-field input {
  padding-right: 52px;
}

.auth-form textarea,
.fields-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.auth-form input:focus,
.auth-form textarea:focus,
.auth-form select:focus,
.fields-grid input:focus,
.fields-grid textarea:focus,
.fields-grid select:focus {
  border-color: rgba(200, 155, 74, 0.72);
  box-shadow: 0 0 0 3px rgba(200, 155, 74, 0.14);
  outline: none;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
  transition:
    color var(--soft-transition),
    background var(--soft-transition),
    transform var(--soft-transition);
}

.password-toggle:hover {
  color: var(--green);
  background: rgba(33, 75, 68, 0.08);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(33, 75, 68, 0.42);
  outline-offset: 2px;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reformas-auth-note-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.auth-inline-link {
  color: var(--green);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.auth-inline-link:hover {
  color: var(--ink);
}

.reformas-auth-note,
.quote-disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-form[hidden],
.auth-tab[hidden] {
  display: none;
}

.reformas-dashboard[hidden],
.reformas-gate[hidden],
[data-dashboard-nav][hidden],
.reformas-logout[hidden] {
  display: none;
}

.reformas-identity {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.72fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: start;
}

.reformas-identity-copy {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.account-summary-card {
  display: grid;
  gap: 6px;
  min-height: 120px;
  padding: 18px;
  border: 1px solid rgba(216, 221, 214, 0.9);
  border-radius: 8px;
  background: rgba(251, 251, 248, 0.96);
}

.account-summary-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.account-summary-card strong {
  color: var(--green);
  font-size: 1.4rem;
  line-height: 1.08;
}

.account-summary-card small {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.customer-panel {
  position: relative;
  padding: 22px;
}

.customer-panel-head {
  position: relative;
  margin-bottom: 16px;
  padding-right: 58px;
}

.customer-panel-head > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.customer-panel-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.customer-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.customer-edit-button {
  position: absolute;
  top: 0;
  right: 0;
}

.icon-button,
.customer-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  background: rgba(251, 251, 248, 0.96);
  color: var(--green);
  box-shadow: 0 10px 22px rgba(23, 32, 29, 0.06);
  cursor: pointer;
  transition:
    transform var(--soft-transition),
    border-color var(--soft-transition),
    box-shadow var(--soft-transition),
    background var(--soft-transition),
    color var(--soft-transition);
}

.icon-button:hover,
.customer-edit-button:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 155, 74, 0.55);
  background: #fff;
  color: var(--green);
  box-shadow: 0 14px 28px rgba(23, 32, 29, 0.1);
}

.icon-button svg,
.customer-edit-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.modal-shell[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 26, 24, 0.5);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(216, 221, 214, 0.98);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 80px rgba(18, 24, 22, 0.2);
}

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

.modal-head h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1.18;
}

.modal-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.modal-actions .button {
  min-width: 170px;
}

.account-edit-form {
  display: grid;
  gap: 14px;
}

.account-edit-form label {
  display: grid;
  gap: 7px;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 760;
}

.account-edit-form input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
}

.account-edit-form input:focus {
  border-color: rgba(200, 155, 74, 0.72);
  box-shadow: 0 0 0 3px rgba(200, 155, 74, 0.14);
  outline: none;
}

.customer-panel dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.customer-panel div {
  display: grid;
  gap: 4px;
}

.customer-panel dt {
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.customer-panel dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 760;
  line-height: 1.36;
  overflow-wrap: anywhere;
}

.reformas-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: clamp(18px, 3vw, 24px);
}

.service-panel,
.quote-panel {
  min-width: 0;
}

.quote-panel {
  position: sticky;
  top: 88px;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.quote-panel-heading {
  align-items: start;
}

.autosave-state,
.quote-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(216, 221, 214, 0.9);
  border-radius: 999px;
  background: rgba(251, 251, 248, 0.9);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.quote-heading-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.quote-name {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

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

.field-span-2 {
  grid-column: 1 / -1;
}

.service-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.service-group {
  display: grid;
  gap: 12px;
  --group-accent: var(--green);
  --group-soft: rgba(33, 75, 68, 0.1);
}

.service-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  list-style: none;
}

.service-group-head::-webkit-details-marker {
  display: none;
}

.service-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.service-group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid rgba(216, 221, 214, 0.9);
  border-radius: 10px;
  background: var(--group-soft);
  color: var(--group-accent);
}

.service-group-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-group-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
}

.service-group-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.service-group-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid rgba(216, 221, 214, 0.9);
  border-radius: 999px;
  background: rgba(251, 251, 248, 0.9);
  color: var(--muted);
  transition:
    transform var(--soft-transition),
    border-color var(--soft-transition),
    color var(--soft-transition);
}

.service-group-toggle svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-group[open] .service-group-toggle {
  transform: rotate(180deg);
  border-color: rgba(33, 75, 68, 0.42);
  color: var(--green);
}

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

.service-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 32, 29, 0.05);
  transition:
    transform var(--soft-transition),
    border-color var(--soft-transition),
    box-shadow var(--soft-transition),
    background var(--soft-transition);
}

.service-card:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 155, 74, 0.5);
  box-shadow: 0 14px 30px rgba(23, 32, 29, 0.08);
}

.service-card.is-selected {
  border-color: rgba(33, 75, 68, 0.55);
  box-shadow: 0 16px 34px rgba(33, 75, 68, 0.12);
  background: rgba(241, 247, 244, 0.92);
}

.service-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--group-soft);
  color: var(--group-accent);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.service-card > strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
}

.service-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.service-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.service-price-row strong {
  color: var(--green);
  font-size: 1rem;
  font-weight: 850;
}

.service-price-row span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.service-qty {
  display: grid;
  gap: 6px;
}

.service-option {
  display: grid;
  gap: 6px;
}

.service-option span,
.service-qty span {
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.service-option select,
.service-qty input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(251, 251, 248, 0.98);
  font: inherit;
  font-size: 0.96rem;
}

.service-option select:focus,
.service-qty input:focus {
  border-color: rgba(200, 155, 74, 0.72);
  box-shadow: 0 0 0 3px rgba(200, 155, 74, 0.14);
  outline: none;
}

.service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.service-actions .button,
.service-actions .whatsapp-button {
  flex: 0 1 auto;
  min-width: min(100%, 210px);
}

.quote-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.kpi-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  background: rgba(251, 251, 248, 0.94);
}

.kpi-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.kpi-card strong {
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.2;
}

.quote-cart {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  background: rgba(251, 251, 248, 0.94);
}

.quote-cart-empty {
  display: grid;
  gap: 8px;
  padding: 8px 0;
}

.quote-cart-empty strong {
  color: var(--ink);
  font-size: 1rem;
}

.quote-cart-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.quote-cart-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(216, 221, 214, 0.82);
}

.quote-cart-row:last-of-type {
  border-bottom: 0;
}

.quote-cart-left {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.quote-cart-left strong {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.25;
}

.quote-cart-left span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.quote-cart-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.quote-cart-right strong {
  color: var(--green);
  font-size: 0.98rem;
  font-weight: 850;
  white-space: nowrap;
}

.quote-cart-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.quote-cart-remove:hover {
  border-color: rgba(165, 93, 67, 0.45);
  color: var(--clay);
}

.quote-cart-totals {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.quote-cart-totals > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.quote-cart-totals > div strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.quote-cart-totals > div.is-total {
  padding-top: 10px;
  border-top: 1px solid rgba(216, 221, 214, 0.82);
  color: var(--green);
  font-size: 0.92rem;
}

.quote-cart-totals > div.is-total strong {
  color: var(--green);
  font-size: 1.12rem;
}

.order-summary {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  background: rgba(251, 251, 248, 0.94);
}

.order-summary-heading {
  align-items: start;
}

.order-summary-copy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
}

.order-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.order-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(216, 221, 214, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.order-summary-grid dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.order-summary-grid dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.35;
}

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.history-panel {
  display: grid;
  gap: 18px;
}

.history-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.history-panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

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

.history-column {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.history-column-heading {
  align-items: start;
}

.history-column h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-item {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  background: rgba(251, 251, 248, 0.96);
  transition:
    border-color var(--soft-transition),
    box-shadow var(--soft-transition),
    background var(--soft-transition);
}

.history-item.is-active {
  border-color: rgba(33, 75, 68, 0.55);
  background: rgba(241, 247, 244, 0.96);
  box-shadow: 0 14px 30px rgba(33, 75, 68, 0.1);
}

.history-item-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.history-item-head strong {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.25;
}

.history-item-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.history-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.history-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

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

.history-stats div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(216, 221, 214, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.history-stats span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.history-stats strong {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.25;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.history-action {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(216, 221, 214, 0.95);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 760;
  cursor: pointer;
  transition:
    border-color var(--soft-transition),
    background var(--soft-transition),
    color var(--soft-transition);
}

.history-action:hover {
  border-color: rgba(33, 75, 68, 0.35);
  background: rgba(241, 247, 244, 0.96);
}

.history-action-danger:hover {
  border-color: rgba(165, 93, 67, 0.45);
  color: var(--clay);
  background: rgba(252, 245, 243, 0.96);
}

.history-empty {
  display: grid;
  gap: 8px;
  padding: 14px 0;
}

.history-empty strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.history-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.reformas-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px clamp(18px, 5vw, 72px) 34px;
  color: var(--muted);
  font-size: 0.88rem;
}

.floating-whatsapp {
  z-index: 30;
}

@media (max-width: 1100px) {
  .reformas-gate,
  .reformas-identity,
  .reformas-workspace {
    grid-template-columns: 1fr;
  }

  .quote-panel {
    position: static;
  }

  .reformas-gate {
    min-height: auto;
  }

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

@media (max-width: 760px) {
  .reformas-gate,
  .reformas-dashboard {
    padding-inline: 16px;
  }

  .reformas-proof-grid,
  .fields-grid,
  .quote-kpis,
  .account-summary-grid,
  .service-group-grid,
  .history-grid,
  .history-stats {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: auto;
  }

  .panel-heading,
  .contact-panel,
  .service-group-head,
  .quote-cart-row,
  .quote-cart-totals > div {
    flex-direction: column;
  }

  .quote-heading-meta {
    justify-items: start;
  }

  .reformas-cover figcaption {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
    padding: 14px 14px 12px;
  }

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

  .history-panel-head,
  .history-item-head {
    flex-direction: column;
  }

  .history-panel-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .history-stats {
    gap: 8px;
  }

  .customer-panel-head {
    padding-right: 0;
  }

  .customer-edit-button {
    position: static;
    margin-top: 2px;
    justify-self: start;
  }

  .modal-shell {
    padding: 12px;
  }

  .modal-panel {
    width: min(100%, 100%);
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .modal-actions .button {
    width: 100%;
    min-width: 0;
  }

  .order-summary-grid {
    grid-template-columns: 1fr;
  }

  .quote-cart-right {
    width: 100%;
    justify-content: space-between;
  }

  .reformas-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
