/**
 * Wellness Dashboard - Frontend Styles
 */

/* ==================== VARIABLES ==================== */
:root {
    --primary-color: #414536;
    --secondary-color: #414536;
    --accent-color: #F4B245;
    --text-dark: #2C3E50;
    --text-light: #6C757D;
    --border-color: #E8EBED;
    --bg-light: #F8F9FA;
    --success-color: #28A745;
    --danger-color: #DC3545;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== BARRA DE BÚSQUEDA ==================== */
.wellness-search-bar {
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    overflow: visible;
}

.search-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
    height: 52px;
    box-sizing: border-box;
    min-width: 0;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-select {
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    height: 52px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23808080' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.search-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .search-container {
        grid-template-columns: 1fr;
    }
}

/* ==================== GRID DE SERVICIOS ==================== */
.wellness-services-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.wellness-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.wellness-service-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wellness-service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* ==================== HEADER DE TARJETA ==================== */
.service-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 24px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.professional-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.professional-info {
    flex: 1;
}

.professional-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.service-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    color: var(--accent-color);
    font-size: 16px;
    letter-spacing: 2px;
}

.category-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== CONTENIDO DE TARJETA ==================== */
.service-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 20px 24px 12px;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.service-description {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 24px 20px;
    flex-grow: 1;
}

.service-meta {
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 14px;
}

.meta-item svg {
    color: var(--primary-color);
}

/* ==================== FOOTER DE TARJETA ==================== */
.service-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
}

.service-price {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-light);
}

.btn-reserve {
    padding: 12px 28px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reserve:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* ==================== MODAL DE RESERVA ==================== */
.booking-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.booking-modal-content {
    position: relative;
    background: white;
    margin: 40px auto;
    max-width: 900px;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.booking-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: 300;
    color: var(--text-light);
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.booking-modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* ==================== PASOS DE RESERVA ==================== */
.booking-steps {
    padding: 40px;
}

.booking-step {
    display: none;
}

.booking-step.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

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

.booking-step h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 32px 0;
}

/* ==================== HEADER DE MODAL ==================== */
.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin-bottom: 32px;
}

.professional-mini {
    display: flex;
    align-items: center;
    gap: 16px;
}

.professional-mini img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.professional-mini h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.professional-mini p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

.booking-price-badge {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ==================== CALENDARIO ==================== */
.calendar-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-month-year {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.calendar-nav {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-dark);
    transition: var(--transition);
}

.calendar-nav:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    padding: 8px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.calendar-day:not(.disabled):not(.empty):hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
    font-weight: 700;
}

.calendar-day.today {
    border-color: var(--accent-color);
}

.calendar-day.past,
.calendar-day.disabled {
    color: var(--border-color);
    cursor: not-allowed;
}

.calendar-day.unavailable {
    color: #bbb;
    cursor: not-allowed;
    background: repeating-linear-gradient(
        135deg,
        transparent,
        transparent 4px,
        rgba(0,0,0,0.18) 4px,
        rgba(0,0,0,0.18) 6px
    );
}

.calendar-day.empty {
    cursor: default;
}

/* ==================== HORARIOS ==================== */
.time-slots-container {
    margin-top: 32px;
}

.time-slots-container h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 16px 0;
}

.selected-date-display {
    background: var(--bg-light);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.time-slot {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.time-slot:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.time-slot.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.no-slots {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Resumen compacto fecha + hora tras selección */
.slots-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.slots-header h3 {
    margin: 0;
}

.btn-change-date {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
}

.btn-continuar-inline {
    display: block;
    width: 100%;
}


    gap: 10px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.summary-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.summary-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: capitalize;
}

.summary-change {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}

.summary-change:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .time-slots-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

    .time-slots-grid::-webkit-scrollbar {
        display: none;
    }

    .time-slot {
        flex: 0 0 auto;
        min-width: 80px;
        text-align: center;
    }
}

/* ==================== AUTH TABS ==================== */
.auth-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-light);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: -2px;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-content {
    display: none;
}

.auth-content.active {
    display: block;
}

/* ==================== FORMULARIOS ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.user-info-display {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.user-info-display p {
    margin: 8px 0;
    color: var(--text-dark);
}

/* ==================== BOTONES ==================== */
.btn-primary,
.btn-next-step,
.btn-confirm-booking,
.btn-continuar-inline {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover,
.btn-next-step:hover,
.btn-confirm-booking:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 95, 93, 0.3);
}

.btn-primary:disabled,
.btn-next-step:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    transform: none;
}

