/* ==========================================================================
   SISTEMA DE DISEÑO DE BARRIO 🎨
   ========================================================================== */

   :root {
    /* Paleta Oficial de Colores */
    --color-barrio-primary: #1D9E75;     /* Verde Barrio principal */
    --color-barrio-secondary: #EF9F27;   /* Ámbar Oferta */
    --color-barrio-dark: #0D5C42;        /* Verde Oscuro énfasis */
    --color-barrio-light: #E1F5EE;       /* Verde Claro fondo suave */
    --color-text-primary: #2C2C2A;       /* Carbón */
    --color-text-secondary: #5A5A57;     /* Gris texto secundario */
    --color-text-tertiary: #9B9B97;      /* Gris texto atenuado */
    --color-bg-page: #F7F9F7;            /* Gris Suave fondo de página */
    --color-bg-card: #FFFFFF;
    --color-border: #E5E9E5;
    
    /* Variables de Estilo */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 16px rgba(29, 158, 117, 0.08);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.1);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET Y MAQUETACIÓN BASE
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text-primary);
    background-color: #121A16; /* Fondo oscuro premium para resaltar el mockup en pantallas grandes */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Contenedor App (Mockup de Celular centrado en pantallas grandes) */
.app-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    max-height: 920px;
    background-color: var(--color-bg-page);
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* En pantallas de escritorio, añadir marcos simulando celular */
@media (min-width: 500px) {
    .app-container {
        border-radius: var(--border-radius-xl);
        border: 8px solid #28332E;
        box-shadow: var(--shadow-lg), 0 0 0 12px #1F2723;
        height: 880px;
    }
}

/* ==========================================================================
   ENCABEZADO (HEADER)
   ========================================================================== */

.app-header {
    background-color: var(--color-barrio-primary);
    padding: 16px 20px 12px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

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

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar {
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.25);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.avatar:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.search-container {
    width: 100%;
}

.search-bar {
    background-color: rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.search-bar:focus-within {
    background-color: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.4);
}

.search-icon {
    font-size: 14px;
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    color: white;
    font-size: 13px;
    font-family: var(--font-sans);
    width: 100%;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   CATEGORÍAS (SCROLL HORIZONTAL)
   ========================================================================== */

.categories-scroll {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    overflow-x: auto;
    background-color: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    scrollbar-width: none; /* Oculta scrollbar en Firefox */
    -webkit-overflow-scrolling: touch; /* Scroll suave e inercial en iOS/Android */
    scroll-behavior: smooth;
}

.categories-scroll::-webkit-scrollbar {
    display: none; /* Oculta scrollbar en Chrome/Safari */
}

.category-chip {
    flex-shrink: 0; /* Evita que los botones se encojan, forzando el desborde horizontal */
    background-color: var(--color-bg-page);
    border: 1px solid var(--color-border);
    border-radius: 99px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.category-chip:hover {
    background-color: var(--color-barrio-light);
    color: var(--color-barrio-primary);
    border-color: var(--color-barrio-light);
}

.category-chip.active {
    background-color: var(--color-barrio-primary);
    color: white;
    border-color: var(--color-barrio-primary);
    box-shadow: 0 2px 6px rgba(29, 158, 117, 0.25);
}

/* ==========================================================================
   VISTAS Y CONTENIDO PRINCIPAL
   ========================================================================== */

.app-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.content-section {
    display: none;
    flex-direction: column;
    padding: 0 0 76px 0; /* Espacio para el nav tab inferior */
}

.content-section.active {
    display: flex;
}

/* Barra de geolocalización simulada */
.geo-status {
    background-color: var(--color-barrio-light);
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--color-barrio-dark);
    font-weight: 500;
    border-bottom: 1px solid rgba(29, 158, 117, 0.12);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot.green {
    background-color: var(--color-barrio-primary);
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.2);
    animation: pulse 1.5s infinite;
}

.status-dot.orange {
    background-color: var(--color-barrio-secondary);
    box-shadow: 0 0 0 3px rgba(239, 159, 39, 0.2);
    animation: pulse-orange 1.5s infinite;
}

.btn-change-location {
    background: none;
    border: none;
    color: var(--color-barrio-primary);
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    margin-left: auto;
}

.btn-change-location:hover {
    text-decoration: underline;
}

/* ==========================================================================
   TARJETAS DE PUBLICACIÓN (FEED)
   ========================================================================== */

.posts-list {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-card {
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    animation: fadeInUp 0.4s ease-out;
}

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

/* Estilo premium para Posts Impulsados (Boosted) */
.post-card.boosted {
    border: 1.5px solid var(--color-barrio-primary);
    box-shadow: 0 4px 12px rgba(29, 158, 117, 0.12);
}

.boosted-banner {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--color-barrio-primary) 0%, var(--color-barrio-dark) 100%);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.08em;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.post-header {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--color-border);
}

.business-logo-circle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-color: var(--color-barrio-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.business-logo-circle:hover {
    transform: scale(1.05);
}

.business-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.business-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    cursor: pointer;
}

.business-name:hover {
    color: var(--color-barrio-primary);
}

.business-meta {
    font-size: 10px;
    color: var(--color-text-tertiary);
    font-weight: 500;
}

.distance-badge {
    background-color: #F0F2F0;
    color: var(--color-text-secondary);
    padding: 3px 7px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 600;
    margin-left: auto;
}

/* Imagen / Portada del post */
.post-visual {
    height: 120px;
    background: linear-gradient(135deg, var(--color-barrio-light) 0%, #9FE1CB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    position: relative;
    overflow: hidden;
}

/* Variación de gradiente para Ofertas */
.post-visual.visual-oferta {
    background: linear-gradient(135deg, #FAEEDA 0%, #FAC775 100%);
}

.post-body {
    padding: 12px 14px;
}

.offer-badge {
    display: inline-flex;
    background-color: var(--color-barrio-secondary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
}

.post-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.post-text {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.post-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--color-border);
    padding-top: 10px;
}

.btn-action {
    flex: 1;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: var(--transition);
}

.btn-action:hover {
    background-color: var(--color-bg-page);
    color: var(--color-text-primary);
    border-color: var(--color-text-tertiary);
}

.btn-action.action-like:hover {
    color: #E03E3E;
    border-color: #F8D7D7;
    background-color: #FFF5F5;
}

/* ==========================================================================
   VISTA DEL MAPA
   ========================================================================== */

.map-wrapper {
    width: 100%;
    height: calc(100vh - 180px);
    max-height: 740px;
    position: relative;
}

@media (min-width: 500px) {
    .map-wrapper {
        height: 700px;
    }
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.map-overlay-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.info-badge {
    font-size: 9px;
    font-weight: 600;
    color: var(--color-text-secondary);
    background-color: #EBF0EB;
    padding: 3px 8px;
    border-radius: 99px;
}

.info-badge.warning {
    background-color: #FEF3E2;
    color: #C07000;
}

.info-badge.danger {
    background-color: #FDF2F2;
    color: #DE3D3D;
}

/* Custom styles for Leaflet popups */
.leaflet-popup-content-wrapper {
    border-radius: var(--border-radius-md);
    font-family: var(--font-sans);
    padding: 2px;
}

.leaflet-popup-content {
    margin: 8px 10px;
}

.map-popup-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.map-popup-title {
    font-size: 12px;
    font-weight: 700;
    margin: 0;
    color: var(--color-barrio-primary);
}

.map-popup-desc {
    font-size: 10px;
    color: var(--color-text-secondary);
    margin: 0;
}

.map-popup-btn {
    background-color: var(--color-barrio-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 9px;
    padding: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    text-align: center;
}

/* Pulsating user marker on map */
.user-marker-pulse {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--color-barrio-primary);
    border: 2px solid white;
    box-shadow: 0 0 0 4px rgba(29, 158, 117, 0.3);
    animation: userPulse 2s infinite;
}

/* Limpieza de estilos de Leaflet para marcadores de comercios */
.custom-shop-pin {
    background: transparent !important;
    border: none !important;
}

/* Estilos para el pin teardrop y animación de pulso de oferta */
.shop-pin-teardrop {
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.shop-pin-teardrop.has-offer-pulse {
    animation: offerPulse 2s infinite;
}

@keyframes offerPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 159, 39, 0.8), var(--shadow-sm); }
    70% { box-shadow: 0 0 0 10px rgba(239, 159, 39, 0), var(--shadow-sm); }
    100% { box-shadow: 0 0 0 0 rgba(239, 159, 39, 0), var(--shadow-sm); }
}

/* ==========================================================================================
   BARRA DE NAVEGACIÓN INFERIOR (TABS)
   ========================================================================== */

.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--color-border);
    display: flex;
    z-index: 10;
}

