/* =====================================================================
   COMPONENTES REUTILIZABLES — botones, tarjetas, formularios, etiquetas
   ===================================================================== */

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--control-h); padding: 0 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14.5px; line-height: 1; white-space: nowrap; text-decoration: none;
  border: 1.5px solid transparent; transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 1px 2px rgba(249,115,22,0.35), inset 0 1px 0 rgba(255,255,255,0.15); }
.btn-primary:hover:not(:disabled) { background: var(--color-primary-hover); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--gray-800); }
.btn-outline { background: var(--white); color: var(--gray-800); border-color: var(--gray-300); }
.btn-outline:hover:not(:disabled) { border-color: var(--gray-800); background: var(--gray-50); }
.btn-ghost { background: transparent; color: var(--gray-700); }
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); color: var(--gray-900); }
.btn-soft { background: var(--color-primary-soft); color: var(--color-primary-text); }
.btn-soft:hover:not(:disabled) { background: var(--green-200); }
.btn-danger { background: var(--red-100); color: var(--red-600); }
.btn-danger:hover:not(:disabled) { background: #fecaca; }
.btn-whatsapp { background: #25d366; color: #fff; box-shadow: 0 1px 2px rgba(37,211,102,0.35); }
.btn-whatsapp:hover:not(:disabled) { background: #1fb457; }
.btn-whatsapp.btn-icon { width: var(--control-h); height: var(--control-h); }
.detail-contact { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.phone-list { display: flex; gap: 8px; flex-wrap: wrap; }
.field-card-price.is-quote { font-size: 15px; font-weight: 700; padding: 8px 12px; }
.field-card-price small { font-size: 12px; font-weight: 600; opacity: 0.75; }
.btn-sm { height: var(--control-h-sm); padding: 0 14px; font-size: 13.5px; border-radius: 8px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-lg { height: var(--control-h-lg); padding: 0 26px; font-size: 16px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-icon { width: var(--control-h-sm); height: var(--control-h-sm); padding: 0; border-radius: 8px; }

/* ---------- Tarjetas ---------- */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-body { padding: 20px; }
@media (min-width: 768px) { .card-body { padding: 24px; } }
.card-title { font-size: 17px; margin-bottom: 12px; }

/* ---------- Etiquetas / badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: var(--radius-full); font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.badge .icon-xs { stroke-width: 3; flex-shrink: 0; }
.badge-green { background: var(--green-100); color: var(--green-800); }
.badge-blue { background: var(--blue-100); color: var(--blue-600); }
.badge-red { background: var(--red-100); color: var(--red-600); }
.badge-amber { background: var(--amber-100); color: var(--amber-600); }
.badge-gray { background: var(--gray-100); color: var(--gray-700); }
.badge-dark { background: rgba(15,26,20,0.82); color: #fff; backdrop-filter: blur(6px); }
.badge-light { background: rgba(255,255,255,0.92); color: var(--gray-800); backdrop-filter: blur(6px); }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--color-primary); color: #fff; font-size: 11.5px; font-weight: 700; }

/* Chips (filtros activos) */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 12px; border-radius: var(--radius-full); background: var(--white); border: 1px solid var(--gray-300); font-size: 13px; font-weight: 500; color: var(--gray-800); transition: all var(--transition); }
.chip:hover { border-color: var(--gray-800); }
.chip .icon { color: var(--gray-500); }
.chip-clear { border-color: transparent; background: transparent; color: var(--green-700); font-weight: 600; }
.chip-clear:hover { background: var(--green-50); border-color: transparent; }

/* ---------- Formularios ---------- */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.form-label { font-size: 13.5px; font-weight: 600; color: var(--gray-800); }
.form-hint { font-size: 12.5px; color: var(--color-text-muted); }
.form-control {
  width: 100%; height: var(--control-h); padding: 0 14px; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm); background: var(--white); font-size: 15px; color: var(--gray-900);
  transition: border var(--transition), box-shadow var(--transition); min-width: 0;
}
.form-control:hover { border-color: var(--gray-400); }
.form-control:focus { outline: none; border-color: var(--color-primary); box-shadow: var(--ring); }
.form-control::placeholder { color: var(--gray-400); }
.form-control:disabled { background: var(--gray-100); color: var(--gray-400); cursor: not-allowed; }
.form-control-sm { height: var(--control-h-sm); font-size: 14px; padding: 0 12px; border-radius: 8px; }
textarea.form-control { height: auto; min-height: 112px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select.form-control { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236f7d75' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; text-overflow: ellipsis; }
select.form-control-sm { background-position: right 10px center; padding-right: 32px; }
/* Campo de fecha: mismo alto, tipografía e icono que el resto de inputs (Chrome, Safari, iOS y Android) */
input[type="date"].form-control { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-height: var(--control-h); line-height: normal; padding-right: 38px; cursor: pointer; font-family: var(--font); font-size: 15px; color: var(--gray-900); background-image: none; }
input[type="date"].form-control::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; }
input[type="date"].form-control::-webkit-datetime-edit { padding: 0; }
input[type="date"].form-control::-webkit-datetime-edit-fields-wrapper { padding: 0; }
input[type="date"].form-control::-webkit-inner-spin-button, input[type="date"].form-control::-webkit-clear-button { display: none; -webkit-appearance: none; }
/* El botón nativo del calendario cubre todo el campo (invisible): al tocar en cualquier parte se abre el calendario */
.date-field { position: relative; }
.date-field input[type="date"].form-control::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; background: transparent; }
.input-icon.date-field > .date-field-chevron { position: absolute; right: 12px; left: auto; top: 50%; transform: translateY(-50%); color: var(--gray-500); pointer-events: none; }
.date-field input:focus + .date-field-chevron, .date-field:hover .date-field-chevron { color: var(--green-700); }
.date-field:hover > .icon:first-child { color: var(--green-700); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-error { display: flex; gap: 8px; background: var(--red-100); color: #991b1b; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.form-success { background: var(--green-100); color: var(--green-800); padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--gray-500); pointer-events: none; }
.input-icon .form-control { padding-left: 40px; }

/* Casillas y opciones */
.checkbox, .radio, .choice { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; font-size: 14.5px; color: var(--gray-800); }
.checkbox input, .radio input, .choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-primary); cursor: pointer; flex-shrink: 0; }
.choice:hover span { color: var(--gray-900); }

/* Opciones tipo tarjeta (Fútbol 7 / Fútbol 11, método de pago) */
.option-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.option-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 12px; text-align: center;
  border: 1.5px solid var(--gray-300); border-radius: var(--radius); background: var(--white); cursor: pointer; transition: all var(--transition);
}
.option-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.option-card:hover { border-color: var(--gray-500); }
.option-card.selected, .option-card:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-softer); box-shadow: var(--ring); }
.option-card .icon { color: var(--green-700); }
.option-card strong { font-size: 14.5px; }
.option-card span { font-size: 12.5px; color: var(--color-text-muted); }

/* Selector de ubicación (departamento → provincia → distrito) */
.location-picker { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 640px) { .location-picker { grid-template-columns: repeat(3, 1fr); } }
.location-picker .form-group { margin-bottom: 12px; }

/* Sugerencias del buscador */
.suggestions { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; max-height: 300px; overflow-y: auto; text-align: left; }
.suggestions li button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; text-align: left; color: var(--gray-900); }
.suggestions li button:hover { background: var(--gray-100); }
.suggestions li button .icon { color: var(--green-600); }
.suggestions li button span { display: flex; flex-direction: column; line-height: 1.25; }
.suggestions li button strong { font-size: 14px; font-weight: 600; }
.suggestions li button small { font-size: 12px; color: var(--color-text-muted); }