.booking-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.btn-back-step {
    flex: 1;
    padding: 14px 24px;
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back-step:hover {
    border-color: var(--text-dark);
}

/* ==================== RESUMEN ==================== */
.booking-summary {
    background: var(--bg-light);
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.total {
    font-size: 20px;
    padding-top: 20px;
    margin-top: 12px;
    border-top: 2px solid var(--border-color);
}

.summary-item span {
    color: var(--text-light);
}

.summary-item strong {
    color: var(--text-dark);
}

/* ==================== ÉXITO ==================== */
.booking-success {
    text-align: center;
    padding: 60px 40px;
}

.success-icon {
    color: var(--success-color);
    margin-bottom: 24px;
}

.booking-success h2 {
    color: var(--success-color);
    margin-bottom: 16px;
}

.booking-success p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 32px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .wellness-services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .booking-modal-content {
        margin: 0;
        max-width: 100%;
        width: 100%;
        min-height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .booking-steps {
        padding: 16px;
        padding-bottom: 32px;
    }
    
    .calendar-days {
        gap: 4px;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .btn-next-step,
    .btn-confirm-booking {
        position: sticky;
        bottom: 16px;
        z-index: 10;
        box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    }

    .booking-actions {
        position: sticky;
        bottom: 16px;
        z-index: 10;
    }

    .booking-actions .btn-next-step,
    .booking-actions .btn-confirm-booking {
        position: static;
        box-shadow: none;
    }

    .booking-actions {
        box-shadow: 0 4px 16px rgba(0,0,0,0.18);
        background: white;
        border-radius: 8px;
        padding: 4px;
    }
}

.booking-mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.booking-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}
.booking-mode-btn:hover { border-color: var(--primary-color, #414536); }
.booking-mode-btn.active {
    border-color: var(--primary-color, #414536);
    background: #f4f5f0;
}
.booking-mode-btn.active .mode-sub {
    color: #555;
}
.mode-icon  { font-size: 22px; }
.mode-label { font-size: 13px; font-weight: 600; color: #333 !important; }
.mode-sub   { font-size: 11px; color: #333 !important; }

.booking-mode-form { display: none; }
.booking-mode-form.active { display: block; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 480px) {
    .booking-mode-selector { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

.guest-note {
    font-size: 12px;
    color: #777;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9f6;
    border-radius: 6px;
}
.req { color: #e53935; }
.form-error {
    color: #e53935;
    font-size: 13px;
    margin-top: 8px;
    padding: 6px 10px;
    background: #fdecea;
    border-radius: 6px;
}
.btn-login-inline {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: var(--primary-color, #414536);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: opacity .2s;
}
.btn-login-inline:hover { opacity: .85; }
.auth-success {
    padding: 14px 16px;
    background: #e8f5e9;
    border-radius: 10px;
    color: #2e7d32;
    font-size: 14px;
}

/* ==================== SERVICE CARD REDESIGN ==================== */
.wellness-service-card {
    background: white;
    border-radius: 14px;
    border: 1px solid #e8e8e4;
    margin-bottom: 0;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.wellness-service-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.service-card-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
}
.service-card-left {
    padding: 24px 24px 24px 24px;
    border-right: 1px solid #f0f0ec;
}
.service-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.category-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.service-rating .stars {
    color: #f59e0b;
    font-size: 13px;
    letter-spacing: 1px;
}
.service-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #2d2d2d;
    margin: 0 0 10px;
    line-height: 1.3;
}
.service-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Right column */
.service-card-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px;
    min-width: 170px;
    gap: 12px;
    background: #fafaf8;
}
.professional-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}
.professional-mini img {
    border-radius: 50%;
    width: 56px !important;
    height: 56px !important;
    object-fit: cover;
}
.professional-mini .professional-name {
    font-size: 13px;
    font-weight: 600;
    color: #414536;
}
.service-meta-right {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 100%;
}
.meta-item-right {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #555;
}
.meta-item-right svg {
    color: #414536;
    flex-shrink: 0;
}
.btn-reserve {
    width: 100%;
    padding: 12px 16px;
    background: #414536;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-reserve::before {
    content: "";
    font-size: 14px;
}
.btn-reserve:hover { background: #2d3024; }

/* Danger button for admin */
.wd-btn-danger {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fca5a5 !important;
}
.wd-btn-danger:hover {
    background: #dc2626 !important;
    color: white !important;
}

@media (max-width: 600px) {
    .service-card-inner { grid-template-columns: 1fr; }
    .service-card-left  { border-right: none; border-bottom: 1px solid #f0f0ec; }
    .service-card-right { min-width: auto; }
}

/* ==================== FICHA PÚBLICA PROFESIONAL ==================== */
.wd-back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: #414536;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.wd-back-link:hover { text-decoration: underline; }

.wd-prof-profile { max-width: 1100px; margin: 0 auto; padding: 32px 20px; }

.wd-prof-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 28px;
    align-items: flex-start;
    background: white;
    border-radius: 16px;
    padding: 32px;
    border: 1px solid #e8e8e4;
    margin-bottom: 24px;
}
.wd-prof-avatar {
    width: 120px; height: 120px;
    border-radius: 50%; object-fit: cover;
    border: 3px solid #f0f0ec;
}
.wd-prof-header-info h1 { font-family: 'Playfair Display',Georgia,serif; font-size: 28px; margin: 0 0 8px; color: #2d2d2d; }
.wd-prof-rating { color: #414536; font-size: 14px; margin: 4px 0; }
.wd-stars { color: #f59e0b; letter-spacing: 2px; font-size: 16px; }
.wd-prof-idiomas { color: #414536; font-size: 14px; margin: 4px 0; }
.wd-prof-bio { font-size: 14px; line-height: 1.7; color: #555; margin-top: 12px; max-height: 160px; overflow: hidden; }

.wd-fav-btn {
    background: white; border: 1.5px solid #414536; color: #414536;
    padding: 10px 18px; border-radius: 30px; cursor: pointer;
    font-size: 14px; font-weight: 600; white-space: nowrap;
    transition: all .2s; align-self: flex-start;
}
.wd-fav-btn:hover, .wd-fav-btn.active { background: #414536; color: white; }

/* Tabs */
.wd-prof-tabs {
    display: flex; gap: 0; border-bottom: 2px solid #e8e8e4;
    margin-bottom: 28px;
}
.wd-tab {
    padding: 14px 28px; background: none; border: none;
    border-bottom: 3px solid transparent; margin-bottom: -2px;
    font-size: 15px; font-weight: 600; color: #888; cursor: pointer;
    transition: all .2s;
}
.wd-tab:hover { color: #414536; }
.wd-tab.active { color: #414536; border-bottom-color: #414536; }

.wd-tab-content { display: none; }
.wd-tab-content.active { display: block; }

/* Tarjetas de servicio en ficha profesional */
.wd-prof-services-grid { display: flex; flex-direction: column; gap: 12px; }

.wd-prof-service-card {
    display: grid; grid-template-columns: 160px 1fr;
    background: white; border-radius: 12px; border: 1px solid #e8e8e4;
    overflow: hidden; transition: box-shadow .2s;
}
.wd-prof-service-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); }

.wd-psc-left {
    background: #fafaf8; padding: 20px 16px;
    display: flex; flex-direction: column; gap: 10px;
    border-right: 1px solid #f0f0ec; align-items: flex-start;
}
.wd-psc-meta { display: flex; flex-direction: column; gap: 6px; }
.wd-psc-time, .wd-psc-price {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: #555;
}
.wd-psc-reserve {
    margin-top: auto; width: 100%; padding: 10px 8px;
    background: #414536; color: white; border: none; border-radius: 8px;
    font-size: 13px; font-weight: 700; cursor: pointer;
}
.wd-psc-reserve:hover { background: #2d3024; }

.wd-psc-right { padding: 20px 24px; }
.wd-psc-title { font-family: 'Playfair Display',Georgia,serif; font-size: 18px; font-weight: 700; margin: 0 0 8px; color: #2d2d2d; }
.wd-psc-desc { font-size: 14px; color: #666; line-height: 1.6; margin: 0; }

/* Reseñas */
.wd-reviews-list { display: flex; flex-direction: column; gap: 16px; }
.wd-review-card { background: white; border-radius: 12px; border: 1px solid #e8e8e4; padding: 20px 24px; }
.wd-review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.wd-review-stars { color: #f59e0b; letter-spacing: 2px; }
.wd-review-date { color: #aaa; font-size: 12px; margin-left: auto; }
.wd-review-comment { font-size: 14px; color: #555; line-height: 1.6; margin: 0; }


/* ==================== ÁREA CLIENTE ==================== */
.wd-client-area {
    display: grid; grid-template-columns: 240px 1fr;
    min-height: 100vh; background: #f5f5f0;
}

.wd-client-nav {
    background: white; border-right: 1px solid #e8e8e4;
    padding: 24px 0; display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}
.wd-client-nav-logo {
    font-family: 'Playfair Display',Georgia,serif;
    font-size: 18px; font-weight: 700; letter-spacing: 3px;
    color: #414536; padding: 0 24px 24px; border-bottom: 1px solid #f0f0ec;
    margin-bottom: 12px;
}
.wd-client-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 24px; color: #555; text-decoration: none;
    font-size: 14px; font-weight: 500; transition: all .15s;
    border-left: 3px solid transparent;
}
.wd-client-nav-item:hover { background: #f5f5f0; color: #414536; }
.wd-client-nav-item.active { background: #f0f2ee; color: #414536; border-left-color: #414536; font-weight: 700; }
.wd-client-nav-item.small { font-size: 12px; color: #aaa; padding: 6px 24px; }
.wd-client-nav-item.logout { margin-top: 8px; color: #888; border-top: 1px solid #f0f0ec; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.wd-client-nav-footer { margin-top: auto; border-top: 1px solid #f0f0ec; padding-top: 8px; }

.wd-client-main { padding: 40px 48px; max-width: 960px; }
.wd-client-title { font-family: 'Playfair Display',Georgia,serif; font-size: 32px; font-weight: 700; color: #2d2d2d; margin: 0 0 28px; }

.wd-client-card { background: white; border-radius: 16px; border: 1px solid #e8e8e4; padding: 32px; margin-bottom: 24px; }
.wd-empty-state { text-align: center; padding: 60px 32px; color: #888; }
.wd-empty-state p { margin-bottom: 20px; }

/* Forms */
.wd-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 4px; }
.wd-fg { display: flex; flex-direction: column; gap: 6px; }
.wd-fg label { font-size: 13px; font-weight: 600; color: #444; }
.wd-fg input, .wd-fg select, .wd-fg textarea {
    padding: 12px 14px; border: 1.5px solid #e0e0d8; border-radius: 8px;
    font-size: 14px; background: #fafaf8; color: #333;
    transition: border-color .2s; width: 100%; box-sizing: border-box;
}
.wd-fg input:focus, .wd-fg select:focus { outline: none; border-color: #414536; background: white; }
.wd-input-readonly { background: #f0f0ec !important; color: #888; cursor: not-allowed; }
.wd-divider { border: none; border-top: 1px solid #f0f0ec; margin: 20px 0; }
.wd-help { color: #414536; cursor: help; }
.wd-form-msg { margin-top: 12px; font-size: 14px; font-weight: 500; }

.wd-btn-primary {
    display: inline-block; padding: 13px 28px;
    background: #414536; color: white; border: none; border-radius: 10px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: background .2s; text-decoration: none;
}
.wd-btn-primary:hover { background: #2d3024; color: white; }

/* Tabla */
.wd-table { width: 100%; border-collapse: collapse; }
.wd-table th { background: #f5f5f0; padding: 12px 16px; font-size: 13px; font-weight: 700; color: #414536; text-align: left; border-bottom: 1px solid #e8e8e4; }
.wd-table td { padding: 12px 16px; font-size: 14px; color: #444; border-bottom: 1px solid #f0f0ec; }
.wd-table tr:last-child td { border-bottom: none; }
.wd-table tr:hover td { background: #fafaf8; }

/* Calendar */
#wd-client-calendar { padding: 20px; }

/* Referrals */
.wd-referral-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 32px; }
.wd-referral-left h2 { font-family: 'Playfair Display',Georgia,serif; font-size: 22px; margin: 0 0 12px; }
.wd-ref-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px; border-radius: 50px; cursor: pointer;
    font-size: 14px; font-weight: 600; text-decoration: none;
    border: none; background: #414536; color: white; margin: 4px;
    transition: background .2s;
}
.wd-ref-btn:hover { background: #2d3024; }
.wd-referral-actions { margin: 20px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wd-referral-stats { display: flex; align-items: center; gap: 16px; margin: 16px 0; }
.wd-ref-stat { background: #f0f0ec; border-radius: 12px; padding: 14px 24px; text-align: center; }
.wd-ref-stat-val { display: block; font-size: 24px; font-weight: 700; color: #414536; }
.wd-ref-stat-lbl { font-size: 12px; color: #888; }
.wd-ref-canjear { padding: 12px 24px; background: #9CA091; color: white; border: none; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; }
.wd-ref-canjear:disabled { opacity: .5; cursor: not-allowed; }
.wd-ref-note { font-size: 12px; color: #aaa; }
.wd-referral-right h3 { font-family: 'Playfair Display',Georgia,serif; font-size: 20px; margin: 0 0 12px; }
.wd-referral-right h4 { font-size: 16px; margin: 20px 0 12px; }
.wd-ref-step { display: flex; gap: 14px; margin-bottom: 16px; align-items: flex-start; }
.wd-ref-step-icon { font-size: 20px; margin-top: 2px; flex-shrink: 0; }
.wd-ref-step strong { display: block; font-size: 14px; margin-bottom: 4px; }
.wd-ref-step small { color: #666; font-size: 13px; line-height: 1.5; }
.wd-referral-table-wrap { margin-top: 24px; border-top: 1px solid #f0f0ec; padding-top: 24px; overflow-x: auto; }

/* Inbox chat */
.wd-inbox { display: grid; grid-template-columns: 300px 1fr; border: 1px solid #e8e8e4; border-radius: 16px; overflow: hidden; min-height: 500px; }
.wd-inbox-list { border-right: 1px solid #e8e8e4; background: white; overflow-y: auto; }
.wd-inbox-item {
    padding: 16px 20px; border-bottom: 1px solid #f0f0ec;
    cursor: pointer; display: flex; align-items: center;
    gap: 12px; transition: background .15s;
}
.wd-inbox-item:hover { background: #f5f5f0; }
.wd-inbox-item.active { background: #f0f2ee; }
.wd-inbox-item-info { flex: 1; }
.wd-inbox-item-info strong { display: block; font-size: 14px; color: #333; }
.wd-inbox-item-info span { display: block; font-size: 12px; color: #888; margin-top: 2px; }
.wd-inbox-item-info small { font-size: 11px; color: #bbb; }
.wd-unread-badge { background: #414536; color: white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.wd-inbox-empty { color: #aaa; font-size: 14px; text-align: center; padding: 40px 20px; }

.wd-inbox-chat { background: #fafaf8; display: flex; flex-direction: column; }
.wd-chat-header { padding: 16px 20px; background: white; border-bottom: 1px solid #e8e8e4; display: flex; align-items: center; justify-content: space-between; }
.wd-chat-status { font-size: 12px; color: #888; }
.wd-chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; max-height: 380px; }
.wd-chat-bubble { max-width: 75%; padding: 10px 14px; border-radius: 12px; }
.wd-chat-bubble.mine { background: #414536; color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.wd-chat-bubble.theirs { background: white; border: 1px solid #e8e8e4; color: #333; align-self: flex-start; border-bottom-left-radius: 4px; }
.wd-chat-bubble p { margin: 0; font-size: 14px; line-height: 1.5; }
.wd-chat-time { font-size: 11px; opacity: .6; margin-top: 4px; display: block; }
.wd-chat-input-row { display: flex; gap: 8px; padding: 16px 20px; background: white; border-top: 1px solid #e8e8e4; }
.wd-chat-input-row input { flex: 1; padding: 10px 14px; border: 1.5px solid #e0e0d8; border-radius: 8px; font-size: 14px; }
.wd-chat-input-row button { padding: 10px 20px; background: #414536; color: white; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; }
.wd-chat-closed { padding: 12px 20px; text-align: center; font-size: 13px; color: #aaa; }


/* ==================== TRAMITAR PEDIDO (mejoras) ==================== */
.tramitar-layout { display: grid; grid-template-columns: 300px 1fr; gap: 40px; }
.tramitar-title { font-family: 'Playfair Display',Georgia,serif; font-size: 28px; margin: 0 0 28px; }
.tramitar-left { position: sticky; top: 20px; }
.tramitar-prof { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; }
.tramitar-prof img { border-radius: 50%; width: 72px !important; height: 72px !important; object-fit: cover; }
.tramitar-prof strong { font-size: 15px; color: #333; }
.tramitar-service-title { font-family: 'Playfair Display',Georgia,serif; font-size: 20px; font-weight: 700; color: #2d2d2d; margin: 0 0 12px; }
.tramitar-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tramitar-badge { background: #f0f2ee; color: #414536; border-radius: 20px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.tramitar-note { font-size: 13px; color: #666; display: flex; gap: 6px; align-items: flex-start; margin-bottom: 12px; }
.tramitar-price-row { display: flex; align-items: center; gap: 8px; font-size: 16px; color: #333; margin-bottom: 12px; }
.tramitar-desc-link { font-size: 13px; color: #414536; font-weight: 600; }
.tramitar-desc-text { font-size: 14px; color: #555; line-height: 1.6; margin-top: 8px; }

.tramitar-section { margin-bottom: 28px; }
.tramitar-section h4 { font-size: 16px; font-weight: 700; color: #2d2d2d; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0ec; }
.tramitar-question { margin-bottom: 16px; }
.tramitar-question label { display: block; font-size: 13px; font-weight: 700; color: #414536; margin-bottom: 6px; }
.tramitar-question textarea { width: 100%; padding: 12px; border: 1.5px solid #e0e0d8; border-radius: 8px; font-size: 14px; resize: vertical; box-sizing: border-box; }

.tramitar-payment-methods { display: flex; gap: 12px; flex-wrap: wrap; }
.tramitar-pm {
    flex: 1; min-width: 100px; padding: 16px 12px;
    border: 2px solid #e0e0d8; border-radius: 12px;
    background: white; cursor: pointer; display: flex; flex-direction: column;
    align-items: center; gap: 8px; font-size: 11px; font-weight: 700;
    letter-spacing: .5px; color: #444; transition: all .2s;
}
.tramitar-pm:hover { border-color: #414536; }
.tramitar-pm.active { border-color: #414536; background: #f0f2ee; }
.klarna-logo { font-size: 20px; font-weight: 900; color: #FFB3C7; background: #FFB3C7; color: #1a1a1a; padding: 2px 6px; border-radius: 4px; }

.tramitar-coupon { }
.tramitar-coupon label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; color: #2d2d2d; }
.tramitar-coupon-row { display: flex; gap: 10px; }
.tramitar-coupon-row input { flex: 1; padding: 12px 14px; border: 1.5px solid #e0e0d8; border-radius: 8px; font-size: 14px; }
.tramitar-coupon-row button { padding: 12px 20px; background: #414536; color: white; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; }
.tramitar-coupon-msg { font-size: 13px; margin-top: 6px; font-weight: 600; }
.tramitar-total-row { display: flex; justify-content: space-between; align-items: center; font-size: 16px; border-top: 1px solid #f0f0ec; padding-top: 16px; margin-top: 16px; }
.tramitar-total-row strong { font-size: 20px; color: #414536; }

@media (max-width: 768px) {
    .wd-client-area { grid-template-columns: 1fr; }
    .wd-client-nav { position: static; height: auto; }
    .wd-client-main { padding: 24px 16px; }
    .wd-form-grid-2 { grid-template-columns: 1fr; }
    .wd-prof-header { grid-template-columns: 1fr; }
    .tramitar-layout { grid-template-columns: 1fr; }
    .wd-referral-grid { grid-template-columns: 1fr; }
    .wd-inbox { grid-template-columns: 1fr; }
    .wd-prof-service-card { grid-template-columns: 1fr; }
}

/* =====================================================
   FICHA PÚBLICA DEL PROFESIONAL
   ===================================================== */
.wd-prof-profile { max-width: 1100px; margin: 0 auto; padding: 20px; font-family: 'Inter', sans-serif; }
.wd-back-link { display: inline-block; margin-bottom: 24px; font-size: 14px; color: #414536; text-decoration: none; }
.wd-back-link:hover { text-decoration: underline; }

.wd-prof-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: start;
    background: white;
    border-radius: 16px;
    border: 1px solid #e8e8e4;
    padding: 32px;
    margin-bottom: 28px;
}
.wd-prof-avatar {
    width: 100px; height: 100px;
    border-radius: 50%; object-fit: cover;
    border: 3px solid #f0f0ec;
}
.wd-prof-header-info h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 28px; font-weight: 700; margin: 0 0 8px; color: #2d2d2d; }
.wd-prof-rating { font-size: 14px; color: #888; margin: 0 0 4px; }
.wd-prof-rating .wd-stars { color: #f59e0b; font-size: 16px; }
.wd-prof-idiomas { font-size: 14px; color: #556; margin: 0 0 12px; }
.wd-prof-bio { font-size: 14px; line-height: 1.7; color: #555; max-height: 120px; overflow: hidden; }
.wd-fav-btn {
    align-self: flex-start;
    border: 1.5px solid #414536; border-radius: 24px;
    padding: 10px 20px; font-size: 14px; font-weight: 600;
    background: white; color: #414536; cursor: pointer; white-space: nowrap;
    transition: all .2s;
}
.wd-fav-btn.active, .wd-fav-btn:hover { background: #414536; color: white; }

/* Tabs */
.wd-prof-tabs { display: flex; border-bottom: 2px solid #e8e8e4; margin-bottom: 28px; gap: 0; }
.wd-tab {
    padding: 14px 24px; font-size: 15px; font-weight: 600; color: #888;
    background: none; border: none; cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}
.wd-tab.active { color: #414536; border-bottom-color: #414536; }
.wd-tab-content { display: none; }
.wd-tab-content.active { display: block; }

/* Servicios en ficha */
.wd-prof-services-grid { display: flex; flex-direction: column; gap: 16px; }
.wd-prof-service-card {
    display: grid; grid-template-columns: 160px 1fr;
    border: 1px solid #e8e8e4; border-radius: 14px;
    overflow: hidden; background: white;
    transition: box-shadow .2s;
}
.wd-prof-service-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); }
.wd-psc-left {
    background: #f9f9f7; padding: 24px 16px;
    display: flex; flex-direction: column; gap: 10px;
    border-right: 1px solid #f0f0ec; align-items: flex-start;
}
.wd-psc-meta { display: flex; flex-direction: column; gap: 8px; }
.wd-psc-time, .wd-psc-price {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: #555;
}
.wd-psc-time svg, .wd-psc-price svg { color: #414536; }
.wd-psc-reserve {
    margin-top: auto; width: 100%;
    padding: 10px 14px; font-size: 13px; font-weight: 700;
    background: #414536; color: white; border: none; border-radius: 10px;
    cursor: pointer; transition: background .2s;
}
.wd-psc-reserve:hover { background: #2d3024; }
.wd-psc-right { padding: 24px; }
.wd-psc-title { font-family: 'Playfair Display', Georgia, serif; font-size: 20px; font-weight: 700; color: #2d2d2d; margin: 0 0 10px; line-height: 1.3; }
.wd-psc-desc { font-size: 14px; color: #666; line-height: 1.7; margin: 0; }

/* Reseñas */
.wd-reviews-list { display: flex; flex-direction: column; gap: 16px; }
.wd-review-card { background: white; border: 1px solid #e8e8e4; border-radius: 12px; padding: 20px; }
.wd-review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.wd-review-stars { color: #f59e0b; font-size: 14px; }
.wd-review-date { font-size: 12px; color: #aaa; margin-left: auto; }
.wd-review-comment { font-size: 14px; color: #555; line-height: 1.6; margin: 0; }


/* =====================================================
   ÁREA CLIENTE
   ===================================================== */
.wd-client-area {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

/* Sidebar */
.wd-client-nav {
    background: white;
    border-right: 1px solid #e8e8e4;
    display: flex; flex-direction: column;
    padding: 24px 0;
    position: sticky; top: 0; height: 100vh;
}
.wd-client-nav-logo {
    font-size: 15px; font-weight: 800; letter-spacing: 2px;
    color: #414536; padding: 0 24px 24px; border-bottom: 1px solid #f0f0ec;
    margin-bottom: 12px;
}
.wd-client-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 24px; font-size: 14px; color: #555;
    text-decoration: none; transition: background .15s, color .15s;
    border-radius: 0;
}
.wd-client-nav-item:hover { background: #f9f9f7; color: #414536; }
.wd-client-nav-item.active { background: #f0f2ee; color: #414536; font-weight: 600; }
.wd-client-nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }
.wd-client-nav-item.small { font-size: 12px; color: #aaa; padding: 6px 24px; }
.wd-client-nav-item.logout { color: #dc2626; margin-top: auto; }
.wd-client-nav-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid #f0f0ec; }

/* Main area */
.wd-client-main { background: #f5f5f0; padding: 40px; min-height: 100vh; }
.wd-client-title { font-family: 'Playfair Display', Georgia, serif; font-size: 32px; font-weight: 700; color: #2d2d2d; margin: 0 0 28px; }
.wd-client-card { background: white; border-radius: 16px; border: 1px solid #e8e8e4; padding: 32px; margin-bottom: 20px; }
.wd-empty-state { text-align: center; padding: 60px 32px; color: #888; }
.wd-empty-state p { margin-bottom: 20px; }

/* Formulario perfil */
.wd-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.wd-fg { display: flex; flex-direction: column; gap: 6px; }
.wd-fg label { font-size: 13px; font-weight: 600; color: #444; }
.wd-fg input, .wd-fg select, .wd-fg textarea {
    padding: 10px 14px; border: 1.5px solid #e0e0dc; border-radius: 10px;
    font-size: 14px; color: #333; background: #fafafa;
    transition: border-color .2s;
}
.wd-fg input:focus, .wd-fg select:focus { outline: none; border-color: #414536; background: white; }
.wd-input-readonly { background: #f0f0ec !important; color: #888; cursor: default; }
.wd-help { color: #414536; cursor: help; }
.wd-divider { border: none; border-top: 1px solid #f0f0ec; margin: 24px 0; }
.wd-btn-primary {
    display: inline-block; padding: 12px 28px;
    background: #414536; color: white; font-size: 14px; font-weight: 700;
    border: none; border-radius: 10px; cursor: pointer;
    transition: background .2s; text-decoration: none;
}
.wd-btn-primary:hover { background: #2d3024; }
.wd-form-msg { font-size: 13px; margin-top: 12px; }

/* Calendario cliente */
#wd-client-calendar { min-height: 500px; padding: 20px; }

/* Tabla compras */
.wd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wd-table th { padding: 14px 16px; text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #888; border-bottom: 2px solid #f0f0ec; }
.wd-table td { padding: 14px 16px; border-bottom: 1px solid #f5f5f2; color: #444; }
.wd-table tbody tr:hover { background: #fafaf8; }

/* Referrals */
.wd-referral-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.wd-referral-left h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 22px; font-weight: 700; margin: 0 0 12px; color: #2d2d2d; }
.wd-referral-left p { font-size: 14px; color: #666; margin-bottom: 20px; }
.wd-referral-actions { display: flex; gap: 12px; margin-bottom: 24px; }
.wd-ref-btn {
    padding: 12px 18px; border-radius: 10px; font-size: 13px; font-weight: 600;
    background: #414536; color: white; border: none; cursor: pointer;
    text-decoration: none; transition: background .2s;
}
.wd-ref-btn:hover { background: #2d3024; }
.wd-referral-stats { display: flex; align-items: center; gap: 16px; }
.wd-ref-stat { background: #f5f5f0; border-radius: 12px; padding: 16px 24px; text-align: center; }
.wd-ref-stat-val { display: block; font-size: 26px; font-weight: 800; color: #414536; }
.wd-ref-stat-lbl { font-size: 12px; color: #888; }
.wd-ref-canjear {
    padding: 14px 24px; border-radius: 12px; font-size: 14px; font-weight: 700;
    background: #9CA091; color: white; border: none; cursor: pointer;
}
.wd-ref-canjear:disabled { opacity: .5; cursor: not-allowed; }
.wd-ref-note { font-size: 12px; color: #aaa; margin-top: 12px; }
.wd-referral-right h3, .wd-referral-right h4 { font-weight: 700; color: #2d2d2d; margin: 0 0 8px; }
.wd-referral-right p { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 16px; }
.wd-ref-step { display: flex; gap: 14px; margin-bottom: 16px; align-items: flex-start; }
.wd-ref-step-icon { font-size: 20px; }
.wd-ref-step strong { display: block; font-size: 14px; margin-bottom: 4px; }
.wd-ref-step small { font-size: 12px; color: #888; line-height: 1.5; }
.wd-referral-table-wrap { margin-top: 24px; border-top: 1px solid #f0f0ec; padding-top: 20px; }

/* Bandeja */
.wd-inbox { display: grid; grid-template-columns: 280px 1fr; border: 1px solid #e8e8e4; border-radius: 16px; overflow: hidden; background: white; min-height: 500px; }
.wd-inbox-list { border-right: 1px solid #e8e8e4; overflow-y: auto; }
.wd-inbox-item { padding: 18px 20px; cursor: pointer; border-bottom: 1px solid #f0f0ec; display: flex; align-items: center; justify-content: space-between; transition: background .15s; }
.wd-inbox-item:hover, .wd-inbox-item.active { background: #f0f2ee; }
.wd-inbox-item-info { display: flex; flex-direction: column; gap: 3px; }
.wd-inbox-item-info strong { font-size: 14px; color: #2d2d2d; }
.wd-inbox-item-info span { font-size: 12px; color: #888; }
.wd-inbox-item-info small { font-size: 11px; color: #bbb; }
.wd-unread-badge { background: #414536; color: white; font-size: 11px; font-weight: 700; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.wd-inbox-chat { display: flex; flex-direction: column; }
.wd-inbox-empty { color: #aaa; text-align: center; padding: 40px; margin: auto; }
.wd-chat-header { padding: 16px 20px; border-bottom: 1px solid #f0f0ec; display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.wd-chat-status { font-size: 12px; font-weight: 400; color: #888; }
.wd-chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; max-height: 380px; }
.wd-chat-bubble { max-width: 70%; }
.wd-chat-bubble.mine { align-self: flex-end; }
.wd-chat-bubble.theirs { align-self: flex-start; }
.wd-chat-bubble p { padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; margin: 0; }
.wd-chat-bubble.mine p { background: #414536; color: white; border-bottom-right-radius: 4px; }
.wd-chat-bubble.theirs p { background: #f0f0ec; color: #333; border-bottom-left-radius: 4px; }
.wd-chat-time { font-size: 11px; color: #bbb; padding: 4px 2px; display: block; }
.wd-chat-bubble.mine .wd-chat-time { text-align: right; }
.wd-chat-input-row { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid #f0f0ec; }
.wd-chat-input-row input { flex: 1; padding: 10px 14px; border: 1.5px solid #e0e0dc; border-radius: 24px; font-size: 14px; }
.wd-chat-input-row button { padding: 10px 20px; background: #414536; color: white; border: none; border-radius: 24px; font-weight: 600; cursor: pointer; font-size: 13px; }
.wd-chat-closed { text-align: center; padding: 14px; font-size: 13px; color: #dc2626; border-top: 1px solid #f0f0ec; }

/* =====================================================
   TRAMITAR PEDIDO (Step 3 modal)
   ===================================================== */
.tramitar-title { font-family: 'Playfair Display', Georgia, serif; font-size: 26px; font-weight: 700; margin: 0 0 24px; color: #2d2d2d; }
.tramitar-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }

/* Columna izquierda */
.tramitar-left { background: #fafaf8; border: 1px solid #e8e8e4; border-radius: 14px; padding: 24px; }
.tramitar-prof { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; text-align: center; }
.tramitar-prof img { border-radius: 50%; width: 72px !important; height: 72px !important; object-fit: cover; border: 2px solid #e8e8e4; }
.tramitar-prof strong { font-size: 14px; color: #414536; }
.tramitar-service-title { font-family: 'Playfair Display', Georgia, serif; font-size: 18px; font-weight: 700; color: #2d2d2d; margin: 0 0 12px; line-height: 1.35; }
.tramitar-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tramitar-badge { background: #f0f2ee; color: #414536; border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 600; }
.tramitar-note { font-size: 12px; color: #888; display: flex; gap: 6px; align-items: flex-start; line-height: 1.5; margin-bottom: 14px; }
.tramitar-price-row { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: #2d2d2d; margin-bottom: 14px; }
.tramitar-price-row svg { color: #414536; }
.tramitar-desc-link { font-size: 13px; color: #414536; font-weight: 600; }
.tramitar-desc-text { margin-top: 8px; font-size: 13px; color: #666; line-height: 1.6; }

/* Columna derecha */
.tramitar-right { display: flex; flex-direction: column; gap: 20px; }
.tramitar-section { background: white; }
.tramitar-section h4 { font-size: 16px; font-weight: 700; color: #2d2d2d; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.tramitar-question { margin-bottom: 16px; }
.tramitar-question label { display: block; font-size: 13px; font-weight: 600; color: #414536; margin-bottom: 6px; }
.tramitar-question textarea { width: 100%; padding: 10px 14px; border: 1.5px solid #e0e0dc; border-radius: 10px; font-size: 14px; resize: vertical; }
.tramitar-question textarea:focus { outline: none; border-color: #414536; }

/* Métodos de pago */
.tramitar-payment-methods { display: flex; gap: 12px; margin-bottom: 4px; }
.tramitar-pm {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 16px 12px; border: 2px solid #e8e8e4; border-radius: 12px;
    background: white; cursor: pointer; font-size: 12px; font-weight: 700;
    color: #555; letter-spacing: .5px; transition: all .2s;
}
.tramitar-pm.active { border-color: #414536; background: #f0f2ee; color: #414536; }
.tramitar-pm:hover { border-color: #9CA091; }
.klarna-logo { font-size: 18px; font-weight: 900; color: #ffb3c7; background: #ffb3c7; color: #000; padding: 2px 6px; border-radius: 4px; font-family: sans-serif; }

/* Cupón */
.tramitar-coupon label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 8px; }
.tramitar-coupon-row { display: flex; gap: 8px; }
.tramitar-coupon-row input { flex: 1; padding: 10px 14px; border: 1.5px solid #e0e0dc; border-radius: 10px; font-size: 14px; }
.tramitar-coupon-row button { padding: 10px 20px; background: #414536; color: white; border: none; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; }
.tramitar-coupon-msg { font-size: 13px; margin-top: 6px; }

/* Total */
.tramitar-total-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-top: 2px solid #f0f0ec; font-size: 16px; }
.tramitar-total-row span { color: #888; font-weight: 600; }
.tramitar-total-row strong { font-size: 20px; font-weight: 800; color: #2d2d2d; }

@media (max-width: 680px) {
    .tramitar-layout { grid-template-columns: 1fr; }
    .wd-client-area { grid-template-columns: 1fr; }
    .wd-client-nav { position: relative; height: auto; }
    .wd-prof-header { grid-template-columns: 1fr; }
    .wd-referral-grid { grid-template-columns: 1fr; }
    .wd-inbox { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .wd-form-grid-2 { grid-template-columns: 1fr; }
    .wd-prof-service-card { grid-template-columns: 1fr; }
}

/* ==================== STRIPE + PAYPAL ==================== */
#wd-stripe-element {
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s;
}
#wd-stripe-element.StripeElement--focus {
    border-color: var(--wd-primary);
    box-shadow: 0 0 0 3px rgba(65,69,54,0.1);
}
#wd-stripe-element.StripeElement--invalid {
    border-color: #dc2626;
}
#wd-stripe-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
}
#wd-paypal-buttons {
    max-width: 400px;
}
.tramitar-payment-methods {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.tramitar-pm {
    flex: 1;
    min-width: 120px;
    padding: 14px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #555;
    transition: all 0.2s;
}
.tramitar-pm:hover {
    border-color: var(--wd-primary);
    background: #f9faf8;
}
.tramitar-pm.active {
    border-color: var(--wd-primary);
    background: #f0f1ec;
    color: var(--wd-primary);
}

/* ── Avatares circulares (global frontend) ───────────────── */
.wd-profile-img,
.wd-prof-avatar,
img.avatar,
.professional-avatar img,
.professional-mini img,
.user-avatar img,
.tramitar-prof img,
.service-card-header .professional-avatar img,
#profilePhotoPreview img {
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block;
}
/* WordPress genera img con width/height attrs - forzamos aspect-ratio cuadrado */
.professional-mini img,
img.avatar {
    width: 56px !important;
    height: 56px !important;
}

/* ==================== VIDEOS PROFESIONAL ==================== */
.wd-videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 8px 0;
}
.wd-video-embed-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.wd-video-embed-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
@media (max-width: 640px) {
    .wd-videos-grid { grid-template-columns: 1fr; }
}