.nav-tab {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: var(--transition);
}

.nav-tab:hover {
    color: var(--color-text-secondary);
}

.tab-icon {
    font-size: 20px;
}

.tab-label {
    font-size: 9px;
    font-weight: 500;
}

.nav-tab.active {
    color: var(--color-barrio-primary);
}

.nav-tab.active .tab-icon {
    transform: translateY(-2px);
}

/* ==========================================================================
   MODALES (VENTANAS EMERGENTES)
   ========================================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(18, 26, 22, 0.65);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 400px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    animation: modalBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    margin: 40px auto;
}

.close-modal-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal-btn:hover {
    color: var(--color-text-primary);
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

.modal-desc {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Formularios dentro de Modales */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input, .form-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-page);
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-text-primary);
    outline: none;
    transition: var(--transition);
}

.form-input:focus, .form-select:focus {
    border-color: var(--color-barrio-primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.1);
}

.form-textarea {
    min-height: 80px;
    resize: none;
}

.form-range {
    width: 100%;
    accent-color: var(--color-barrio-primary);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Fila de inputs de expiración (fecha + hora) */
.expire-inputs-row {
    display: flex;
    gap: 8px;
}

.expire-inputs-row .form-input {
    flex: 1;
    min-width: 0;
}

/* Garantizar scroll del modal en pantallas pequeñas */
@media (max-width: 499px) {
    .modal {
        padding: 12px;
        align-items: flex-start;
    }

    .modal-content {
        margin: 16px auto;
        max-height: calc(100dvh - 32px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Botones universales */
.btn-primary, .btn-secondary, .btn-outline {
    flex: 1;
    padding: 11px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: none;
}

.btn-primary {
    background-color: var(--color-barrio-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-barrio-dark);
}

.btn-secondary {
    background-color: var(--color-border);
    color: var(--color-text-secondary);
}

.btn-secondary:hover {
    background-color: #D3DDD3;
}

.btn-outline {
    background: none;
    border: 1px solid var(--color-barrio-primary);
    color: var(--color-barrio-primary);
}

.btn-outline:hover {
    background-color: var(--color-barrio-light);
}

/* Modal del perfil de Comercio */
.shop-profile-modal {
    padding: 0;
    overflow: hidden;
}

.shop-cover-gradient {
    height: 100px;
    background: linear-gradient(135deg, var(--color-barrio-primary) 0%, var(--color-barrio-dark) 100%);
    position: relative;
}

.shop-avatar-large {
    position: absolute;
    bottom: -24px;
    left: 20px;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background-color: var(--color-barrio-light);
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: var(--shadow-sm);
}

.shop-detail-body {
    padding: 36px 20px 20px;
}

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

.shop-name {
    font-size: 18px;
    font-weight: 700;
}

.shop-status-badge {
    background-color: var(--color-barrio-light);
    color: var(--color-barrio-primary);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
    text-transform: uppercase;
}

.shop-status-badge.closed {
    background-color: #FDE8E8;
    color: #E03E3E;
}

.shop-category {
    font-size: 11px;
    color: var(--color-text-tertiary);
    margin-bottom: 10px;
    font-weight: 500;
}

.shop-bio {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 14px;
}

.shop-contact-info {
    background-color: var(--color-bg-page);
    border-radius: var(--border-radius-sm);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    margin-bottom: 16px;
}

.modal-shop-actions {
    display: flex;
    gap: 8px;
}

/* ==========================================================================
   DISEÑO COMERCIANTE (DASHBOARD)
   ========================================================================== */

.dashboard-header {
    background-color: var(--color-barrio-primary);
}

.back-button {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.back-button:hover {
    transform: translateX(-3px);
}

.merchant-badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    gap: 4px;
}

.badge-value {
    color: #FFECA1;
}

.merchant-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.merchant-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.merchant-info {
    flex: 1;
}

.merchant-title {
    font-size: 18px;
    font-weight: 700;
}

.merchant-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
}

.btn-change-shop {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-change-shop:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* Tarjetas de estadísticas */
.dashboard-stats-row {
    padding: 16px 20px;
    display: flex;
    gap: 10px;
}

.stat-card {
    flex: 1;
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
    padding: 12px 6px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-num {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-barrio-primary);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 9px;
    color: var(--color-text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
}

/* Botón de publicar del dashboard */
.btn-publish-primary {
    margin: 0 20px 16px;
    background-color: var(--color-barrio-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(29, 158, 117, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-publish-primary:hover {
    background-color: var(--color-barrio-dark);
    transform: translateY(-1px);
}

.plus-icon {
    font-size: 16px;
}

/* Lista de publicaciones del Dashboard */
.my-posts-section {
    padding: 0 20px 20px;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.posts-list-dashboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-post-item {
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.dash-post-item:hover {
    border-color: var(--color-barrio-primary);
}

.dash-post-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.dash-post-actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--color-border);
    padding-top: 8px;
    width: 100%;
}

.btn-dashboard-action {
    background: none;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 600;
    padding: 5px 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 3px;
}

.btn-dashboard-action.btn-edit {
    border: 1px solid var(--color-barrio-primary);
    color: var(--color-barrio-primary);
}

.btn-dashboard-action.btn-edit:hover {
    background-color: var(--color-barrio-light);
}

.btn-dashboard-action.btn-republish {
    border: 1px solid var(--color-barrio-secondary);
    color: var(--color-barrio-secondary);
}

.btn-dashboard-action.btn-republish:hover {
    background-color: #FEF3E2;
}

.dash-post-thumb {
    width: 38px;
    height: 38px;
    background-color: var(--color-barrio-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.dash-post-thumb.thumb-oferta {
    background-color: #FEF3E2;
}

.dash-post-info {
    flex: 1;
}

.dash-post-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.dash-post-meta {
    font-size: 9px;
    color: var(--color-text-tertiary);
}

.dash-post-stat {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-barrio-primary);
}

.btn-follow-badge {
    background: none;
    border: 1px solid var(--color-barrio-primary);
    color: var(--color-barrio-primary);
    font-size: 9px;
    font-weight: 600;
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-follow-badge.following {
    background-color: var(--color-barrio-primary);
    color: white;
}

.btn-boost-action {
    background-color: var(--color-barrio-secondary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 10px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-boost-action:hover {
    background-color: #D68612;
    transform: scale(1.03);
}

.btn-boost-action.boosted-active {
    background-color: var(--color-barrio-primary);
    cursor: default;
}

/* Modales B2B */
.type-selector-row {
    display: flex;
    gap: 8px;
}

.type-selector-row input {
    display: none;
}

.type-label {
    flex: 1;
    background-color: var(--color-bg-page);
    border: 1px solid var(--color-border);
    padding: 8px 4px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.type-selector-row input:checked + .type-label {
    background-color: var(--color-barrio-primary);
    color: white;
    border-color: var(--color-barrio-primary);
}

.post-preview-tiny {
    background-color: var(--color-bg-page);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
}

.preview-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--color-barrio-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.preview-info h4 {
    font-size: 12px;
    font-weight: 600;
}

.preview-info p {
    font-size: 9px;
    color: var(--color-text-tertiary);
}

/* Grilla de opciones de Boost */
.boost-options-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.boost-card {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background-color: var(--color-bg-card);
}

.boost-card:hover {
    border-color: var(--color-barrio-secondary);
    background-color: #FFFDF9;
}

.boost-card.active {
    border: 2px solid var(--color-barrio-secondary);
    background-color: #FFFBF5;
}

.badge-popular {
    position: absolute;
    top: -8px;
    right: 14px;
    background-color: var(--color-barrio-secondary);
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.boost-reach {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-barrio-secondary);
}

.boost-label {
    font-size: 10px;
    color: var(--color-text-secondary);
    margin-bottom: 2px;
}

.boost-duration {
    font-size: 9px;
    color: var(--color-text-tertiary);
}

.boost-price {
    position: absolute;
    right: 16px;
    bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Suscripciones */
.plans-management-section {
    padding: 0 20px 20px;
}

.current-plan-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.plan-details {
    flex: 1;
    padding-right: 12px;
}

.plan-title-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-barrio-primary);
    margin-bottom: 2px;
}

.plan-desc {
    font-size: 10px;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.btn-change-plan {
    flex: 0 0 auto;
    font-size: 10px;
    padding: 8px 12px;
}

/* Historial de Pagos */
.payments-history-section {
    margin: 0 20px 20px;
}
.payments-history-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 14px;
    box-shadow: var(--shadow-sm);
}
.table-responsive {
    overflow-x: auto;
    width: 100%;
}
.payments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    text-align: left;
}
.payments-table th {
    font-weight: 600;
    color: var(--color-text-tertiary);
    border-bottom: 2px solid var(--color-border);
    padding: 8px 6px;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.05em;
}
.payments-table td {
    padding: 10px 6px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
    vertical-align: middle;
}
.payments-table tr:last-child td {
    border-bottom: none;
}
.no-payments {
    text-align: center;
    color: var(--color-text-tertiary);
    padding: 20px 0 !important;
}
.payment-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.payment-badge.approved {
    background-color: var(--color-barrio-light);
    color: var(--color-barrio-dark);
}
.payment-badge.pending {
    background-color: #FEF3E2;
    color: #C07000;
}
.payment-badge.rejected {
    background-color: #FFF2F2;
    color: #E03E3E;
}

.plan-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-option-row {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.plan-option-row:hover {
    border-color: var(--color-barrio-primary);
    background-color: var(--color-barrio-light);
}

.plan-option-row.active {
    border: 2px solid var(--color-barrio-primary);
    background-color: var(--color-barrio-light);
}

.plan-opt-details h5 {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}

.plan-opt-details p {
    font-size: 9px;
    color: var(--color-text-secondary);
    line-height: 1.3;
    padding-right: 16px;
}

.plan-opt-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-barrio-primary);
    white-space: nowrap;
}

/* Selector de Negocio */
.shop-login-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
}

.shop-login-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.shop-login-row:hover {
    background-color: var(--color-barrio-light);
    border-color: var(--color-barrio-primary);
}

.shop-login-icon {
    font-size: 18px;
    background-color: var(--color-bg-page);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-login-info {
    flex: 1;
}

.shop-login-name {
    font-size: 12px;
    font-weight: 600;
}

.shop-login-cat {
    font-size: 9px;
    color: var(--color-text-tertiary);
}

/* ==========================================================================
   NOTIFICACIONES E INDICADORES DE CARGA (SHIMMER)
   ========================================================================== */

.toast {
    position: absolute;
    bottom: 80px;
    left: 20px;
    right: 20px;
    background-color: rgba(44, 44, 42, 0.95);
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: var(--transition);
}

.toast.active {
    opacity: 1;
    transform: translateY(0);
}

.shimmer-loader {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.shimmer-card {
    height: 180px;
    background: linear-gradient(90deg, #E5E9E5 25%, #F0F2F0 50%, #E5E9E5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-md);
}

/* ==========================================================================
   ANIMACIONES CSS KEYFRAMES
   ========================================================================== */

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(29, 158, 117, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(29, 158, 117, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(29, 158, 117, 0); }
}

@keyframes pulse-orange {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 159, 39, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 159, 39, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 159, 39, 0); }
}

@keyframes userPulse {
    0% { box-shadow: 0 0 0 0 rgba(29, 158, 117, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(29, 158, 117, 0); }
    100% { box-shadow: 0 0 0 0 rgba(29, 158, 117, 0); }
}

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

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

@keyframes modalBounce {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   VISTA DE ADMINISTRACIÓN 🛡️
   ========================================================================== */

.admin-header {
    background: linear-gradient(135deg, #12241E 0%, #1D9E75 100%);
    padding-bottom: 16px;
}

.admin-badge {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
    letter-spacing: 0.05em;
}

.admin-identity {
    margin-top: 4px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.admin-stat-card {
    background-color: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: var(--transition);
}

.admin-stat-card:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.admin-stat-num {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.admin-stat-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.admin-tabs {
    display: flex;
    background-color: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 5;
}

.admin-tab {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    padding: 12px 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    cursor: pointer;
    text-align: center;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.admin-tab:hover {
    color: var(--color-text-secondary);
}

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

.admin-section {
    display: none;
    flex-direction: column;
    padding-bottom: 30px;
}

.admin-section.active {
    display: flex;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.admin-list-item {
    transition: var(--transition);
    animation: fadeInUp 0.3s ease-out;
}

.admin-list-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md) !important;
}

.boosted-active {
    background-color: var(--color-barrio-primary) !important;
    border-color: var(--color-barrio-primary) !important;
    color: white !important;
}

/* ==========================================================================
   ESTILOS DE APROBACIÓN Y EDICIÓN DE PERFIL COMERCIAL 🏪
   ========================================================================== */

.inactive-banner {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFEBEB 100%);
    border: 1.5px dashed #E03E3E;
    border-radius: var(--border-radius-md);
    padding: 16px;
    margin: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.4s ease-out;
}

.inactive-banner-title {
    font-size: 13px;
    font-weight: 700;
    color: #E03E3E;
    display: flex;
    align-items: center;
    gap: 6px;
}

.inactive-banner-desc {
    font-size: 11px;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

/* Elementos deshabilitados por inactividad */
.disabled-action {
    opacity: 0.55 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    filter: grayscale(1);
}

/* Sección de Edición de Perfil en Dashboard */
.profile-edit-section {
    margin: 0 20px 20px;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

/* Badges de Estado de Comercio en Admin Panel */
.status-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    display: inline-block;
    text-transform: uppercase;
}

.status-badge.active {
    background-color: var(--color-barrio-light);
    color: var(--color-barrio-dark);
}

.status-badge.pending {
    background-color: #FEF3E2;
    color: #C07000;
}

/* ==========================================================================
   ESTILOS DE CARGA DE IMAGEN EN PUBLICACIONES 📷
   ========================================================================== */

.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.btn-image-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg-page);
    border: 1.5px dashed var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 10px 14px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: var(--transition);
    text-align: center;
}

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

.preview-upload-wrapper {
    position: relative;
    width: 100%;
    margin-top: 6px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-page);
    height: 120px;
}

.preview-upload-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-remove-image {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: rgba(224, 62, 62, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.btn-remove-image:hover {
    background-color: #c92f2f;
    transform: scale(1.08);
}

/* ==========================================================================
   EDITOR DE HORARIOS SEMANALES (B2B) Y DESPLEGABLE DE HORARIOS (B2C)
   ========================================================================== */

.weekly-schedule-editor {
    background-color: var(--color-bg-page);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
}

.day-schedule-row {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
}

.day-schedule-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.day-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-primary);
    text-transform: capitalize;
}

.shift-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--color-text-secondary);
}

.shift-time {
    padding: 4px 6px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 10px;
    outline: none;
    background-color: white;
}

.btn-add-shift {
    background: none;
    border: none;
    color: var(--color-barrio-primary);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    padding: 2px 0;
    margin-top: 2px;
}

.btn-add-shift:hover {
    text-decoration: underline;
}

.btn-remove-shift {
    background: none;
    border: none;
    color: #E03E3E;
    font-size: 14px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

/* Acordeón de horarios (B2C) */
.shop-hours-dropdown {
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 8px 10px;
    margin: 6px 0;
    font-size: 11px;
}

.hours-summary {
    user-select: none;
}

.shop-hours-list {
    display: none;
    margin-top: 8px;
    border-top: 1px solid var(--color-border);
    padding-top: 8px;
    flex-direction: column;
    gap: 4px;
}

.shop-hours-list.active {
    display: flex;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--color-text-secondary);
}

.hours-row.today {
    font-weight: 700;
    color: var(--color-barrio-primary);
}

/* ==========================================================================
   ESTILOS DE AUTENTICACIÓN (LOGIN/REGISTRO VECINOS) 👤
   ========================================================================== */

.auth-modal-content {
    max-width: 380px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-border);
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 16px;
    margin-top: 10px;
}

.auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    outline: none;
}

.auth-tab-btn:hover {
    color: var(--color-text-secondary);
}

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

.auth-intro-text {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin-bottom: 20px;
    text-align: center;
    background-color: var(--color-barrio-light);
    color: var(--color-barrio-dark);
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
}

.auth-error-msg {
    color: #E03E3E;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 10px;
    min-height: 14px;
}

.auth-demo-helper {
    margin-top: 20px;
    font-size: 11px;
    color: var(--color-text-secondary);
    text-align: center;
    cursor: pointer;
    padding: 8px;
    background-color: #F0F2F0;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.auth-demo-helper:hover {
    background-color: #E5E9E5;
    color: var(--color-text-primary);
}

.active-saved {
    background-color: var(--color-barrio-light) !important;
    color: var(--color-barrio-primary) !important;
    border-color: var(--color-barrio-primary) !important;
    font-weight: 600 !important;
}

/* ==========================================================================
   ESTILOS DE LA GUÍA COMERCIAL (MENU LATERAL / DRAWER) 📕
   ========================================================================== */

.btn-guide {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--border-radius-md);
    padding: 10px 14px;
    color: white !important;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: var(--transition);
}

.btn-guide:hover {
    background-color: rgba(255, 255, 255, 0.35) !important;
    transform: scale(1.03);
}

.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(18, 26, 22, 0.5);
    backdrop-filter: blur(2px);
    z-index: 90;
    display: none;
}

.drawer-backdrop.active {
    display: block;
}

.drawer {
    position: fixed;
    top: 0;
    left: -320px; /* Escondido */
    width: 310px;
    height: 100vh;
    background-color: var(--color-bg-card);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 101;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 0;
}

.drawer.active {
    left: 0;
}

/* Acoplar dentro del celular virtual en computadoras */
@media (min-width: 500px) {
    .drawer {
        position: absolute;
        top: 0;
        bottom: 0;
        height: 100%;
        left: -330px;
        border-radius: var(--border-radius-xl) 0 0 var(--border-radius-xl);
    }
    .drawer.active {
        left: 0;
    }
    .drawer-backdrop {
        position: absolute;
        z-index: 95;
    }
}

.drawer-header {
    padding: 20px 20px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}

.drawer-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-barrio-primary);
    margin: 0;
}

.close-drawer-btn {
    font-size: 26px;
    color: var(--color-text-tertiary);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
    user-select: none;
}

.close-drawer-btn:hover {
    color: var(--color-text-primary);
}

.drawer-intro {
    padding: 12px 20px 10px;
    font-size: 11px;
    color: var(--color-text-secondary);
    line-height: 1.45;
    margin: 0;
}

.drawer-search {
    padding: 0 20px 14px;
    border-bottom: 1px solid var(--color-border);
}

.drawer-search input {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-page);
    font-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.drawer-search input:focus {
    border-color: var(--color-barrio-primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.1);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* Grupos y Tarjetas */
.guide-category-group {
    margin-bottom: 22px;
}

.guide-category-title {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1.5px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.guide-category-title-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.guide-category-chevron {
    transition: transform 0.3s ease;
    font-size: 10px;
}

.guide-category-group.collapsed .guide-category-chevron {
    transform: rotate(-90deg);
}

.guide-category-group.collapsed .guide-shop-list {
    display: none;
}

.guide-shop-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guide-shop-item {
    padding: 12px 14px;
    border-radius: var(--border-radius-sm);
    background-color: #F8FAF8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    border: 1px solid #ECECEC;
}

.guide-shop-item:hover {
    background-color: var(--color-barrio-light);
    border-color: rgba(29, 158, 117, 0.2);
    transform: translateX(4px);
}

.guide-shop-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    padding-right: 8px;
}

.guide-shop-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.25;
}

.guide-shop-address {
    font-size: 11px;
    color: var(--color-text-tertiary);
    line-height: 1.2;
}

.guide-shop-arrow {
    color: var(--color-barrio-primary);
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}

.guide-shop-item:hover .guide-shop-arrow {
    transform: translateX(2px);
}

.shop-profile-modal .close-modal-btn {
    color: rgba(255, 255, 255, 0.85) !important;
    z-index: 10;
    font-size: 28px;
    top: 12px;
    right: 16px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.shop-profile-modal .close-modal-btn:hover {
    color: white !important;
    transform: scale(1.1);
}

/* ==========================================================================
   DISEÑO RESPONSIVO PARA CONSOLA DE CONTROL Y DASHBOARD B2B 🖥️
   ========================================================================== */

@media (min-width: 768px) {
    /* Ajustes para el cuerpo */
    body.admin-body, body.dashboard-body {
        display: block;
        background-color: var(--color-bg-page);
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    /* Eliminar la simulación de marco de celular en escritorio */
    .app-container.admin-container,
    .app-container.dashboard-container {
        max-width: 1200px;
        height: auto;
        min-height: 100vh;
        max-height: none;
        margin: 0 auto;
        border: none;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
        background-color: var(--color-bg-page);
    }

    /* Encabezados amplios */
    .admin-container .admin-header,
    .dashboard-container .dashboard-header {
        padding: 24px 30px 20px;
    }

    .admin-container .admin-identity,
    .dashboard-container .merchant-identity {
        margin-top: 10px;
    }

    /* Grilla de estadísticas del Admin Panel (3 columnas en tablet) */
    .admin-container .admin-stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px;
        margin-top: 16px;
    }
    
    .admin-container .admin-stat-card {
        grid-column: span 1 !important;
        padding: 14px 16px;
    }

    /* Barra de navegación por pestañas en Admin Panel */
    .admin-container .admin-tabs {
        display: flex;
        overflow: visible;
        white-space: normal;
        gap: 6px;
        padding: 0 30px;
        background-color: var(--color-bg-card);
        border-bottom: 1.5px solid var(--color-border);
    }

    .admin-container .admin-tab {
        flex: 1 !important;
        max-width: 180px;
        padding: 14px 10px;
        font-size: 11px;
        border: 1px solid transparent;
        border-bottom: none;
        border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    }

    .admin-container .admin-tab:hover {
        background-color: var(--color-bg-page);
    }

    .admin-container .admin-tab.active {
        color: var(--color-barrio-primary);
        background-color: var(--color-bg-page);
        border-color: var(--color-border);
        border-bottom: 2px solid var(--color-bg-page);
        font-weight: 700;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.02);
    }

    /* Contenido principal en Admin */
    .admin-container .admin-content {
        padding: 20px 30px 40px;
        height: auto;
        overflow: visible;
    }

    /* Acciones del sistema lado a lado */
    .admin-container .system-actions-group {
        flex-direction: row !important;
        gap: 16px;
    }

    .admin-container .system-actions-group .system-card {
        flex: 1;
        margin-bottom: 0;
    }

    /* Cards del editor de planes en grilla de 3 columnas */
    .admin-container #plans-editor-container {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px;
    }

    /* Listas y grillas en el panel de administración */
    .admin-container .admin-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .admin-container .admin-list-item {
        margin: 0 !important; /* Quitar el margen fijo vertical/lateral de mobile */
        border-radius: var(--border-radius-md);
        box-shadow: var(--shadow-sm);
        transition: var(--transition);
    }
}

/* Breakpoint para pantallas grandes / Escritorio completo */
@media (min-width: 1024px) {
    /* Grilla de estadísticas del Admin Panel en una sola fila (6 columnas) */
    .admin-container .admin-stats-grid {
        grid-template-columns: repeat(6, 1fr) !important;
    }

    /* Grilla de Dos Columnas en el Dashboard del Comercio */
    .dashboard-container .dashboard-content {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr;
        gap: 24px;
        padding: 24px 30px 40px;
        height: auto;
        overflow: visible;
        align-items: start;
    }

    .dashboard-container #merchant-inactive-banner {
        grid-column: 1 / -1;
    }

    .dashboard-container .dashboard-stats-row {
        grid-column: 1;
        padding: 0 0 16px 0;
    }

    .dashboard-container .btn-publish-primary {
        grid-column: 1;
        margin: 0 0 20px 0;
    }

    .dashboard-container .my-posts-section {
        grid-column: 1;
        padding: 0;
    }

    .dashboard-container .plans-management-section {
        grid-column: 1;
        padding: 16px 0 0 0;
    }

    /* Formulario de perfil a la derecha en columna fija */
    .dashboard-container .profile-edit-section {
        grid-column: 2;
        grid-row: 1 / span 5;
        margin: 0;
        height: fit-content;
        position: sticky;
        top: 20px;
    }
    
    /* Grid dentro de la sección de comunicaciones (Emisión y Formulario lado a lado) */
    .admin-container #tab-comms {
        display: grid !important;
        grid-template-columns: 1.1fr 0.9fr;
        gap: 24px;
        align-items: start;
    }

    .admin-container #tab-comms > h3,
    .admin-container #tab-comms > p {
        grid-column: span 2;
    }

    .admin-container #tab-comms .system-card {
        grid-column: 1;
        margin: 0 !important;
    }

    .admin-container #tab-comms .section-header-row {
        grid-column: 2;
        grid-row: 3;
        margin-top: 0 !important;
        padding: 0 0 8px 0 !important;
        border-top: none !important;
    }

    .admin-container #tab-comms #admin-broadcasts-history-list {
        grid-column: 2;
        grid-row: 4;
        margin-top: 0 !important;
    }
}