/* ---------- Tarjeta de cancha ---------- */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.field-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); min-width: 0; cursor: pointer; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.field-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--green-500); }
.field-card:hover .field-card-title { color: var(--green-700); }
/* Enlace invisible que cubre toda la tarjeta: cualquier clic abre el detalle */
.field-card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.field-card-link:focus-visible { outline: 2px solid var(--green-500); outline-offset: -2px; }
.field-card-image { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--gray-100); }
.field-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.field-card:hover .field-card-image img { transform: scale(1.04); }
.field-card-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,26,20,0.28) 0%, rgba(15,26,20,0) 45%); pointer-events: none; }
.field-card-badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; flex-wrap: wrap; z-index: 1; pointer-events: none; }
/* Acciones independientes sobre la foto (WhatsApp y favorito): por encima del enlace de la tarjeta */
.field-card-tools { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; z-index: 2; }
.card-tool { position: static; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.95); color: var(--gray-700); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); transition: transform var(--transition), background var(--transition), color var(--transition); }
.card-tool:hover { transform: scale(1.08); }
.card-tool .icon { width: 19px; height: 19px; }
.card-tool-wa { background: #25d366; color: #fff; }
.card-tool-wa:hover { background: #1fb457; }
.field-card-badges .badge { max-width: 100%; white-space: normal; line-height: 1.25; }
.field-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.field-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; min-width: 0; }
.field-card-title { font-size: 16.5px; line-height: 1.3; min-width: 0; flex: 1; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color var(--transition); }
.field-card-meta { display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; color: var(--color-text-muted); line-height: 1.4; min-width: 0; }
.field-card-meta .icon { color: var(--gray-400); margin-top: 2px; }
.field-card-meta span { min-width: 0; }
.field-card-description { font-size: 13.5px; color: var(--gray-700); line-height: 1.45; }
.field-card-services { display: flex; flex-wrap: wrap; gap: 6px; }
.field-card-services span { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; background: var(--gray-100); color: var(--green-700); font-size: 12px; font-weight: 600; }
.field-card-footer { display: flex; align-items: center; justify-content: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--gray-100); min-width: 0; }
.field-card-price { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--color-primary-text); white-space: nowrap; line-height: 1; padding: 6px 16px; border-radius: 10px; background: var(--color-primary-softer); }
.field-card-services { align-items: center; position: relative; z-index: 2; }
.card-tool-inline { width: 28px; height: 28px; margin-left: auto; box-shadow: none; }
.card-tool-inline .icon { width: 16px; height: 16px; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13.5px; white-space: nowrap; flex-shrink: 0; }
.rating .icon { width: 15px; height: 15px; color: var(--star); }
.rating small { font-weight: 500; color: var(--color-text-muted); margin-left: 2px; }

