:root {
    /* Paleta MILA */
    --mila-morado: #571E9C;
    --mila-morado-oscuro: #310177;
    --mila-lavanda: #A36FDC;
    --mila-vibrante: #7A2BDA;
    --mila-transicion: #8E45E8;
    --mila-lavanda-suave: #C8A8F5;
    --mila-superficie: #EEE4FF;
    --mila-texto: #1E0A3A;

    /* Nombres antiguos (se mantienen para que el resto del CSS siga funcionando) */
    --brand-blue: var(--mila-morado);
    --brand-light-blue: var(--mila-lavanda);
    --brand-beige: var(--mila-lavanda);
    --brand-off-white: #F8F5FC;

    /* Colores del tema */
    --primary: var(--mila-morado);
    --primary-dark: var(--mila-morado-oscuro);
    --primary-light: var(--mila-lavanda);

    --secondary: var(--mila-lavanda);
    --secondary-light: var(--mila-lavanda-suave);

    --accent: var(--mila-vibrante);

    --background: #F8F5FC;
    --surface: #FFFFFF;
    --surface-alt: var(--mila-superficie);

    --text-main: var(--mila-morado-oscuro);
    --text-muted: #6E6280;
    --border: #E5DCF2;

    /* Degradados */
    --gradient-hero: linear-gradient(135deg, #F8F5FC 0%, #FFFFFF 100%);
    --gradient-mila: linear-gradient(135deg, #310177 0%, #571E9C 45%, #7A2BDA 75%, #A36FDC 100%);
    --gradient-blue: var(--gradient-mila);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(87,30,156, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(87,30,156, 0.1), 0 2px 4px -1px rgba(87,30,156, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(87,30,156, 0.1), 0 4px 6px -2px rgba(87,30,156, 0.05);
    --shadow-blue: 0 4px 14px 0 rgba(87,30,156, 0.3);
}

/* Logo Styles */
.logo-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    display: inline-flex;
    align-items: center;
    letter-spacing: -0.5px;
}

.logo-text {
    color: #000000;
}

.logo-box {
    background-color: #7A2BDA;
    /* Vibrant Blue */
    color: white;
    padding: 0px 6px;
    border-radius: 6px;
    margin-left: 2px;
    font-style: italic;
    display: inline-block;
    line-height: 1.4;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--surface);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-helper {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.file-upload:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 480px;
    /* Mobile-first approach optimized for app-like feel */
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Header */
.app-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.app-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo .dot {
    color: var(--primary);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 4px;
}

/* Hero */
.hero {
    padding: var(--spacing-lg) 0;
    background: var(--gradient-hero);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
}

.hero h1 {
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    color: var(--text-main);
}

.hero p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.search-bar {
    display: flex;
    gap: var(--spacing-xs);
    background: var(--surface);
    padding: 4px;
    /* Reduced padding */
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    align-items: center;
    /* Center content vertically */
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 0 var(--spacing-sm);
    outline: none;
    font-size: 0.9rem;
    /* Slightly smaller font */
    background: transparent;
    height: 36px;
    /* Explicit height control */
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    /* Reduced padding */
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 0.9rem;
    /* Match input font size */
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 0.9rem;
}

.btn-secondary:active {
    transform: scale(0.96);
}

/* Promo Banner Animation */
@keyframes pulse-banner {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(122,43,218, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(122,43,218, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(122,43,218, 0.3);
    }
}

@keyframes shine {
    0% {
        background-position: -100% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.promo-banner {
    position: relative;
    display: block;
    width: 100%;
    padding: 16px 24px;
    color: white;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    border-radius: 50px;

    /* Clean, Aesthetic Gradient */
    background: var(--gradient-mila);

    /* Soft Glow Shadow */
    box-shadow: 0 8px 20px -5px rgba(87,30,156, 0.3);

    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.promo-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -5px rgba(87,30,156, 0.4);
    background: linear-gradient(135deg, #571E9C 0%, #7A2BDA 60%, #A36FDC 100%);
}

/* Subtle Shine Effect */
.promo-banner .shine-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
    animation: aesthetic-shine 5s infinite;
    pointer-events: none;
}

@keyframes banner-breath {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

@keyframes aesthetic-shine {
    0% {
        left: -100%;
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        left: 200%;
        opacity: 0;
    }
}

.banner-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.banner-discount {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FFD700;
    /* Gold/Yellow */
    margin: 5px 0;
    line-height: 1.2;
}

.banner-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 60%;
}

.banner-btn {
    background: white;
    color: #310177;
    border: none;
    padding: 8px 16px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    z-index: 2;
    /* Ensure clickable above shine */
    position: relative;
}

.btn-primary:active {
    transform: scale(0.96);
}

/* Sections */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.see-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.category-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 0;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-icon {
    width: 100%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    overflow: hidden;
    background: white;
}

.category-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 8px;
    width: 100%;
}

/* Pros Grid */
.pros-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    padding-bottom: var(--spacing-lg);
}

.pro-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 0;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.pro-image {
    width: 100%;
    height: 110px;
    border-radius: 0;
    object-fit: cover;
    background-color: #ddd;
}

.pro-info {
    padding: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pro-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.pro-name {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified-badge {
    color: var(--accent);
    width: 16px;
    height: 16px;
}

.pro-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.85rem;
    color: #F59E0B;
    /* Amber */
    font-weight: 600;
}

.pro-service {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.pro-price {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.btn-book {
    background: #25D366;
    /* WhatsApp Green */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

/* Modal */
/* Modal */
.modal {
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* When closing: wait 0.3s for opacity to fade before hiding visibility */
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.modal.active {
    visibility: visible;
    opacity: 1;
    /* When opening: show visibility immediately */
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.modal-content {
    background: var(--surface);
    width: 90%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 10;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #FFFFFF;
    color: #000000;
    z-index: 2000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    visibility: hidden;
    opacity: 0;
    /* Same logic for sidebar overlay */
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.sidebar-overlay.active {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.chat-option-btn {
    background: white;
    border: 1px solid var(--mila-lavanda);
    color: var(--mila-morado);
    padding: 5px 10px;
    border-radius: 9999px;
    transition: opacity 0.3s ease;
}

.sidebar-header {
    padding: var(--spacing-lg);
    background: #FAFAFA;
    /* Light gray header */
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.avatar-container {
    position: relative;
    width: 60px;
    height: 60px;
    cursor: pointer;
}

.sidebar-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary);
    /* Blue Border */
    object-fit: cover;
    background: #f0f0f0;
}

.avatar-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #FFFFFF;
    /* White Background */
    color: var(--primary);
    /* Blue Icon */
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.avatar-overlay:hover {
    transform: scale(1.1);
}

.sidebar-menu {
    list-style: none;
    padding: var(--spacing-md);
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-menu li a {
    color: #000000;
    /* Black Text */
    text-decoration: none;
    padding: 12px;
    display: block;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-menu li a:hover {
    background: #F3F4F6;
    /* Light gray hover */
    color: var(--primary);
    transform: translateX(5px);
}

/* Apple-Style Membership Page */
.apple-bg {
    background-color: #EBEBEB;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
}

.apple-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin: 30px 0 40px;
    color: #310177;
    letter-spacing: -0.02em;
}

.apple-card {
    border-radius: 20px;
    padding: 25px;
    margin: 0 auto 25px;
    /* Center and add bottom margin */
    max-width: 380px;
    /* Make cards smaller */
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #FFFFFF;
}

.apple-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Standard Plan */
.apple-card-standard {
    background: #FFFFFF;
    border: 1px solid rgba(49,1,119, 0.1);
    box-shadow: 0 10px 30px rgba(49,1,119, 0.03);
}

/* Premium Plan */
.apple-card-premium {
    background: linear-gradient(135deg, #FFFFFF 0%, #EBEBEB 100%);
    border: 1px solid rgba(49,1,119, 0.2);
    box-shadow: 0 15px 35px rgba(49,1,119, 0.1);
}

.apple-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(90deg, #7A2BDA, #A36FDC);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(200,168,245, 0.3);
}

/* Elite Plan - Reverted to Dark */
@keyframes elite-gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes elite-shine {
    0% {
        left: -100%;
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        left: 200%;
        opacity: 0;
    }
}

.apple-card-elite {
    background: linear-gradient(135deg, #310177, #1E0A3A, #310177);
    background-size: 300% 300%;
    animation: elite-gradient 8s ease infinite;
    color: white;
    box-shadow: 0 20px 50px rgba(49,1,119, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.apple-card-elite::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    animation: elite-shine 4s infinite;
    pointer-events: none;
}

.apple-plan-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    /* Center icon */
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.apple-card-standard .apple-plan-icon {
    background: #EBEBEB;
    color: #310177;
}

.apple-card-premium .apple-plan-icon {
    background: white;
    color: #310177;
}

.apple-card-elite .apple-plan-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #C8A8F5;
    backdrop-filter: blur(10px);
}

.apple-plan-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-align: center;
}

.apple-plan-desc {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 20px;
    line-height: 1.4;
    text-align: center;
}

.apple-price {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    text-align: center;
}

.apple-price span {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.6;
}

.apple-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.apple-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.apple-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #310177;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.apple-check svg {
    width: 10px;
    height: 10px;
    stroke: #310177;
    stroke-width: 3;
}

.apple-card-elite .apple-check {
    border-color: #C8A8F5;
    background: transparent;
}

.apple-card-elite .apple-check svg {
    stroke: #C8A8F5;
}

.apple-btn {
    width: 100%;
    padding: 15px;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.apple-btn-standard {
    background: #EBEBEB;
    color: #310177;
}

.apple-btn-premium {
    background: #310177;
    color: white;
    box-shadow: 0 8px 20px rgba(49,1,119, 0.3);
}

.apple-btn-elite {
    background: white;
    color: #310177;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.apple-btn-elite::after {
    display: none;
    /* Remove shine from button */
}

.apple-btn:hover {
    transform: scale(1.02);
}

/* Account Page Styles */
.account-header {
    padding: var(--spacing-lg) var(--spacing-lg) 0;
    background: #FAFAFA;
}

.account-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    /* Increased gap for cleaner look */
    margin-bottom: var(--spacing-lg);
    cursor: pointer;
    padding: 10px 0;
    /* Add vertical padding */
}

.summary-avatar-container {
    position: relative;
    width: 72px;
    height: 72px;
}

.summary-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #F3F4F6;
    border: 2px solid #310177;
    /* Dark Blue Border */
    object-fit: cover;
    padding: 2px;
    /* Space between border and image */
}

.avatar-plus-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: #310177;
    font-weight: bold;
    font-size: 1.2rem;
    border: 1px solid #E5E7EB;
}

.summary-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.summary-info h3 {
    margin: 0;
    font-size: 1.4rem;
    /* Larger Name */
    font-weight: 800;
    color: #000;
    line-height: 1.2;
}

.summary-info p {
    margin: 0;
    color: #6B7280;
    /* Gray text for role */
    font-size: 1rem;
    font-weight: 500;
}

.plan-banner {
    background: #FFF9E6;
    /* Light Goldish background for plan */
    border: 1px solid #FFD700;
    border-radius: 15px;
    padding: 15px;
    margin: 0 var(--spacing-lg) var(--spacing-lg);
    position: relative;
    cursor: pointer;
}

.plan-banner.premium {
    background: #EEE4FF;
    border: 1px solid var(--primary);
}

.plan-banner.elite {
    background: #F5F5F5;
    border: 1px solid #000;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 0 var(--spacing-lg) var(--spacing-lg);
}

.action-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.action-card svg {
    width: 24px;
    height: 24px;
    stroke: #000;
}

.action-card span {
    font-size: 0.8rem;
    font-weight: 500;
}

.menu-section {
    background: white;
    margin-bottom: var(--spacing-md);
    padding: 0 var(--spacing-lg);
}

.menu-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    padding-top: 10px;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

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

.menu-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-item-left svg {
    width: 20px;
    height: 20px;
    stroke: #000;
}

.menu-item-right {
    color: #ccc;
}

/* View Management */
.view-section {
    display: none;
    min-height: 100vh;
    background: #FAFAFA;
}

.view-section.active {
    display: block;
}

/* Tracking Card Styles */

.moving-to-client {
    animation: moveRight 10s linear infinite;
}

@keyframes moveRight {
    0% {
        left: 15%;
    }

    100% {
        left: 85%;
    }
}

.tracking-steps {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.5;
    transition: all 0.3s;
}

.step.active {
    opacity: 1;
    color: var(--primary);
    font-weight: 600;
}

.step-dot {
    width: 10px;
    height: 10px;
    background: currentColor;
    border-radius: 50%;
}

.step-label {
    font-size: 0.75rem;
}

/* Elite Plan Page Styles */
.elite-page {
    background: #FFFFFF;
}

.elite-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.elite-hero {
    padding: 40px 0 30px;
}

.elite-hero-card {
    background: linear-gradient(135deg, #7A2BDA 0%, #C8A8F5 100%);
    border-radius: 30px;
    padding: 40px 20px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(122,43,218, 0.3);
    animation: hero-float 6s ease-in-out infinite;
}

@keyframes hero-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.crown-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
    animation: crown-pulse 3s infinite;
}

@keyframes crown-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.elite-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.elite-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 25px;
    font-weight: 500;
}

.elite-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 30px;
}

.elite-price span {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
}

.elite-cta-btn {
    background: white;
    color: #7A2BDA;
    border: none;
    padding: 16px 32px;
    border-radius: 99px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.elite-cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.elite-cta-btn.large {
    width: 100%;
    max-width: 350px;
    background: linear-gradient(90deg, #7A2BDA, #7A2BDA);
    color: white;
    box-shadow: 0 10px 30px rgba(122,43,218, 0.4);
}

.section-title-center {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 40px 0 30px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 40px;
}

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

.benefit-item {
    background: #F5F7FA;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: transform 0.2s;
}

.benefit-item:hover {
    transform: translateY(-3px);
    background: #F4EFFA;
}

.benefit-icon {
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7A2BDA;
    box-shadow: 0 4px 15px rgba(122,43,218, 0.1);
    flex-shrink: 0;
}

.benefit-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #1d1d1f;
}

.benefit-content p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

.elite-visual {
    padding: 20px 0 50px;
}

.visual-card {
    background: #000;
    border-radius: 30px;
    height: 250px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.visual-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.visual-content h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.visual-abstract {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
}

.c1 {
    width: 200px;
    height: 200px;
    background: #7A2BDA;
    top: -50px;
    left: -50px;
    animation: move1 10s infinite alternate;
}

.c2 {
    width: 300px;
    height: 300px;
    background: #C8A8F5;
    bottom: -100px;
    right: -50px;
    animation: move2 12s infinite alternate;
}

@keyframes move1 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

@keyframes move2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-50px, -50px);
    }
}

.elite-emotional {
    text-align: center;
    padding: 0 20px 60px;
}

.elite-emotional p {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

.elite-footer {
    text-align: center;
    padding-bottom: 60px;
}

/* Redesigned Professional Card Styles */
.pro-image-container {
    position: relative;
    width: 100%;
}

.favorite-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #999;
}

.favorite-btn:hover {
    color: #ff4081;
}

.pro-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.pro-profession {
    color: #666;
    font-size: 0.8rem;
    margin: 0 0 8px 0;
}

.pro-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.pro-price {
    color: #7A2BDA;
    font-weight: 700;
    font-size: 0.9rem;
}

.pro-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #999;
    font-size: 0.8rem;
}

/* Home Header Redesign */
.home-header {
    background: linear-gradient(180deg, #A36FDC 0%, #C8A8F5 100%);
    padding: 20px 20px 30px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    color: white;
    margin-bottom: 20px;
}

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

.location-label {
    font-size: 0.8rem;
    opacity: 0.9;
    display: block;
}

.location-value {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notification-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
}

.search-container {
    margin-bottom: 25px;
}

.search-input-wrapper {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header-search-input {
    border: none;
    outline: none;
    width: 100%;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: #333;
}

.category-circles-grid {
    display: flex;
    justify-content: flex-start;
    /* Start from left for scrolling */
    gap: 20px;
    /* Increased gap to prevent text overlap */
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
    /* More space for scrollbar */
    padding-left: 5px;
    /* Initial padding */
    padding-right: 5px;
}

.cat-circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 80px;
    /* Increased width for longer text */
    flex-shrink: 0;
    cursor: pointer;
}

.cat-circle-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 0;
    /* Remove padding so image fills circle */
    border: 2px solid white;
    /* Optional: adds a clean rim */
}

.cat-circle-label {
    font-size: 0.75rem;
    color: #333;
    text-align: center;
    font-weight: 600;
}

/* Override promo banner margin since header is big */
.promo-banner {
    margin-top: 0;
}

/* Notification Dropdown */
.home-header {
    position: relative;
    /* Ensure absolute positioning works */
}

.notification-dropdown {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 300px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideDownNotif 0.3s ease-out;
}

.notification-dropdown.active {
    display: flex;
}

@keyframes slideDownNotif {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h4 {
    margin: 0;
    color: #333;
    font-size: 1rem;
}

.close-notif {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.notification-body {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.empty-notif {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    height: 30px;
    /* Smaller fixed height */
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Header Location Selector */
.header-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #F0F0F0;
    border: none;
    border-radius: 6px;
    padding: 6px 24px 6px 10px;
    font-size: 0.85rem;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    min-width: 100px;
    transition: background-color 0.2s;
}

.header-select:focus {
    outline: none;
    background-color: #E0E0E0;
}

.header-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-image: none;
}

.location-separator {
    color: #ccc;
    font-size: 1.2rem;
    font-weight: 300;
}

/* ===== TRACKING CARD - Solo visible con servicio activo ===== */
.tracking-card {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 380px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 -4px 30px rgba(87,30,156, 0.18);
    z-index: 500;
    overflow: hidden;
    animation: trackingSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tracking-card.hidden {
    display: none;
}

@keyframes trackingSlideUp {
    from { transform: translate(-50%, 100%); opacity: 0; }
    to   { transform: translate(-50%, 0);    opacity: 1; }
}

.tracking-header {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tracking-icon-bg {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.map-container {
    position: relative;
    height: 150px;
    background: #F4EFFA;
    overflow: hidden;
}

.map-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, #EEE4FF 0%, #F4EFFA 100%);
    background-image: repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(163,111,220,0.15) 30px, rgba(163,111,220,0.15) 31px),
                      repeating-linear-gradient(90deg, transparent, transparent 30px, rgba(163,111,220,0.15) 30px, rgba(163,111,220,0.15) 31px);
}

.map-route {
    position: absolute;
    top: 50%;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--primary);
    opacity: 0.4;
    border-radius: 2px;
}

.map-marker-pro {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    transition: left 2s ease;
}

.map-marker-client {
    position: absolute;
    top: 50%;
    right: 15%;
    transform: translateY(-50%);
    font-size: 1.6rem;
}

.tracking-steps {
    display: flex;
    justify-content: space-around;
    padding: 14px 16px;
    background: white;
    border-top: 1px solid #f0f0f0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.step.active {
    opacity: 1;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
}

.step.active .step-dot {
    background: var(--primary);
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.step.active .step-label {
    color: var(--primary);
}
/* ===== END TRACKING CARD ===== */

/* ===== Chat asistente Mila ===== */
#chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2000;
    font-family: inherit;
}

.chat-toggle-btn {
    position: relative;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: white;
    box-shadow: 0 8px 22px rgba(87, 30, 156, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.chat-toggle-btn:hover { transform: scale(1.06); }

.chat-toggle-btn img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ef4444;
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.chat-window {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 350px;
    max-width: calc(100vw - 32px);
    height: 480px;
    max-height: calc(100vh - 120px);
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(49, 1, 119, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}

.chat-window.hidden { display: none; }

.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--gradient-mila);
    color: white;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.chat-avatar img { width: 34px; height: 34px; object-fit: contain; }

.chat-info { display: flex; flex-direction: column; flex: 1; line-height: 1.2; }
.chat-name { font-weight: 700; font-size: 0.95rem; }
.chat-status { font-size: 0.75rem; opacity: 0.85; }

.chat-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--background);
}

.chat-messages .message {
    max-width: 82%;
    padding: 9px 12px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-messages .message.bot {
    align-self: flex-start;
    background: white;
    color: var(--mila-texto);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-messages .message.user {
    align-self: flex-end;
    background: var(--mila-morado);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 0.68rem;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
}

.chat-option-btn { cursor: pointer; font-size: 0.82rem; }
.chat-option-btn:hover { background: var(--mila-superficie); }

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--border);
    background: white;
}

.chat-input-area input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 9999px;
    padding: 10px 14px;
    font-size: 0.9rem;
    outline: none;
}

.chat-input-area input:focus { border-color: var(--mila-lavanda); }

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--mila-vibrante);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Base tipo app (modo cliente) ===== */

/* Encabezado: mismo tamaño de logo en todas las páginas y sin desbordes en el celular */
.app-header img[src*="mila-logo"] {
    height: 30px !important;
    width: auto;
}

.app-header .container {
    gap: 12px;
}

.app-header .container > div:first-child {
    min-width: 0;
}

.header-location-selector {
    min-width: 0;
    margin-top: 4px;
}

.header-location-selector .header-select {
    min-width: 0;
    max-width: 130px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.app-header nav {
    flex-shrink: 0;
}

html,
body {
    overflow-x: hidden;
}

/* Barra de navegación inferior */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1500;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(49, 1, 119, 0.06);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 0;
    color: #8A7F99;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 12px;
    transition: color 0.2s ease;
}

.bottom-nav-item svg {
    transition: transform 0.2s ease;
}

.bottom-nav-item.active {
    color: var(--mila-morado);
}

.bottom-nav-item.active svg {
    transform: translateY(-1px);
    stroke-width: 2.3;
}

.bottom-nav-item.active::after {
    content: '';
    width: 18px;
    height: 3px;
    border-radius: 3px;
    background: var(--gradient-mila);
    margin-top: 1px;
}

.bottom-nav-item:not(.active)::after {
    content: '';
    height: 3px;
    margin-top: 1px;
}

/* Espacio para que la barra no tape el contenido, y el chat encima de la barra */
body.has-bottom-nav {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

body.has-bottom-nav #chat-widget {
    bottom: calc(84px + env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
    .bottom-nav {
        max-width: 480px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
        bottom: 16px;
        border: 1px solid var(--border);
        border-radius: 22px;
        padding-bottom: 6px;
    }
}

/* Tarjeta de servicio en curso (Mis citas) */
.live-service-card {
    display: block;
    text-decoration: none;
    color: white;
    background: var(--gradient-mila);
    border-radius: 20px;
    padding: 14px 16px;
    margin-bottom: 22px;
    box-shadow: 0 12px 28px rgba(87, 30, 156, 0.3);
}

.live-service-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    opacity: 0.95;
}

.live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #6EF2B0;
    box-shadow: 0 0 0 0 rgba(110, 242, 176, 0.7);
    animation: live-pulse 1.6s infinite;
}

@keyframes live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(110, 242, 176, 0.7); }
    100% { box-shadow: 0 0 0 10px rgba(110, 242, 176, 0); }
}

.live-service-body {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.live-service-body img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.live-service-body div {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.live-service-body strong {
    font-size: 0.98rem;
}

.live-service-body div span {
    font-size: 0.8rem;
    opacity: 0.85;
}

.live-service-cta {
    background: white;
    color: var(--mila-morado);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.history-subtitle {
    font-size: 1rem;
    color: var(--mila-texto);
    margin: 0 0 12px;
}

/* ===== Responsive: tablet, laptop y PC ===== */
.desktop-nav {
    display: none;
}

@media (min-width: 768px) {
    .container {
        max-width: 760px;
        padding: 0 24px;
    }

    .hero {
        padding: 48px 0;
    }

    .hero h1 {
        font-size: 2.6rem;
    }

    .pros-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .pro-image {
        height: 170px;
    }

    .category-circles-grid {
        flex-wrap: wrap;
        overflow: visible;
        gap: 24px;
    }

    .cat-circle-icon {
        width: 72px;
        height: 72px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1160px;
        padding: 0 32px;
    }

    /* La barra de abajo se vuelve menú superior */
    .bottom-nav {
        display: none;
    }

    body.has-bottom-nav {
        padding-bottom: 40px;
    }

    body.has-bottom-nav #chat-widget {
        bottom: 24px;
        right: 24px;
    }

    .app-header {
        padding: 12px 0;
    }

    .app-header .container > div:first-child {
        flex-direction: row !important;
        align-items: center !important;
        gap: 28px;
    }

    .header-location-selector {
        margin-top: 0;
    }

    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-left: auto;
        margin-right: 12px;
    }

    .desktop-nav a {
        padding: 9px 16px;
        border-radius: 999px;
        color: #5B4E6E;
        font-weight: 600;
        font-size: 0.95rem;
        text-decoration: none;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .desktop-nav a:hover {
        background: #F4EFFA;
        color: var(--mila-morado);
    }

    .desktop-nav a.active {
        background: var(--mila-superficie);
        color: var(--mila-morado);
    }

    /* Inicio: portada a dos columnas con la moto de Mila */
    .hero {
        padding: 64px 0;
    }

    .hero .container {
        min-height: 300px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        background: url(../assets/mila-rider.png) no-repeat right center / 360px auto;
        padding-right: 420px;
    }

    .hero h1 {
        font-size: 3.2rem;
    }

    .hero p {
        font-size: 1.15rem;
        max-width: 520px;
    }

    .hero .promo-banner {
        display: inline-block;
        width: auto;
        padding: 16px 40px;
    }

    .pros-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 22px;
    }

    .pro-image {
        height: 210px;
    }

    .category-circles-grid {
        gap: 34px;
    }

    .cat-circle-icon {
        width: 84px;
        height: 84px;
    }

    .cat-circle-item {
        width: 96px;
    }

    .cat-circle-label {
        font-size: 0.85rem;
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }

    .pros-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ===== Medios de pago ===== */
.pagos-wrap {
    max-width: 640px;
    margin: 0 auto;
}

.pago-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
}

.pago-item.pred {
    border-color: var(--mila-lavanda);
    box-shadow: 0 0 0 3px rgba(163, 111, 220, 0.15);
}

.pago-icono {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--mila-superficie);
    color: var(--mila-morado);
}

.pago-nequi { background: #FCE7F3; color: #9D174D; }
.pago-daviplata { background: #FEE2E2; color: #B91C1C; }
.pago-pse { background: #E0F2FE; color: #075985; }

.pago-texto {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pago-texto strong {
    color: var(--text-main);
    font-size: 0.98rem;
}

.pago-texto span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.pago-badge {
    font-style: normal;
    align-self: flex-start;
    margin-top: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--mila-morado);
    background: var(--mila-superficie);
    padding: 3px 8px;
    border-radius: 999px;
}

.pago-link {
    align-self: flex-start;
    background: none;
    border: none;
    padding: 4px 0 0;
    color: var(--mila-vibrante);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.pago-acciones {
    display: flex;
    gap: 6px;
}

.pago-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--mila-morado);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pago-btn:hover {
    background: var(--mila-superficie);
}

.pago-btn.borrar {
    color: #C2410C;
}

.pago-vacio {
    text-align: center;
    padding: 28px 16px;
    border: 1.5px dashed var(--border);
    border-radius: 16px;
    color: var(--text-muted);
}

.pago-vacio strong {
    display: block;
    color: var(--text-main);
    margin: 6px 0 4px;
}

.pago-seguro {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 14px;
}

.pago-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(30, 10, 58, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.pago-modal.hidden {
    display: none;
}

.pago-sheet {
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: 24px 24px 0 0;
    padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (min-width: 768px) {
    .pago-modal {
        align-items: center;
    }

    .pago-sheet {
        border-radius: 24px;
    }
}

.pago-sheet h2 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.pago-sheet .form-input,
.pago-sheet .form-select {
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    background: var(--surface);
    color: var(--text-main);
    font-size: 1rem;
}

.pago-fila {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pago-marca {
    font-weight: 700;
    color: var(--mila-vibrante);
    margin-left: 6px;
}

.pago-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 4px 0;
}

.pago-error {
    color: #C2410C;
    font-size: 0.85rem;
    min-height: 1.2em;
}

.pago-botones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.pago-toast {
    position: fixed;
    left: 50%;
    bottom: calc(96px + env(safe-area-inset-bottom));
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    background: var(--mila-texto);
    color: white;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    z-index: 3100;
}

.pago-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ===== Ubicación automática: solo texto, pequeño y sutil ===== */
.location-chip {
    display: block;
    max-width: 240px;
    margin-top: 2px;
    padding: 0;
    border: none;
    background: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.location-chip-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-chip:hover .location-chip-text {
    color: var(--text-main);
}

.location-chip.cargando .location-chip-text {
    opacity: 0.6;
}

.location-chip.error {
    color: var(--text-muted);
    font-style: italic;
}

@media (min-width: 1024px) {
    .location-chip {
        margin-top: 0;
        max-width: 340px;
        font-size: 0.78rem;
    }
}

/* ===== Términos y condiciones ===== */
.legal-page {
    background: var(--background);
}

.legal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.legal-back {
    color: var(--text-main);
    display: flex;
}

.legal-logo {
    height: 30px;
}

.legal-switch {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mila-vibrante);
    text-decoration: none;
}

.legal {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 18px 60px;
    color: var(--text-main);
    line-height: 1.65;
}

.legal h1 {
    font-size: 1.7rem;
    line-height: 1.2;
    margin-bottom: 6px;
}

.legal-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.legal-indice {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 4px 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 26px;
}

.legal-indice a,
.legal a {
    color: var(--mila-vibrante);
    text-decoration: none;
    font-size: 0.92rem;
}

.legal section {
    margin-bottom: 24px;
    scroll-margin-top: 70px;
}

.legal h2 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.legal p,
.legal li {
    font-size: 0.95rem;
    color: var(--text-main);
}

.legal ul {
    padding-left: 20px;
    display: grid;
    gap: 6px;
}

.legal mark {
    background: #FEF3C7;
    color: #78350F;
    padding: 0 4px;
    border-radius: 4px;
}

.legal-fin {
    text-align: center;
    margin-top: 30px;
}

.terminos-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.45;
    margin: 6px 0 12px;
    text-align: left;
}

.terminos-check input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--mila-morado);
    flex-shrink: 0;
}

.terminos-check a {
    color: var(--mila-vibrante);
    font-weight: 600;
}

/* ===== Selector de tema ===== */
.tema-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 4px;
    border-radius: 14px;
    background: var(--surface-alt);
}

.tema-selector button {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 9px 6px;
    border-radius: 10px;
    cursor: pointer;
}

.tema-selector button.activo {
    background: var(--surface);
    color: var(--mila-morado);
    box-shadow: 0 1px 4px rgba(30, 10, 58, 0.12);
}

.tema-rapido {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    display: flex;
}

/* ===== Modo oscuro ===== */
:root[data-theme="oscuro"] {
    --mila-superficie: #2E1D4D;
    --mila-lavanda-suave: #5B3E8A;
    --mila-texto: #F3ECFC;
    --background: #120920;
    --surface: #1C1030;
    --surface-alt: #271840;
    --text-main: #F3ECFC;
    --text-muted: #B4A6C9;
    --border: #3A2A55;
    --brand-off-white: #120920;
    --gradient-hero: linear-gradient(135deg, #1A0E2E 0%, #120920 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.5);
    /* En oscuro los morados de texto se aclaran; los fondos morados se fijan abajo */
    --primary: #C4A1F5;
    --primary-dark: #E2D2FB;
    --mila-morado: #C4A1F5;
    --mila-vibrante: #B98AF0;
    --accent: #B98AF0;
}

:root[data-theme="oscuro"] body {
    background: var(--background);
    color: var(--text-main);
}

/* En modo oscuro se usa assets/mila-logo-oscuro.png (lo cambia js/tema.js) */

/* Superficies blancas escritas directamente en las páginas */
:root[data-theme="oscuro"] [style*="background: white"],
:root[data-theme="oscuro"] [style*="background:white"],
:root[data-theme="oscuro"] [style*="background: #fff"],
:root[data-theme="oscuro"] [style*="background: #FFF"],
:root[data-theme="oscuro"] [style*="background-color: white"],
:root[data-theme="oscuro"] [style*="background: #f9fafb"],
:root[data-theme="oscuro"] [style*="background: #F9FAFB"],
:root[data-theme="oscuro"] [style*="background: #f8fafc"],
:root[data-theme="oscuro"] [style*="background: #F8FAFC"],
:root[data-theme="oscuro"] [style*="background: #fafafa"],
:root[data-theme="oscuro"] [style*="background: #FAFAFA"] {
    background: var(--surface) !important;
}

:root[data-theme="oscuro"] [style*="background: #f0f0f0"],
:root[data-theme="oscuro"] [style*="background: #F3F4F6"],
:root[data-theme="oscuro"] [style*="background: #f3f4f6"],
:root[data-theme="oscuro"] [style*="background: #F5F5F5"],
:root[data-theme="oscuro"] [style*="background: #f1f5f9"],
:root[data-theme="oscuro"] [style*="background: #EEE4FF"],
:root[data-theme="oscuro"] [style*="background: #F7F2FF"] {
    background: var(--surface-alt) !important;
}

/* Textos oscuros escritos directamente en las páginas */
:root[data-theme="oscuro"] [style*="color: #333"],
:root[data-theme="oscuro"] [style*="color: #000"],
:root[data-theme="oscuro"] [style*="color:#000"],
:root[data-theme="oscuro"] [style*="color: #1E0A3A"],
:root[data-theme="oscuro"] [style*="color: #1e293b"],
:root[data-theme="oscuro"] [style*="color: #1F2937"],
:root[data-theme="oscuro"] [style*="color: #111827"],
:root[data-theme="oscuro"] [style*="color: #3A2A55"],
:root[data-theme="oscuro"] [style*="color: #310177"],
:root[data-theme="oscuro"] [style*="color: #1d1d1f"] {
    color: var(--text-main) !important;
}

:root[data-theme="oscuro"] [style*="color: #666"],
:root[data-theme="oscuro"] [style*="color: #555"],
:root[data-theme="oscuro"] [style*="color: #6B7280"],
:root[data-theme="oscuro"] [style*="color: #64748b"],
:root[data-theme="oscuro"] [style*="color: #999"] {
    color: var(--text-muted) !important;
}

:root[data-theme="oscuro"] [style*="border: 1px solid #eee"],
:root[data-theme="oscuro"] [style*="border-bottom: 1px solid #eee"],
:root[data-theme="oscuro"] [style*="border: 1px solid #ddd"],
:root[data-theme="oscuro"] [style*="border-top: 1px solid #eee"] {
    border-color: var(--border) !important;
}

/* Piezas comunes */
:root[data-theme="oscuro"] .app-header,
:root[data-theme="oscuro"] .bottom-nav {
    background: rgba(28, 16, 48, 0.92);
    border-color: var(--border);
}

:root[data-theme="oscuro"] .bottom-nav-item {
    color: #9C8DB5;
}

:root[data-theme="oscuro"] .bottom-nav-item.active,
:root[data-theme="oscuro"] .desktop-nav a.active,
:root[data-theme="oscuro"] .desktop-nav a:hover {
    color: #D7C0F7;
}

:root[data-theme="oscuro"] .desktop-nav a {
    color: #C9BADF;
}

:root[data-theme="oscuro"] .app-header .btn-icon,
:root[data-theme="oscuro"] .app-header [style*="color: #000"] {
    color: var(--text-main) !important;
}

:root[data-theme="oscuro"] .sidebar,
:root[data-theme="oscuro"] .sidebar-header,
:root[data-theme="oscuro"] .modal-content,
:root[data-theme="oscuro"] .login-card,
:root[data-theme="oscuro"] .category-card,
:root[data-theme="oscuro"] .cat-circle-icon,
:root[data-theme="oscuro"] .account-header,
:root[data-theme="oscuro"] .menu-item,
:root[data-theme="oscuro"] .settings-item,
:root[data-theme="oscuro"] .pro-card {
    background: var(--surface);
    color: var(--text-main);
    border-color: var(--border);
}

:root[data-theme="oscuro"] .sidebar-menu li a {
    color: var(--text-main);
}

:root[data-theme="oscuro"] .sidebar-menu li a:hover {
    background: var(--surface-alt);
}

:root[data-theme="oscuro"] .cat-circle-label,
:root[data-theme="oscuro"] .category-name,
:root[data-theme="oscuro"] .pro-name,
:root[data-theme="oscuro"] h1,
:root[data-theme="oscuro"] h2,
:root[data-theme="oscuro"] h3,
:root[data-theme="oscuro"] h4 {
    color: var(--text-main);
}

:root[data-theme="oscuro"] .form-input,
:root[data-theme="oscuro"] .form-select,
:root[data-theme="oscuro"] .form-textarea,
:root[data-theme="oscuro"] input[type="text"],
:root[data-theme="oscuro"] input[type="tel"],
:root[data-theme="oscuro"] input[type="email"],
:root[data-theme="oscuro"] input[type="number"],
:root[data-theme="oscuro"] input[type="search"],
:root[data-theme="oscuro"] select,
:root[data-theme="oscuro"] textarea {
    background: var(--surface-alt);
    color: var(--text-main);
    border-color: var(--border);
}

:root[data-theme="oscuro"] ::placeholder {
    color: #8C7DA6;
}

:root[data-theme="oscuro"] .btn-secondary {
    background: transparent;
    color: #D7C0F7;
    border-color: #6D4BA3;
}

:root[data-theme="oscuro"] .chat-messages .message.bot,
:root[data-theme="oscuro"] .chat-input-area,
:root[data-theme="oscuro"] .chat-option-btn,
:root[data-theme="oscuro"] .chat-toggle-btn {
    background: var(--surface-alt);
    color: var(--text-main);
    border-color: var(--border);
}

:root[data-theme="oscuro"] .pago-toast,
:root[data-theme="oscuro"] .toast {
    background: #EDE4FB;
    color: #1E0A3A;
}

:root[data-theme="oscuro"] .pago-nequi { background: #4A1D35; color: #F9A8D4; }
:root[data-theme="oscuro"] .pago-daviplata { background: #4A1D1D; color: #FCA5A5; }
:root[data-theme="oscuro"] .pago-pse { background: #0C3348; color: #7DD3FC; }

:root[data-theme="oscuro"] .legal mark {
    background: #5C4410;
    color: #FDE68A;
}

/* Mapa oscuro */
:root[data-theme="oscuro"] #map .leaflet-tile-pane {
    filter: invert(1) hue-rotate(190deg) brightness(0.85) saturate(0.35) contrast(0.9);
}

:root[data-theme="oscuro"] .sheet,
:root[data-theme="oscuro"] .fab,
:root[data-theme="oscuro"] .order-chip,
:root[data-theme="oscuro"] .help-pill,
:root[data-theme="oscuro"] .home-label {
    background: var(--surface);
    color: var(--text-main);
}

:root[data-theme="oscuro"] .pro-row {
    background: var(--surface-alt);
    border-color: var(--border);
}

:root[data-theme="oscuro"] .leaflet-control-attribution {
    background: rgba(28, 16, 48, 0.7) !important;
    color: #B4A6C9;
}

/* Fondos morados con letra blanca se mantienen intensos en modo oscuro */
:root[data-theme="oscuro"] .btn-primary,
:root[data-theme="oscuro"] .chat-messages .message.user,
:root[data-theme="oscuro"] .chat-send-btn,
:root[data-theme="oscuro"] .round-btn.call,
:root[data-theme="oscuro"] .step.active .step-dot,
:root[data-theme="oscuro"] [style*="background: var(--primary)"],
:root[data-theme="oscuro"] [style*="background: var(--mila-morado)"],
:root[data-theme="oscuro"] [style*="background-color: var(--primary)"] {
    background: #7A2BDA !important;
    color: #FFFFFF !important;
}

:root[data-theme="oscuro"] .tema-selector button.activo {
    background: #7A2BDA;
    color: #FFFFFF;
}

/* Textos morados escritos directamente en las páginas */
:root[data-theme="oscuro"] [style*="color: #571E9C"],
:root[data-theme="oscuro"] [style*="color: #7A2BDA"],
:root[data-theme="oscuro"] [style*="color:#7A2BDA"],
:root[data-theme="oscuro"] [style*="color: #310177"],
:root[data-theme="oscuro"] [style*="color: #1E3A8A"] {
    color: #C4A1F5 !important;
}

:root[data-theme="oscuro"] [style*="background: #e6f4ea"],
:root[data-theme="oscuro"] [style*="background: #E6F4EA"] {
    background: #123A26 !important;
    color: #86EFAC !important;
}

:root[data-theme="oscuro"] [style*="background: #fce8e6"] {
    background: #45161A !important;
    color: #FCA5A5 !important;
}

/* Perfil, planes y suscripción */
:root[data-theme="oscuro"] .view-section,
:root[data-theme="oscuro"] .menu-section,
:root[data-theme="oscuro"] .apple-bg,
:root[data-theme="oscuro"] .elite-bg {
    background: var(--background);
    color: var(--text-main);
}

:root[data-theme="oscuro"] .menu-section,
:root[data-theme="oscuro"] .apple-card,
:root[data-theme="oscuro"] .apple-card-standard,
:root[data-theme="oscuro"] .benefit-item,
:root[data-theme="oscuro"] .plan-banner {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text-main);
}

:root[data-theme="oscuro"] .plan-banner *,
:root[data-theme="oscuro"] .apple-card *,
:root[data-theme="oscuro"] .benefit-item h3,
:root[data-theme="oscuro"] .benefit-item p {
    color: var(--text-main);
}

:root[data-theme="oscuro"] .apple-plan-desc,
:root[data-theme="oscuro"] .benefit-item p {
    color: var(--text-muted) !important;
}

:root[data-theme="oscuro"] .apple-plan-icon,
:root[data-theme="oscuro"] .benefit-icon {
    background: var(--surface-alt) !important;
    color: #C4A1F5 !important;
}

:root[data-theme="oscuro"] .apple-btn-standard {
    background: var(--surface-alt) !important;
    color: var(--text-main) !important;
}

:root[data-theme="oscuro"] .apple-card-premium {
    background: linear-gradient(135deg, #2A1B45 0%, #1C1030 100%) !important;
}

:root[data-theme="oscuro"] .app-header[style] {
    background: rgba(28, 16, 48, 0.92) !important;
}

:root[data-theme="oscuro"] #map {
    background: #120920;
}

:root[data-theme="oscuro"] .status-pill,
:root[data-theme="oscuro"] .pago-badge {
    background: #3A2468;
    color: #E2D2FB;
}

:root[data-theme="oscuro"] .code-box strong,
:root[data-theme="oscuro"] .order-chip b {
    color: #C4A1F5;
}

:root[data-theme="oscuro"] .pro-price,
:root[data-theme="oscuro"] .elite-emotional p,
:root[data-theme="oscuro"] .elite-emotional {
    color: #D7C0F7 !important;
}

:root[data-theme="oscuro"] .live-service-cta {
    color: #571E9C;
}

:root[data-theme="oscuro"] [style*="background: #FBF8FF"],
:root[data-theme="oscuro"] [style*="background: #fbf8ff"] {
    background: var(--surface-alt) !important;
    color: var(--text-main) !important;
    border-color: var(--border) !important;
}

:root[data-theme="oscuro"] [style*="background: #FEF2F2"],
:root[data-theme="oscuro"] [style*="background: #fef2f2"],
:root[data-theme="oscuro"] [style*="background: #FEE2E2"],
:root[data-theme="oscuro"] [style*="background-color: #FEF2F2"] {
    background: #3B1219 !important;
    border-color: #7F1D1D !important;
}

:root[data-theme="oscuro"] [style*="background: #FFFBEB"],
:root[data-theme="oscuro"] [style*="background: #fffbeb"],
:root[data-theme="oscuro"] [style*="background: #FEF3C7"],
:root[data-theme="oscuro"] [style*="background-color: #FFFBEB"] {
    background: #3A2A0B !important;
    border-color: #78350F !important;
}

:root[data-theme="oscuro"] [style*="background: #FEF2F2"] *,
:root[data-theme="oscuro"] [style*="background: #fef2f2"] *,
:root[data-theme="oscuro"] [style*="background: #FFFBEB"] *,
:root[data-theme="oscuro"] [style*="background: #fffbeb"] *,
:root[data-theme="oscuro"] [style*="background: #FEF3C7"] * {
    color: #FDE2E2 !important;
}

:root[data-theme="oscuro"] .apple-badge {
    color: #1E0A3A;
}

:root[data-theme="oscuro"] .step-bar {
    background: #3A2A55;
}

:root[data-theme="oscuro"] .feed-card,
:root[data-theme="oscuro"] .stat-card,
:root[data-theme="oscuro"] .appointment-card,
:root[data-theme="oscuro"] .service-card,
:root[data-theme="oscuro"] .review-card {
    background: var(--surface);
    color: var(--text-main);
    border-color: var(--border);
}

/* ===== Verificación de rostro ===== */
.rostro-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: #120920;
    color: #F3ECFC;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.rostro-paso {
    width: 100%;
    max-width: 420px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.rostro-paso.hidden {
    display: none;
}

.rostro-paso h2 {
    color: #F3ECFC;
    font-size: 1.4rem;
}

.rostro-paso p {
    color: #CFC2E3;
    font-size: 0.95rem;
    line-height: 1.45;
}

.rostro-emoji {
    font-size: 3rem;
}

.rostro-tips {
    list-style: none;
    padding: 12px 14px;
    border-radius: 14px;
    background: #1C1030;
    text-align: left;
    font-size: 0.88rem;
    color: #E2D2FB;
    display: grid;
    gap: 6px;
}

.rostro-tips li::before {
    content: '✓ ';
    color: #86EFAC;
    font-weight: 700;
}

.rostro-modal .terminos-check {
    color: #E2D2FB;
}

.rostro-modal .btn-primary {
    padding: 14px;
    font-size: 1rem;
    background: #7A2BDA;
}

.rostro-modal .link-btn {
    color: #C4A1F5;
}

.rostro-error {
    color: #FDBA74 !important;
    font-size: 0.88rem !important;
    min-height: 1.2em;
}

.rostro-visor {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
}

.rostro-visor video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.rostro-ovalo {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 62%;
    height: 78%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 2000px rgba(18, 9, 32, 0.55);
    transition: border-color 0.2s ease;
}

.rostro-visor[data-ok="si"] .rostro-ovalo {
    border-color: #6EF2B0;
}

.rostro-visor[data-ok="no"] .rostro-ovalo {
    border-color: #FDBA74;
}

.rostro-cargando {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 9, 32, 0.7);
    font-weight: 600;
}

.rostro-cargando.hidden {
    display: none;
}

.rostro-instruccion {
    font-size: 1.15rem;
    font-weight: 700;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.rostro-progreso {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.rostro-progreso span {
    width: 34px;
    height: 6px;
    border-radius: 6px;
    background: #3A2A55;
    transition: background 0.2s ease;
}

.rostro-progreso span.ok {
    background: #6EF2B0;
}

.rostro-foto {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 6px;
    border: 4px solid #6EF2B0;
}

/* Recuadro de selfie en los formularios de registro */
.selfie-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1.5px dashed var(--border);
    border-radius: 16px;
    margin-bottom: 8px;
}

.selfie-box img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-alt);
}

.selfie-box.ok {
    border-style: solid;
    border-color: #22C55E;
}

.selfie-estado {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: left;
}

.selfie-box.ok .selfie-estado {
    color: #15803D;
    font-weight: 600;
}

:root[data-theme="oscuro"] .selfie-box.ok .selfie-estado {
    color: #86EFAC;
}

.turnstile-box {
    display: flex;
    justify-content: center;
    margin: 8px 0;
}

.hp-campo {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