/* === BADGE DE ESTADO DE CONEXIÓN === */
.connection-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.connection-badge.online {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.connection-badge.offline {
    background-color: rgba(231, 76, 60, 0.2);
    color: #ffffff;
    border: 1px solid rgba(231, 76, 60, 0.4);
}

.connection-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.connection-badge.online .dot {
    background-color: #2ecc71;
    box-shadow: 0 0 8px #2ecc71;
    animation: pulse-green 2s infinite;
}

.connection-badge.offline .dot {
    background-color: #e74c3c;
    box-shadow: 0 0 8px #e74c3c;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* === BOTÓN DE ACTUALIZAR FEED === */
.btn-refresh-feed {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-refresh-feed:hover {
    background-color: var(--color-bg-hover);
    color: var(--color-barrio-primary);
    border-color: var(--color-barrio-primary);
}

.btn-refresh-feed:active {
    transform: scale(0.95);
}

.btn-refresh-feed .icon {
    display: inline-block;
    transition: transform 0.4s ease;
}

.btn-refresh-feed.loading .icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* === TÉRMINOS Y CONDICIONES (ACCORDION/CHECKBOX) === */
.terms-container {
    margin: 16px 0;
    text-align: left;
}

.terms-details {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    background-color: var(--color-bg-page);
    font-size: 11px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.terms-details[open] {
    box-shadow: var(--shadow-sm);
    border-color: rgba(29, 158, 117, 0.3);
}

.terms-details summary {
    padding: 10px 14px;
    font-weight: 600;
    color: var(--color-barrio-primary);
    cursor: pointer;
    outline: none;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terms-details summary::-webkit-details-marker {
    display: none; /* Oculta flecha por defecto de Safari */
}

.terms-details summary::after {
    content: "▼";
    font-size: 8px;
    color: var(--color-text-secondary);
    transition: transform 0.25s ease;
}

.terms-details[open] summary::after {
    transform: rotate(180deg);
}

.terms-scroll-box {
    max-height: 120px;
    overflow-y: auto;
    padding: 10px 14px 14px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    line-height: 1.45;
}

.terms-scroll-box strong {
    color: var(--color-text-primary);
}

.terms-scroll-box p {
    margin-bottom: 8px;
}

.terms-scroll-box h4 {
    color: var(--color-text-primary);
    font-size: 11px;
    font-weight: 700;
    margin-top: 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 2px;
}

.terms-checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.terms-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-barrio-primary);
    cursor: pointer;
}

.terms-checkbox-group label {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    user-select: none;
}

/* Deshabilitado estilo premium para botones primarios */
.btn-primary:disabled {
    background-color: var(--color-text-tertiary) !important;
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}


/* === ESTILOS PARA EL MODAL DE ANALÍTICAS DE INGRESOS === */
.admin-stat-card.clickable {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.admin-stat-card.clickable::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(255,255,255,0.05), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.admin-stat-card.clickable:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.admin-stat-card.clickable:hover::after {
    opacity: 1;
}

.admin-stat-card.clickable:active {
    transform: translateY(0);
}

/* Modal específico de analíticas */
.analytics-modal-content {
    background: var(--color-bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    animation: modalBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.analytics-tab {
    transition: all 0.2s ease;
    border: 1px solid var(--color-border) !important;
    color: var(--color-text-secondary) !important;
}

.analytics-tab:hover {
    background-color: var(--color-bg-page) !important;
    color: var(--color-barrio-primary) !important;
}

.analytics-tab.active {
    background-color: var(--color-barrio-primary) !important;
    color: white !important;
    border-color: var(--color-barrio-primary) !important;
    box-shadow: var(--shadow-sm);
}

.analytics-stat-box {
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease;
}

.analytics-stat-box:hover {
    transform: translateY(-1px);
}

.analytics-table th {
    padding: 8px 10px;
    font-weight: 700;
    color: var(--color-text-secondary);
    border-bottom: 2px solid var(--color-border);
}

.analytics-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
    vertical-align: middle;
}

.analytics-table tr:hover {
    background-color: var(--color-bg-page);
}

/* Gráfico de Barras CSS */
.css-chart-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 120px;
    padding: 10px 0;
    border-bottom: 2px solid var(--color-border);
}

.css-chart-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
}

.css-chart-bars-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 80px; /* altura de las barras */
    width: 100%;
    justify-content: center;
}

.css-chart-bar {
    width: 16px;
    border-radius: 3px 3px 0 0;
    transition: height 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 0; /* empieza en 0 y JS le cambia la altura */
    position: relative;
}

.css-chart-bar:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 8px;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 4px;
}

.css-chart-bar.bar-plans {
    background-color: var(--color-barrio-primary);
}

.css-chart-bar.bar-boosts {
    background-color: #EF9F27;
}

.css-chart-label {
    font-size: 9px;
    font-weight: 700;
    margin-top: 6px;
    color: var(--color-text-tertiary);
}

/* ==========================================================================
   REPORTES Y MÉTRICAS VIP 📈
   ========================================================================== */

.vip-reports-section {
    padding: 0 20px 20px;
    position: relative;
}

.vip-reports-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.vip-reports-card.locked {
    min-height: 280px;
}

/* Efecto Blur para la versión bloqueada */
.vip-reports-card.locked .vip-content-wrapper {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

/* Capa del Paywall */
.premium-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 20px;
}

.lock-content {
    text-align: center;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lock-badge {
    background-color: var(--color-barrio-light);
    color: var(--color-barrio-primary);
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lock-icon {
    font-size: 32px;
    background: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(29, 158, 117, 0.15);
    border: 2px solid var(--color-barrio-light);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.lock-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.3;
}

.lock-desc {
    font-size: 11px;
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin-bottom: 4px;
}

.lock-benefits {
    list-style: none;
    text-align: left;
    font-size: 10px;
    color: var(--color-text-primary);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.lock-benefits li::before {
    content: "⚡";
    margin-right: 6px;
    color: var(--color-barrio-secondary);
}

.btn-lock-upgrade {
    background-color: var(--color-barrio-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(29, 158, 117, 0.25);
    transition: var(--transition);
}

.btn-lock-upgrade:hover {
    background-color: var(--color-barrio-dark);
}

/* Grilla de Métricas VIP */
.vip-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.vip-metric-card {
    background-color: var(--color-bg-page);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vip-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9px;
    color: var(--color-text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
}

.vip-metric-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.vip-metric-change {
    font-size: 9px;
    font-weight: 600;
}

.vip-metric-change.up {
    color: var(--color-barrio-primary);
}

.vip-metric-change.down {
    color: #E03E3E;
}

/* Gráficos SVG */
.vip-chart-wrapper {
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    background-color: var(--color-bg-page);
}

.vip-chart-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vip-chart-legend {
    display: flex;
    gap: 8px;
    font-size: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.legend-color {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.legend-views { background-color: var(--color-barrio-primary); }
.legend-clicks { background-color: var(--color-barrio-secondary); }

/* Publicación Estrella */
.vip-star-card {
    background-color: var(--color-barrio-light);
    border: 1px solid rgba(29, 158, 117, 0.15);
    border-radius: var(--border-radius-sm);
    padding: 10px 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.star-icon {
    font-size: 20px;
    animation: pulse-star 2s infinite;
}

@keyframes pulse-star {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.star-info {
    flex: 1;
}

.star-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-barrio-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.star-post-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.star-stats {
    font-size: 9px;
    color: var(--color-text-secondary);
}

/* Sugerencias / Consejos VIP */
.vip-tips-wrapper {
    margin-bottom: 16px;
}

.vip-tip-item {
    display: flex;
    gap: 10px;
    background-color: #FFF9E6;
    border-left: 3px solid var(--color-barrio-secondary);
    padding: 8px 12px;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    margin-bottom: 8px;
    font-size: 10.5px;
    line-height: 1.4;
    color: var(--color-text-primary);
}

.vip-tip-icon {
    font-size: 14px;
    flex-shrink: 0;
}

/* Botón de PDF */
.btn-vip-pdf {
    width: 100%;
    background-color: white;
    border: 1px solid var(--color-barrio-primary);
    color: var(--color-barrio-primary);
    border-radius: var(--border-radius-sm);
    padding: 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-vip-pdf:hover {
    background-color: var(--color-barrio-light);
}

/* ==========================================================================
   ESTILOS DE IMPRESIÓN (PARA EXPORTAR PDF REPORTE) 🖨️
   ========================================================================== */

@media print {
    /* Ocultar el marco del celular y centrado oscuro */
    body {
        background: white !important;
        color: black !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    
    .app-container {
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        overflow: visible !important;
        background: white !important;
    }

    /* Ocultar todo lo que no sea el reporte VIP */
    .dashboard-header,
    .dashboard-stats-row,
    .btn-publish-primary,
    .my-posts-section,
    .plans-management-section,
    .payments-history-section,
    .profile-edit-section,
    .modal,
    .toast,
    .btn-vip-pdf {
        display: none !important;
    }

    /* Mostrar la sección del reporte a pantalla completa */
    .app-content {
        overflow: visible !important;
        padding: 0 !important;
    }

    .vip-reports-section {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .vip-reports-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        overflow: visible !important;
        background: white !important;
    }

    /* Encabezado del reporte impreso */
    .print-report-header {
        display: block !important;
        border-bottom: 2px solid #1D9E75;
        padding-bottom: 12px;
        margin-bottom: 20px;
    }

    .print-report-header-title {
        color: #1D9E75 !important;
        font-size: 24px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .print-report-header-subtitle {
        font-size: 12px;
        color: #5A5A57;
    }

    /* Ajustar tamaños de fuente y grilla para impresión */
    .vip-metric-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        margin-bottom: 25px !important;
    }

    .vip-metric-card {
        border: 1px solid #ddd !important;
        background: #fafafa !important;
        padding: 15px !important;
        page-break-inside: avoid;
    }

    .vip-metric-val {
        font-size: 24px !important;
    }

    .vip-chart-wrapper {
        border: 1px solid #ddd !important;
        background: white !important;
        padding: 15px !important;
        page-break-inside: avoid;
        margin-bottom: 25px !important;
    }

    .vip-star-card {
        border: 1px solid #1D9E75 !important;
        background: #f0faf5 !important;
        padding: 15px !important;
        page-break-inside: avoid;
        margin-bottom: 25px !important;
    }

    .vip-tip-item {
        background: #fffdf5 !important;
        border-left: 4px solid #EF9F27 !important;
        border-top: 1px solid #ddd !important;
        border-right: 1px solid #ddd !important;
        border-bottom: 1px solid #ddd !important;
        page-break-inside: avoid;
        margin-bottom: 10px !important;
        padding: 12px !important;
    }
}

/* Ocultar el encabezado de impresión en pantalla normal */
.print-report-header {
    display: none;
}

/* ==========================================================================
   BANNER DE INSTALACIÓN PWA (ACCESO DIRECTO) 📱
   ========================================================================== */

.pwa-install-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--color-barrio-light);
    border-bottom: 1px solid rgba(29, 158, 117, 0.12);
    padding: 10px 20px;
    gap: 12px;
    z-index: 8;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pwa-icon {
    font-size: 20px;
    background-color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.btn-pwa-install {
    background-color: var(--color-barrio-primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(29, 158, 117, 0.15);
}

.btn-pwa-install:hover {
    background-color: var(--color-barrio-dark);
    transform: translateY(-1px);
}

.btn-pwa-close:hover {
    color: var(--color-text-primary) !important;
}

/* Cute Loader Styles */
.cute-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    width: 100%;
    min-height: 250px;
    text-align: center;
    animation: fadeInUp 0.4s ease-out;
}

.cute-loader-pin-wrapper {
    position: relative;
    width: 80px;
    height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.cute-loader-pin {
    width: 50px;
    height: 60px;
    animation: pinBounce 1s ease-in-out infinite alternate;
    z-index: 2;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.cute-loader-shadow {
    width: 24px;
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    position: absolute;
    bottom: 5px;
    animation: shadowPulse 1s ease-in-out infinite alternate;
    z-index: 1;
}

.cute-loader-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    max-width: 240px;
    line-height: 1.5;
    margin: 0;
    animation: textPulse 1.5s ease-in-out infinite alternate;
}

/* Sequential typing indicator dots inside the pin */
.cute-loader-pin .dot-1,
.cute-loader-pin .dot-2,
.cute-loader-pin .dot-3 {
    animation: dotPulse 1.2s infinite;
}

.cute-loader-pin .dot-1 { animation-delay: 0s; }
.cute-loader-pin .dot-2 { animation-delay: 0.2s; }
.cute-loader-pin .dot-3 { animation-delay: 0.4s; }

/* Loader Keyframes */
@keyframes pinBounce {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-20px);
    }
}

@keyframes shadowPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(0.4);
        opacity: 0.1;
    }
}

@keyframes textPulse {
    0% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 1;
    }
}

/* ==========================================================================
   ESTILOS DINÁMICOS DE ROL (VECINO VS COMERCIO)
   ========================================================================== */

/* Active states for Vecino */
.auth-modal-content.role-vecino-active .auth-tab-btn.active {
    color: var(--color-barrio-primary) !important;
    border-bottom-color: var(--color-barrio-primary) !important;
}

.auth-modal-content.role-vecino-active .auth-intro-text {
    background-color: var(--color-barrio-light) !important;
    color: var(--color-barrio-dark) !important;
}

.auth-modal-content.role-vecino-active .btn-primary {
    background-color: var(--color-barrio-primary) !important;
}

.auth-modal-content.role-vecino-active .btn-primary:hover {
    background-color: var(--color-barrio-dark) !important;
}

/* Active states for Comercio */
.auth-modal-content.role-comercio-active .auth-tab-btn.active {
    color: var(--color-barrio-secondary) !important;
    border-bottom-color: var(--color-barrio-secondary) !important;
}

.auth-modal-content.role-comercio-active .auth-intro-text {
    background-color: #FFF3E0 !important; /* Soft Amber background */
    color: #B25900 !important;            /* Dark Amber text */
}

.auth-modal-content.role-comercio-active .btn-primary {
    background-color: var(--color-barrio-secondary) !important;
}

.auth-modal-content.role-comercio-active .btn-primary:hover {
    background-color: #D78B1D !important; /* Darker amber on hover */
}

/* ==========================================================================
   TARJETA DE AUDIO HIMNO (MEMPHIS SOPA DE LETRAS) - FLOTANTE Y COLLAPSABLE
   ========================================================================== */

/* Botón Flotante (FAB) de Música */
.audio-fab {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: var(--color-barrio-primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(29, 158, 117, 0.35);
    z-index: 98;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s;
    user-select: none;
}

.audio-fab:hover {
    transform: scale(1.08);
    background-color: var(--color-barrio-dark);
}

.audio-fab:active {
    transform: scale(0.92);
}

/* Pulsación cuando la música está sonando en segundo plano */
.audio-fab.playing {
    animation: fabPulse 1.5s infinite alternate;
}

@keyframes fabPulse {
    0% { 
        box-shadow: 0 4px 12px rgba(29, 158, 117, 0.35); 
        transform: scale(1);
    }
    100% { 
        box-shadow: 0 4px 22px rgba(29, 158, 117, 0.65); 
        transform: scale(1.06); 
    }
}

/* Tarjeta de Audio Premium (Mini Player) */
.barrio-audio-card {
    position: absolute;
    bottom: 74px;
    left: 16px;
    right: 16px;
    z-index: 99;
    background: linear-gradient(135deg, var(--color-barrio-primary) 0%, var(--color-barrio-dark) 100%);
    border-radius: var(--border-radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(29, 158, 117, 0.25);
    transform: translateY(180%); /* Oculto por defecto */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.12); /* Pop/rebote suave */
}

.barrio-audio-card.visible {
    transform: translateY(0);
}

.barrio-audio-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
}

.audio-card-wave-container {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-shrink: 0;
}

.audio-wave-bar {
    width: 3px;
    height: 12px;
    background-color: white;
    border-radius: 3px;
    transition: height 0.15s ease;
}

/* Animación de las barras de sonido cuando se reproduce */
.barrio-audio-card.playing .audio-wave-bar {
    animation: soundWave 1.2s ease-in-out infinite alternate;
}

.barrio-audio-card.playing .bar-1 { animation-delay: 0.1s; }
.barrio-audio-card.playing .bar-2 { animation-delay: 0.3s; }
.barrio-audio-card.playing .bar-3 { animation-delay: 0.6s; }
.barrio-audio-card.playing .bar-4 { animation-delay: 0.2s; }
.barrio-audio-card.playing .bar-5 { animation-delay: 0.4s; }

@keyframes soundWave {
    0% { height: 6px; }
    100% { height: 26px; }
}

.audio-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.audio-tag {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--color-barrio-light);
    opacity: 0.9;
}

.audio-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-artist {
    font-size: 11px;
    margin: 0;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-progress-container {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 6px;
    position: relative;
    cursor: pointer;
}

.audio-progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--color-barrio-secondary);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.audio-time-info {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    opacity: 0.7;
    margin-top: 2px;
}

.audio-play-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background-color: white;
    color: var(--color-barrio-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
}

.audio-play-btn:hover {
    transform: scale(1.05);
    background-color: var(--color-barrio-light);
}

.audio-play-btn:active {
    transform: scale(0.95);
}

/* Botón de cerrar de la tarjeta */
.audio-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
    margin-left: 2px;
    line-height: 1;
    font-weight: bold;
}

.audio-close-btn:hover {
    color: white;
    transform: scale(1.1);
}



/* ==========================================================================
   ADMIN PANEL - NOTIFICATION BADGES
   ========================================================================== */
.tab-badge {
    background-color: #E03E3E;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    box-shadow: 0 2px 4px rgba(224, 62, 62, 0.3);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