/* Favoritos */
.fav-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.95); color: var(--gray-700); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); transition: transform var(--transition), color var(--transition); }
.fav-btn:hover { transform: scale(1.08); color: var(--red-600); }
.fav-btn.active { color: var(--red-600); }
.fav-btn .icon { width: 18px; height: 18px; }
.field-card-media { position: relative; }
.fav-btn-lg { position: static; width: 42px; height: 42px; border: 1px solid var(--gray-300); flex-shrink: 0; }

/* ---------- Horarios (slots) ---------- */
.slots-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 480px) { .slots-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .slots-grid { grid-template-columns: repeat(4, 1fr); } }
.slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px; padding: 8px 6px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--gray-200); background: var(--white); font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
  cursor: pointer; transition: all var(--transition); user-select: none; -webkit-tap-highlight-color: transparent;
}
.slot-time { display: inline-flex; align-items: center; gap: 4px; }
.slot small { font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.slot-AVAILABLE { border-color: var(--green-200); color: var(--gray-900); }
.slot-AVAILABLE small { color: var(--green-700); }
.slot-AVAILABLE:hover { border-color: var(--color-primary); background: var(--color-primary-softer); }
.slot-selected, .slot-selected:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: 0 4px 12px rgba(249,115,22,0.35); }
.slot-selected small { color: rgba(255,255,255,0.9); }
.slot-BOOKED { background: var(--blue-100); border-color: transparent; color: var(--blue-600); cursor: not-allowed; }
.slot-BLOCKED { background: var(--red-100); border-color: transparent; color: var(--red-600); cursor: not-allowed; }
.slot-PAST { background: var(--gray-100); border-color: transparent; color: var(--gray-400); cursor: not-allowed; }
.slot-PAST small { text-decoration: none; }
.slots-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--color-text-muted); margin-top: 14px; }
.slots-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend-dot.available { background: var(--green-500); color: #fff; width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; }
.legend-dot.available .icon-xs { width: 10px; height: 10px; stroke-width: 3.5; }
.legend-dot.booked { background: var(--blue-600); }
.legend-dot.blocked { background: var(--red-600); }
.legend-dot.past { background: var(--gray-300); }

/* ---------- Agenda de horarios (solo disponibles) ---------- */
.agenda { display: flex; flex-direction: column; gap: 18px; }
.agenda-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12.5px; color: var(--gray-700); }
.agenda-legend span { display: inline-flex; align-items: center; gap: 7px; }
.agenda-dot { width: 18px; height: 18px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.agenda-dot-available { background: var(--white); border: 1.5px solid var(--green-500); }
.agenda-dot-selected { background: var(--orange-500); color: #fff; }
.agenda-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.agenda-slot {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 58px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--green-200); background: var(--white); text-align: center;
  cursor: pointer; transition: all var(--transition); -webkit-tap-highlight-color: transparent;
}
.agenda-slot-time { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--gray-900); white-space: nowrap; }
.agenda-slot-time em { font-style: normal; color: var(--gray-400); font-weight: 500; margin: 0 2px; }
.agenda-slot-price { font-size: 12px; font-weight: 600; color: var(--green-700); }
.agenda-slot:hover { border-color: var(--green-500); background: var(--green-50); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,163,74,0.14); }
.agenda-slot.is-selected { background: var(--orange-500); border-color: var(--orange-600); box-shadow: 0 6px 16px rgba(249,115,22,0.32); }
.agenda-slot.is-selected .agenda-slot-time, .agenda-slot.is-selected .agenda-slot-time em { color: #fff; }
.agenda-slot.is-selected .agenda-slot-price { color: rgba(255,255,255,0.9); }
.agenda-slot.is-selected:hover { background: var(--orange-600); }
.agenda-slot:focus-visible { outline: 3px solid rgba(22,163,74,0.35); outline-offset: 2px; }
.agenda-summary { padding: 12px 14px; border-radius: var(--radius); background: var(--green-50); border: 1px solid var(--green-200); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.agenda-summary.is-empty { background: var(--gray-100); border: 1px dashed var(--gray-300); }
.agenda-summary.is-empty > span { display: inline-flex; align-items: center; gap: 6px; }
.agenda-summary-blocks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.agenda-summary-label { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--green-800); margin-right: 2px; }
.agenda-summary-total { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.agenda-summary-total strong { font-size: 17px; color: var(--gray-900); }
@media (max-width: 520px) {
  .agenda-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .agenda-slot { padding: 9px 10px; min-height: 54px; }
  .agenda-slot-time { font-size: 14px; }
}

/* ---------- Selector de fecha (tira horizontal) ---------- */
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.date-strip::-webkit-scrollbar { display: none; }
.date-chip {
  flex: 0 0 auto; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 64px; padding: 9px 8px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--gray-200); background: var(--white); cursor: pointer; transition: all var(--transition); -webkit-tap-highlight-color: transparent;
}
.date-chip span { font-size: 11.5px; font-weight: 600; color: var(--color-text-muted); text-transform: capitalize; }
.date-chip strong { font-size: 19px; font-weight: 700; }
.date-chip em { font-style: normal; font-size: 11px; color: var(--color-text-muted); text-transform: capitalize; }
.date-chip:hover { border-color: var(--gray-400); }
.date-chip.selected { background: var(--dark); border-color: var(--dark); color: #fff; }
.date-chip.selected span, .date-chip.selected em { color: rgba(255,255,255,0.7); }

/* ---------- Servicios ---------- */
.services-list { display: flex; flex-wrap: wrap; gap: 8px; }
.service-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--radius-full); background: var(--gray-100); font-size: 13.5px; font-weight: 500; }
.service-chip .icon { width: 17px; height: 17px; color: var(--green-700); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.service-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--gray-100); font-size: 14px; font-weight: 500; }
.service-item .icon { width: 20px; height: 20px; color: var(--green-700); }
.service-item.off { opacity: 0.4; text-decoration: line-through; }
.service-item input { width: 18px; height: 18px; accent-color: var(--color-primary); margin: 0; }

