/* wipemx · Olara — Sistema visual compartido (sascab, selva, cenote, arcilla) */
:root {
  --bg: #F1E9D8;
  --fg: #23261B;
  --muted: #525641;
  --surface: #FAF3E4;
  --surface-2: #F1E6D0;
  --border: rgba(35, 38, 27, 0.16);
  --border-strong: rgba(35, 38, 27, 0.30);
  --accent: #2D756A;
  --accent-strong: #235E55;
  --accent-soft: rgba(45, 117, 106, 0.12);
  --accent-ink: #FBF3E1;
  --clay: #A65B31;
  --clay-soft: rgba(166, 91, 49, 0.12);
  --icon-arena: #9A7438;
  --focus-ring: #235E55;
  --shadow: 0 18px 40px -22px rgba(22, 36, 27, 0.38);
  --shadow-sm: 0 6px 16px -10px rgba(22, 36, 27, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --space-1: 0.35rem;
  --space-2: 0.65rem;
  --space-3: 1rem;
  --space-4: 1.4rem;
  --space-5: 2rem;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --text-scale: 1;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #122019;
    --fg: #EDE6D2;
    --muted: #B2BEA2;
    --surface: #192C21;
    --surface-2: #1F3627;
    --border: rgba(237, 230, 210, 0.15);
    --border-strong: rgba(237, 230, 210, 0.28);
    --accent: #56B6A8;
    --accent-strong: #6FC7BA;
    --accent-soft: rgba(86, 182, 168, 0.16);
    --accent-ink: #122019;
    --clay: #D49063;
    --clay-soft: rgba(212, 144, 99, 0.16);
    --icon-arena: #D2AD73;
    --focus-ring: #6FC7BA;
    --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 6px 16px -10px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --bg: #122019;
  --fg: #EDE6D2;
  --muted: #B2BEA2;
  --surface: #192C21;
  --surface-2: #1F3627;
  --border: rgba(237, 230, 210, 0.15);
  --border-strong: rgba(237, 230, 210, 0.28);
  --accent: #56B6A8;
  --accent-strong: #6FC7BA;
  --accent-soft: rgba(86, 182, 168, 0.16);
  --accent-ink: #122019;
  --clay: #D49063;
  --clay-soft: rgba(212, 144, 99, 0.16);
  --icon-arena: #D2AD73;
  --focus-ring: #6FC7BA;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 6px 16px -10px rgba(0, 0, 0, 0.45);
}

:root[data-text-size="large"] {
  --text-scale: 1.12;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  font-size: calc(16px * var(--text-scale));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

button,
input,
textarea,
select {
  font-family: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2.5px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Header global wipemx · Olara */
.site-header {
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
}

.site-header__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--fg);
  min-height: 44px;
  padding-right: 0.25rem;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand__sub {
  font-size: 0.72rem;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

@media (min-width: 820px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-pill:hover {
  color: var(--fg);
  background: var(--surface-2);
}

.nav-pill[aria-current="page"] {
  color: var(--fg);
  background: var(--surface-2);
  border-color: var(--border-strong);
  font-weight: 600;
}

.nav-pill--cta {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.nav-pill--cta:hover {
  background: var(--accent-strong);
  color: var(--accent-ink);
}

.icon-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.icon-btn:hover {
  background: var(--bg);
}

.icon-btn:active {
  transform: scale(0.97);
}

.icon-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

@media (min-width: 820px) {
  .menu-toggle {
    display: none;
  }
}

.mobile-drawer {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mobile-drawer[hidden] {
  display: none;
}

.mobile-drawer a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--fg);
  font-weight: 500;
  border: 1px solid transparent;
}

.mobile-drawer a[aria-current="page"] {
  background: var(--surface-2);
  border-color: var(--border-strong);
  font-weight: 600;
}

.mobile-drawer a.mobile-cta {
  background: var(--accent);
  color: var(--accent-ink);
  justify-content: center;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* Contenedores principales */
.main-wrap {
  flex: 1 0 auto;
  width: 100%;
  padding: clamp(1.25rem, 4vw, 2.5rem) 1rem 3.5rem;
}

.flow {
  width: 100%;
  max-width: 520px;
  min-width: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

@media (min-width: 640px) {
  .flow {
    max-width: 600px;
  }
}

.page {
  width: 100%;
  max-width: 980px;
  min-width: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

/* Tipografía */
.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 0.35rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4.5vw, 2.1rem);
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 500;
  margin: 0;
}

.sub {
  color: var(--muted);
  font-size: 0.96rem;
  margin: 0.4rem 0 0;
  max-width: 60ch;
}

.field-note {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* Topbar de pasos y barra de progreso */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.topbar-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  min-height: 44px;
  padding: 0 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.topbar-btn:hover {
  background: var(--surface-2);
}

.topbar-btn:disabled {
  visibility: hidden;
  pointer-events: none;
}

.step-dots {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.step-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.step-dots span.active {
  background: var(--accent);
  width: 22px;
  border-radius: var(--radius-pill);
}

.step-dots span.done {
  background: var(--accent);
  opacity: 0.55;
}

.step,
.view {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.step[hidden],
.view[hidden] {
  display: none;
}

/* Superficies y tarjetas */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel--padded {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .cards--3 {
    flex-direction: row;
  }
}

.card {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  text-align: left;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.05rem 1.15rem;
  background: var(--surface);
  cursor: pointer;
  width: 100%;
  min-height: 64px;
  text-decoration: none;
  color: var(--fg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.12s ease, background-color 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.card:active {
  transform: scale(0.99);
}

.card.selected {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--accent), var(--shadow-sm);
}

.card__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: var(--icon-arena);
}

.card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.card__body strong {
  display: block;
  font-size: 1.05rem;
}

.card__body span {
  display: block;
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.card__price {
  flex: 0 0 auto;
  text-align: right;
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card__price strong {
  display: block;
  color: var(--fg);
  font-size: 1.08rem;
}

@media (min-width: 640px) {
  .cards--3 .card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 1.25rem;
  }
  .cards--3 .card__price {
    text-align: left;
    margin-top: auto;
    padding-top: 0.4rem;
  }
}

/* Botones principales y secundarios */
.cta {
  width: 100%;
  min-height: 50px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  padding: 0.85rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.cta:hover:not(:disabled) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.cta:active:not(:disabled) {
  transform: scale(0.99);
}

.cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cta--secondary {
  background: var(--surface-2);
  color: var(--fg);
  border-color: var(--border-strong);
}

.cta--secondary:hover:not(:disabled) {
  background: var(--surface);
  border-color: var(--accent);
}

.cta--warn {
  background: transparent;
  color: var(--clay);
  border-color: var(--clay);
}

.cta--warn:hover:not(:disabled) {
  background: var(--clay-soft);
  color: var(--clay);
  border-color: var(--clay);
}

.nav-link {
  align-self: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.nav-link:hover {
  text-decoration: underline;
}

/* Chips y tabs */
.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  min-height: 44px;
  font-size: 0.88rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: break-word;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: var(--accent);
}

.chip.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.chip.warn.selected {
  border-color: var(--clay);
  background: var(--clay);
  color: var(--accent-ink);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.tabs button {
  flex: 1 0 auto;
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.tabs button:hover {
  color: var(--fg);
  border-color: var(--accent);
}

.tabs button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

/* Formularios */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  font-size: 1rem;
  min-height: 46px;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--fg);
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 88px;
}

.row2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

@media (min-width: 440px) {
  .row2 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.row2[hidden],
[hidden] {
  display: none;
}

/* Steppers */
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.96rem;
}

.stepper-row:last-child {
  border-bottom: none;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-variant-numeric: tabular-nums;
}

.stepper button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--fg);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stepper button:hover {
  border-color: var(--accent);
}

.stepper span {
  min-width: 1.6rem;
  text-align: center;
  font-weight: 600;
}

/* Calendario y horarios */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem 0.5rem;
  font-size: 0.98rem;
  font-weight: 600;
  text-transform: capitalize;
}

.cal-head button {
  background: var(--surface-2);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
  text-align: center;
  padding: 0.25rem 0.85rem 1rem;
}

.cal-dow {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0;
}

.cal-day {
  min-height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
  border: 1px solid transparent;
  font-size: 0.92rem;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cal-day:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.cal-day:disabled {
  color: var(--border-strong);
  cursor: not-allowed;
}

.cal-day.selected {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.cal-day.empty {
  visibility: hidden;
  pointer-events: none;
}

.slot-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

@media (min-width: 440px) {
  .slot-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.slot {
  min-height: 46px;
  font-size: 0.92rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.slot.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.slot:disabled {
  color: var(--border-strong);
  text-decoration: line-through;
  cursor: not-allowed;
}

/* Resúmenes, pagos, avisos y tarjetas de subida */
.summary-panel {
  padding: 1.15rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.94rem;
  padding: 0 1.2rem;
}

.summary-row span:last-child {
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.08rem;
  font-weight: 700;
  border-top: 1px solid var(--border-strong);
  margin: 0.45rem 1.2rem 0;
  padding-top: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.pay-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
}

.note-card {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.upload-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.75rem 0.95rem;
  min-width: 0;
}

.upload-card.done {
  border-color: var(--accent);
}

.upload-card__icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--muted);
}

.upload-card.done .upload-card__icon {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.upload-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.upload-card__body strong {
  display: block;
  font-size: 0.95rem;
}

.upload-card__body span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-card.done .upload-card__body span {
  color: var(--accent-strong);
  font-weight: 600;
}

.upload-card__btn {
  flex: 0 0 auto;
  min-height: 44px;
  font-size: 0.86rem;
  font-weight: 600;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
}

.upload-card__btn:hover {
  border-color: var(--accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Línea de tiempo y estados */
.timeline {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.35rem;
}

.timeline__item {
  display: flex;
  gap: 0.8rem;
  padding-bottom: 1.25rem;
  position: relative;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 20px;
  bottom: -2px;
  width: 1.5px;
  background: var(--border-strong);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item:last-child::before {
  display: none;
}

.timeline__marker {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  margin-top: 4px;
  border: 2px solid var(--border-strong);
  background: var(--surface);
}

.timeline__item--done .timeline__marker {
  background: var(--muted);
  border-color: var(--muted);
}

.timeline__item--active .timeline__marker {
  background: var(--accent);
  border-color: var(--accent);
}

.timeline__body strong {
  display: block;
  font-size: 0.98rem;
}

.timeline__body span {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.timeline__item--pending .timeline__body strong {
  color: var(--muted);
}

.status-flow {
  display: flex;
  margin-top: 0.4rem;
}

.status-flow__step {
  flex: 1;
  position: relative;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 1.3rem;
}

.status-flow__step::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--border-strong);
}

.status-flow__step:first-child::before {
  left: 50%;
  width: 50%;
}

.status-flow__step:last-child::before {
  width: 50%;
}

.status-flow__dot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--surface);
}

.status-flow__step--done {
  color: var(--fg);
}

.status-flow__step--done .status-flow__dot {
  background: var(--muted);
  border-color: var(--muted);
}

.status-flow__step--active {
  color: var(--fg);
  font-weight: 700;
}

.status-flow__step--active .status-flow__dot {
  background: var(--accent);
  border-color: var(--accent);
}

/* Consentimiento y checks grandes */
.consent-row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--fg);
  line-height: 1.5;
  cursor: pointer;
  padding: 0.35rem 0;
}

.consent-row input {
  accent-color: var(--accent);
  width: 24px;
  height: 24px;
  margin: 0.1rem 0 0;
  flex: 0 0 auto;
  cursor: pointer;
}

/* Avisos toast en pantalla (sin alert) */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 60;
  width: min(92vw, 440px);
  pointer-events: none;
}

.toast {
  background: var(--fg);
  color: var(--bg);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  pointer-events: auto;
  animation: toastIn 0.2s ease-out;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Portada y secciones del sitio completo */
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 780px) {
  .hero {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: center;
  }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.hero__actions .cta {
  width: auto;
  flex: 1 1 200px;
}

.hero__card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.mini-stat-list {
  display: grid;
  gap: 0.65rem;
}

.mini-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
}

.mini-stat__num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 680px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 720px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: var(--shadow-sm);
}

.role-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: auto;
}

.role-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.role-link:hover {
  border-color: var(--accent);
  background: var(--bg);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
}

.site-footer__inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* Reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
}

/* Asociadas, operación, paneles y soporte */
.capture-frame {
  align-self: center;
  width: 132px;
  height: 160px;
  margin: 0.4rem auto 0;
  border: 2px dashed var(--border-strong);
  border-radius: 54% 54% 50% 50% / 60% 60% 45% 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.capture-frame.done {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent-strong);
}

.capture-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.capture-list {
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.capture-list li {
  padding-left: 1.15rem;
  position: relative;
}

.capture-list li::before {
  content: "·";
  position: absolute;
  left: 0.2rem;
  color: var(--accent-strong);
  font-weight: 700;
}

.job-card {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  text-align: left;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  background: var(--surface);
  cursor: pointer;
  width: 100%;
  min-height: 64px;
  box-shadow: var(--shadow-sm);
}

.job-card:hover {
  border-color: var(--accent);
}

.job-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.job-card__body strong {
  display: block;
  font-size: 1rem;
}

.job-card__body span {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.job-card__status {
  flex: 0 0 auto;
  font-size: 0.82rem;
  color: var(--accent-strong);
  font-weight: 700;
}

.checkmark {
  width: 52px;
  height: 52px;
  margin: 0.4rem auto;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-circle {
  width: 52px;
  height: 52px;
  margin: 0.4rem auto;
  border-radius: 50%;
  border: 2px solid var(--clay);
  color: var(--clay);
  display: flex;
  align-items: center;
  justify-content: center;
}

.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

/* Edificio y Cartera */
.card-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-shell__head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-shell__head span {
  font-size: 0.86rem;
  color: var(--muted);
}

.card-shell__body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

@media (max-width: 720px) {
  .card-shell__body {
    grid-template-columns: minmax(0, 1fr);
  }
}

.units {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  min-width: 0;
}

@media (max-width: 720px) {
  .units {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.unit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.unit-row:last-child {
  border-bottom: none;
}

.unit-row__meta {
  min-width: 0;
}

.unit-row__meta strong {
  display: block;
}

.unit-row__meta span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: break-word;
}

.status-pill {
  flex: 0 0 auto;
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  white-space: nowrap;
}

.status-pill--scheduled {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-pill--empty {
  border: 1px solid var(--border-strong);
  color: var(--muted);
}

.areas {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  min-height: 44px;
  cursor: pointer;
}

.toggle-row__meta {
  min-width: 0;
}

.toggle-row__meta span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  overflow-wrap: break-word;
}

.toggle {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  appearance: none;
  background: var(--surface-2);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s ease;
}

.toggle:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle:checked::after {
  background: var(--accent-ink);
  transform: translateX(20px);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  padding: 1.15rem 1.25rem;
}

.portfolio-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
  background: var(--surface-2);
}

.portfolio-card strong {
  display: block;
  font-size: 0.98rem;
}

.portfolio-card span.zona {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.portfolio-card__stats {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.portfolio-card__stat {
  font-size: 0.78rem;
  color: var(--muted);
}

.portfolio-card__stat strong {
  display: block;
  color: var(--fg);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.portfolio-card__flag {
  font-size: 0.8rem;
  color: var(--clay);
  font-weight: 600;
  border-top: 1px dashed var(--border);
  padding-top: 0.5rem;
  margin: 0;
}

.audit-log {
  padding: 0 1.25rem 1.2rem;
}

.audit-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.6rem;
  font-size: 0.84rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

@media (max-width: 600px) {
  .audit-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }
}

.audit-row:last-child {
  border-bottom: none;
}

.audit-row__time,
.audit-row__who {
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}

.permit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}

.permit-row:last-of-type {
  border-bottom: none;
}

.permit-row__who span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.report-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.report-stats > div {
  flex: 1 1 85px;
  font-size: 0.78rem;
  color: var(--muted);
}

.report-stats strong {
  display: block;
  font-size: 1.15rem;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.alert-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.88rem;
}

.alert-row__dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--clay);
  margin-top: 0.45rem;
}

.alert-row span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Reputación, estrellas, cancelación y chat */
.stars {
  display: flex;
  gap: 0.25rem;
  color: var(--accent-strong);
  align-items: center;
}

.stars--center {
  justify-content: center;
}

.star-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.star-btn.active {
  color: var(--accent-strong);
}

.stars svg {
  width: 24px;
  height: 24px;
}

.stars.small svg {
  width: 14px;
  height: 14px;
}

.rating-score {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rating-score__num {
  font-family: var(--font-display);
  font-size: 2.3rem;
  line-height: 1;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.9rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.badge-row:last-child {
  border-bottom: none;
}

.badge-row__icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--icon-arena);
}

.review-row {
  font-size: 0.88rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.review-row:last-child {
  border-bottom: none;
}

.review-row__head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.service-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  background: var(--surface);
  cursor: pointer;
  width: 100%;
  text-align: left;
  min-height: 56px;
}

.service-card.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.service-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.service-card__body strong {
  display: block;
  font-size: 0.96rem;
}

.service-card__body span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.service-card__price {
  flex: 0 0 auto;
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  padding: 0 1rem;
  min-height: 48px;
}

.search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 0.96rem;
  padding: 0.55rem 0;
}

.search-box input:focus {
  outline: none;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.chat-bubble {
  max-width: 86%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.chat-bubble--client {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-ink);
  border-bottom-right-radius: 4px;
}

.chat-bubble--olara {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-bubble__meta {
  font-size: 0.74rem;
  opacity: 0.8;
  margin-top: 0.3rem;
}

.wait-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.94rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.wait-row:last-of-type {
  border-bottom: none;
}

.legal-doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(1.2rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.legal-doc h2 {
  margin-top: 0.6rem;
}

.legal-doc ul {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