/* ---------- Mapa ---------- */
.map-preview { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); background: #e8efe9; }
.location-map { position: relative; z-index: 0; isolation: isolate; width: 100%; background: #e8efe9; border-radius: var(--radius-lg); overflow: hidden; }
.location-map > svg { width: 100%; height: 100%; display: block; }
.map-preview .location-map { border-radius: 0; }
.location-map.leaflet-container { font-family: var(--font); }
.map-marker { background: transparent; border: 0; }
.map-marker svg { filter: drop-shadow(0 3px 4px rgba(0,0,0,0.3)); }
.leaflet-popup-content-wrapper { border-radius: var(--radius-sm); font-size: 13.5px; }
.map-search { position: relative; display: flex; gap: 8px; margin-bottom: 10px; }
.map-search .form-control { flex: 1; }
.map-search .suggestions { top: calc(100% + 6px); }
.map-hint { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--color-text-muted); margin-top: 8px; }
.map-coords { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12.5px; color: var(--gray-700); background: var(--gray-100); padding: 4px 8px; border-radius: 6px; }
.map-preview-footer { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--white); border-top: 1px solid var(--color-border); }

/* ---------- Toast (notificaciones) ---------- */
#toast-container { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; padding: 13px 16px; border-radius: var(--radius); background: var(--gray-900); color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: slideUp 220ms ease; display: flex; align-items: center; gap: 10px; }
.toast .icon { flex-shrink: 0; }
.toast-success { background: var(--green-700); }
.toast-error { background: var(--red-600); }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,26,20,0.6); backdrop-filter: blur(2px); z-index: 900; display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fadeIn 150ms ease; }
@media (min-width: 640px) { .modal-backdrop { align-items: center; padding: 24px; } }
.modal { background: var(--white); width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: slideUp 220ms ease; }
@media (min-width: 640px) { .modal { border-radius: var(--radius-xl); padding: 24px; } }
.modal-title { font-size: 18px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1; min-width: 120px; }

/* ---------- Estado vacío ---------- */
.empty-state { text-align: center; padding: 56px 20px; color: var(--color-text-muted); background: var(--white); border: 1px dashed var(--gray-300); border-radius: var(--radius-lg); }
.empty-state .icon { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--gray-300); }
.empty-state h3 { color: var(--gray-900); margin-bottom: 6px; font-size: 18px; }

/* ---------- Pasos (stepper) ---------- */
.stepper { display: flex; align-items: center; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.stepper::-webkit-scrollbar { display: none; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--gray-400); white-space: nowrap; }
.step-number { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--gray-200); color: var(--gray-500); font-size: 12.5px; }
.step.done .step-number { background: var(--green-100); color: var(--green-700); }
.step.done { color: var(--green-700); }
.step.active { color: var(--gray-900); }
.step.active .step-number { background: var(--dark); color: #fff; }
.step-line { flex: 1; min-width: 20px; height: 2px; background: var(--gray-200); margin: 0 10px; border-radius: 2px; }
.step-line.done { background: var(--green-500); }

/* ---------- Resumen (lista clave/valor) ---------- */
.summary-list { display: flex; flex-direction: column; gap: 10px; }
.summary-item { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; }
.summary-item span:first-child { color: var(--color-text-muted); flex-shrink: 0; }
.summary-item span:last-child { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.summary-total { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; margin-top: 6px; border-top: 1px dashed var(--gray-300); font-size: 17px; font-weight: 700; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--color-border); white-space: nowrap; vertical-align: middle; }
.table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); font-weight: 600; background: var(--gray-50); }
.table tbody tr:hover { background: var(--gray-50); }
.table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--color-text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color var(--transition); }
.tab:hover { color: var(--gray-900); }
.tab.active { color: var(--color-primary-text); border-color: var(--color-primary); }

/* ---------- Calendario propio (DatePicker) ---------- */
.date-picker { position: relative; }
.date-picker-field { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; padding: 0 12px 0 13px; }
.date-picker-field:hover { border-color: var(--gray-400); }
.date-picker-field[aria-expanded="true"] { border-color: var(--color-primary); box-shadow: var(--ring); }
.date-picker-icon { color: var(--gray-500); flex-shrink: 0; }
.date-picker-field[aria-expanded="true"] .date-picker-icon, .date-picker-field:hover .date-picker-icon { color: var(--green-700); }
.date-picker-label { flex: 1; font-size: 15px; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.date-picker-label.is-placeholder { color: var(--gray-400); }
.date-picker-chevron { color: var(--gray-500); flex-shrink: 0; transition: transform var(--transition); }
.date-picker-field[aria-expanded="true"] .date-picker-chevron { transform: rotate(180deg); }
.date-picker-popover { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: 320px; max-width: calc(100vw - 32px); background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 14px; animation: fadeIn 140ms ease; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-head strong { font-size: 15px; text-transform: capitalize; }
.dp-nav { width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--gray-700); transition: background var(--transition); }
.dp-nav:hover:not(:disabled) { background: var(--gray-100); }
.dp-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.dp-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11.5px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-day { height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; color: var(--gray-900); transition: background var(--transition), color var(--transition); }
.dp-day:hover:not(:disabled):not(.is-empty) { background: var(--green-100); color: var(--green-800); }
.dp-day.is-today { font-weight: 700; color: var(--green-700); box-shadow: inset 0 0 0 1.5px var(--green-300, #86efac); }
.dp-day.is-selected, .dp-day.is-selected:hover { background: var(--green-600); color: #fff; box-shadow: none; font-weight: 700; }
.dp-day.is-disabled { color: var(--gray-300); cursor: not-allowed; }
.dp-day.is-empty { pointer-events: none; }
.dp-footer { display: flex; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--gray-100); }
@media (max-width: 640px) { .date-picker-popover { width: 100%; } .dp-day { height: 42px; } }
