/**
 * Imperio Gallístico
 * Estilos personalizados con colores de la Bandera Dominicana
 * Bootstrap 5
 */

:root {
    --rojo-dominicano: #CE1126;
    --azul-dominicano: #002D62;
    --blanco: #FFFFFF;
    --rojo-oscuro: #A00D1E;
    --azul-oscuro: #001F3F;
}

/* Reset básico para móviles */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Asegurar que las imágenes sean responsivas */
img {
    max-width: 100%;
    height: auto;
}

/* Forzar aplicación de estilos en móviles - evitar problemas de caché */
@media screen and (max-width: 768px) {
    html, body {
        width: 100% !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        position: relative !important;
    }
    
    /* Asegurar que Bootstrap se aplique */
    .container-fluid,
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Mejorar el scroll en móvil */
    * {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Asegurar que los enlaces sean fáciles de tocar */
    a {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
    }
    
    /* Prevenir zoom en inputs en iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="date"],
    input[type="time"],
    select,
    textarea {
        font-size: 16px !important;
    }
    
    @media screen and (max-width: 480px) {
        input[type="text"],
        input[type="email"],
        input[type="password"],
        input[type="number"],
        input[type="tel"],
        input[type="date"],
        input[type="time"],
        select,
        textarea {
            font-size: 16px !important;
        }
    }
}

/* Header personalizado */
.bg-custom-header {
    background: linear-gradient(135deg, var(--rojo-dominicano) 0%, var(--azul-dominicano) 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.navbar {
    padding: 0.75rem 0 !important;
}

/* ============================================
   ESTILOS MÓVILES PRINCIPALES - NAVEGACIÓN
   ============================================ */
@media (max-width: 768px) {
    /* Navegación móvil mejorada */
    .navbar {
        padding: 0.5rem 0 !important;
        min-height: 60px !important;
    }
    
    .navbar .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Botón hamburguesa más grande y visible */
    .navbar-toggler {
        padding: 0.5rem 0.75rem !important;
        font-size: 1.5rem !important;
        min-width: 44px !important;
        min-height: 44px !important;
        border: 2px solid rgba(255, 255, 255, 0.5) !important;
        border-radius: 0.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.5) !important;
    }
    
    .navbar-toggler i {
        font-size: 1.5rem !important;
        color: #fff !important;
    }
    
    /* Logo más pequeño en móvil - MUCHO MÁS PEQUEÑO */
    .logo-header {
        height: 35px !important;
        width: 35px !important;
        min-width: 35px !important;
        max-width: 35px !important;
        object-fit: contain !important;
        padding: 2px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 50% !important;
        transition: all 0.3s ease !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
    }
    
    /* Si es un favicon, hacerlo un poco más pequeño */
    .logo-header.logo-favicon {
        height: 32px !important;
        width: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        padding: 3px !important;
        background: rgba(255, 255, 255, 0.15) !important;
    }
    
    /* En pantallas pequeñas (480px) */
    @media (max-width: 480px) {
        .logo-header:not(.logo-favicon) {
            height: 30px !important;
            width: 30px !important;
            min-width: 30px !important;
            max-width: 30px !important;
        }
        
        .logo-header.logo-favicon {
            height: 28px !important;
            width: 28px !important;
            min-width: 28px !important;
            max-width: 28px !important;
        }
        
        .brand-text {
            font-size: 0.7rem !important;
        }
    }
    
    /* En pantallas extra pequeñas (360px) */
    @media (max-width: 360px) {
        .logo-header {
            height: 28px !important;
            width: 28px !important;
            min-width: 28px !important;
            max-width: 28px !important;
        }
        
        .logo-header.logo-favicon {
            height: 26px !important;
            width: 26px !important;
            min-width: 26px !important;
            max-width: 26px !important;
        }
        
        .brand-text {
            font-size: 0.65rem !important;
        }
    }
    
    .navbar-brand {
        font-size: 0.95rem !important;
        padding: 0.25rem 0 !important;
    }
    
    .brand-text {
        font-size: 0.85rem !important;
        display: inline-block !important;
    }
    
    /* Menú desplegable mejorado */
    .navbar-collapse {
        margin-top: 1rem !important;
        padding-top: 1rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    }
    
    .navbar-nav {
        width: 100% !important;
    }
    
    .nav-item {
        width: 100% !important;
        margin-bottom: 0.25rem !important;
    }
    
    .nav-link {
        padding: 0.875rem 1rem !important;
        font-size: 0.95rem !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        border-radius: 0.5rem !important;
        transition: all 0.2s ease !important;
        width: 100% !important;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: rgba(255, 255, 255, 0.25) !important;
        transform: translateX(4px) !important;
    }
    
    .nav-link i {
        margin-right: 0.75rem !important;
        font-size: 1.1rem !important;
        width: 20px !important;
        text-align: center !important;
    }
    
    /* Botones en el menú móvil */
    .navbar-nav .btn {
        width: 100% !important;
        min-height: 44px !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
        margin-bottom: 0.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .navbar-nav .btn i {
        margin-right: 0.5rem !important;
    }
    
    /* Dropdown de usuario en móvil */
    .dropdown-toggle {
        width: 100% !important;
        min-height: 44px !important;
        padding: 0.875rem 1rem !important;
    }
    
    .dropdown-menu {
        width: 100% !important;
        margin-top: 0.5rem !important;
        border-radius: 0.5rem !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        font-size: 0.95rem !important;
    }
    
    .dropdown-item i {
        margin-right: 0.75rem !important;
        width: 20px !important;
        text-align: center !important;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.5rem 0 !important;
    }
    
    .navbar .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--blanco) !important;
}

.logo-header {
    height: 103px;
    width: 103px;
    min-width: 103px;
    max-width: 103px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    display: block !important;
    visibility: visible !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Logo para tablets */
@media (max-width: 992px) and (min-width: 769px) {
    .logo-header {
        height: 70px !important;
        width: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
    }
    
    .brand-text {
        font-size: 1.1rem !important;
    }
}

.brand-text {
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.navbar-brand i.bi-trophy-fill {
    font-size: 1.8rem;
    color: #FFD700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blanco) !important;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

/* Botones personalizados */
.btn-primary {
    background-color: var(--azul-dominicano) !important;
    border-color: var(--azul-dominicano) !important;
}

.btn-primary:hover {
    background-color: var(--azul-oscuro) !important;
    border-color: var(--azul-oscuro) !important;
}

.btn-danger {
    background-color: var(--rojo-dominicano) !important;
    border-color: var(--rojo-dominicano) !important;
}

.btn-danger:hover {
    background-color: var(--rojo-oscuro) !important;
    border-color: var(--rojo-oscuro) !important;
}

/* Cards con gradiente */
.card-gradient-header {
    background: linear-gradient(135deg, var(--rojo-dominicano), var(--azul-dominicano));
    color: var(--blanco);
    padding: 1rem 1.5rem;
    border-radius: 0.375rem 0.375rem 0 0;
}

.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    background: #fff;
}

.card .ratio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 1.75rem;
}

.card-footer {
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.card-header h2 {
    color: var(--blanco);
    margin: 0;
}

/* Tablas personalizadas */
.table > thead {
    background: linear-gradient(135deg, var(--rojo-dominicano), var(--azul-dominicano)) !important;
    color: #FFFFFF !important;
}

.table > thead > tr {
    background: linear-gradient(135deg, var(--rojo-dominicano), var(--azul-dominicano)) !important;
}

.table > thead > tr > th {
    border-color: transparent !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    padding: 0.75rem !important;
    font-size: 0.95rem !important;
}

.table thead th {
    color: #FFFFFF !important;
    background: linear-gradient(135deg, var(--rojo-dominicano), var(--azul-dominicano)) !important;
}

.table > tbody > tr > td {
    color: #212529 !important;
    background-color: #fff !important;
    vertical-align: middle;
    padding: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.table > tbody > tr {
    background-color: #fff !important;
}

.table-hover > tbody > tr:hover {
    background-color: rgba(206, 17, 38, 0.05) !important;
}

.table-hover > tbody > tr {
    transition: transform 0.2s ease;
}

.table-hover > tbody > tr:hover {
    transform: translateY(-2px);
    background-color: rgba(206, 17, 38, 0.08) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

/* Enlaces y botones en tabla */
.table > tbody > tr > td a {
    color: inherit !important;
    text-decoration: none;
}

.table > tbody > tr > td .btn {
    color: #fff !important;
}

.table > tbody > tr > td .badge {
    color: #fff !important;
}

/* Miniaturas de fotos en tabla */
.table img.img-thumbnail {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid rgba(0, 45, 98, 0.2);
}

.table img.img-thumbnail:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 45, 98, 0.3);
    z-index: 10;
    position: relative;
}

/* Modal de imagen */
#imagenModal .modal-body img {
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Badges personalizados */
.badge.bg-primary {
    background-color: var(--azul-dominicano) !important;
}

.badge.bg-danger {
    background-color: var(--rojo-dominicano) !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: var(--azul-dominicano) !important;
}

/* Estadísticas con gradiente */
.stat-card {
    background: linear-gradient(135deg, var(--rojo-dominicano), var(--azul-dominicano));
    color: var(--blanco);
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.1rem;
    margin: 0;
}

/* Formularios */
.form-label {
    color: var(--azul-dominicano);
    font-weight: 500;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--azul-dominicano);
    box-shadow: 0 0 0 0.25rem rgba(0, 45, 98, 0.25);
}

.form-control,
.form-select,
.form-control-file,
input[type="file"] {
    border-radius: 0.65rem;
    min-height: 2.75rem;
}

textarea.form-control {
    min-height: 6rem;
}

/* Alertas personalizadas */
.alert-custom-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-custom-error {
    background-color: #f8d7da;
    border-color: var(--rojo-dominicano);
    color: #721c24;
    border-left: 4px solid var(--rojo-dominicano);
}

/* Modales */
.modal-header {
    background: linear-gradient(135deg, var(--rojo-dominicano), var(--azul-dominicano));
    color: var(--blanco);
    border-bottom: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-title {
    color: var(--blanco) !important;
}

/* Fondo body */
body {
    background: linear-gradient(135deg, #F5F5F5 0%, #E8E8E8 100%) !important;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
}

.page-section {
    padding: 1.5rem 0;
}

/* Títulos */
h1, h2, h3, h4, h5, h6 {
    color: var(--azul-dominicano);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Accesos rápidos */
.quick-access {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
}

.quick-access .btn {
    min-width: 200px;
    border-radius: 0.75rem;
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive - Tablets y móviles grandes */
@media (max-width: 992px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .page-section {
        padding: 1rem 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-xl {
        max-width: calc(100% - 2rem);
    }
    
    /* Tablas responsive stack para tablets - solo si tienen data-label */
    .table-responsive table tbody td[data-label] {
        position: relative;
    }
    
    .table-responsive table tbody td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--azul-dominicano);
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }
    
    .table-responsive table tbody td[data-label] > * {
        display: block;
    }
}

/* Responsive - Tablets */
@media (max-width: 768px) {
    .logo-header {
        height: 86px;
        width: 86px;
        min-width: 86px;
    }
    
    .stat-card {
        padding: 1rem 0.75rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }
    
    .stat-card p {
        font-size: 0.8rem;
    }
    
    .quick-access {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .quick-access .btn {
        width: 100%;
        min-width: auto;
    }

    .card-body {
        padding: 1.25rem;
    }

    .table-responsive {
        border-radius: 0.75rem;
        box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .form-control,
    .form-select {
        font-size: 0.95rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Modales responsivos */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-body .row {
        margin: 0;
    }
    
    .modal-body .col-md-4,
    .modal-body .col-md-6,
    .modal-body .col-md-8 {
        margin-bottom: 1rem;
    }
}

/* Responsive - Móviles */
@media (max-width: 576px) {
    /* Asegurar que el body tenga estilos base */
    body {
        background: linear-gradient(135deg, #fafafa 0%, #eaeaea 100%) !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Reset de márgenes y padding en móvil */
    * {
        box-sizing: border-box !important;
    }
    
    .navbar-brand {
        font-size: 1rem !important;
    }
    
    .brand-text {
        font-size: 0.9rem !important;
        display: inline-block !important;
    }
    
    .logo-header {
        height: 78px !important;
        width: 78px !important;
        min-width: 78px !important;
        display: block !important;
        visibility: visible !important;
    }
    
    .navbar-brand i.bi-trophy-fill {
        font-size: 1.5rem !important;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
    }

    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .page-section {
        padding: 0.5rem 0 !important;
    }
    
    .mt-4 {
        margin-top: 1rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }

    /* Estadísticas más compactas en móvil */
    .stat-card {
        padding: 0.75rem 0.5rem !important;
        margin-bottom: 0.75rem !important;
        border-radius: 0.5rem !important;
        background: linear-gradient(135deg, var(--rojo-dominicano), var(--azul-dominicano)) !important;
        color: var(--blanco) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        width: 100% !important;
    }
    
    .stat-card h3 {
        font-size: 1.5rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.2 !important;
        color: var(--blanco) !important;
        font-weight: bold !important;
    }
    
    .stat-card p {
        font-size: 0.75rem !important;
        margin: 0 !important;
        line-height: 1.3 !important;
        color: var(--blanco) !important;
    }
    
    .stat-card p i {
        font-size: 0.7rem !important;
        margin-right: 0.3rem !important;
        color: var(--blanco) !important;
    }
    
    /* Reducir espaciado entre tarjetas en móvil */
    .row.g-4 {
        --bs-gutter-y: 0.75rem !important;
        --bs-gutter-x: 0.75rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Asegurar que las columnas ocupen todo el ancho en móvil */
    .row.g-4 > [class*="col-"] {
        padding-left: 0.375rem !important;
        padding-right: 0.375rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* En móvil, mostrar 2 estadísticas por fila */
    @media (max-width: 576px) {
        .row.g-4 > .col-sm-6 {
            flex: 0 0 50% !important;
            max-width: 50% !important;
        }
        
        .stat-card {
            padding: 0.6rem 0.4rem !important;
            margin-bottom: 0.5rem !important;
        }
        
        .stat-card h3 {
            font-size: 1.3rem !important;
        }
        
        .stat-card p {
            font-size: 0.7rem !important;
        }
    }

    /* Accesos rápidos optimizados para móvil */
    .quick-access {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }
    
    .quick-access .btn {
        width: 100% !important;
        margin-bottom: 0 !important;
        padding: 0.875rem 1rem !important;
        min-height: 48px !important;
        font-size: 0.95rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 0.5rem !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        transition: all 0.2s ease !important;
    }
    
    .quick-access .btn:active {
        transform: scale(0.98) !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
    }
    
    .quick-access .btn i {
        margin-right: 0.5rem !important;
        font-size: 1.1rem !important;
    }
    
    .quick-access .btn:last-child {
        margin-bottom: 0 !important;
    }

    .card {
        border: none !important;
        border-radius: 0.75rem !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
        overflow: hidden !important;
        background: #fff !important;
        margin-bottom: 1rem !important;
    }

    .card-body {
        padding: 1rem !important;
    }
    
    /* Card de accesos rápidos */
    .card .card-body {
        padding: 1rem 0.75rem !important;
    }
    
    @media (max-width: 480px) {
        .card .card-body {
            padding: 0.875rem 0.5rem !important;
        }
    }

    .card-gradient-header {
        padding: 0.75rem 1rem !important;
        background: linear-gradient(135deg, var(--rojo-dominicano), var(--azul-dominicano)) !important;
        color: var(--blanco) !important;
    }

    .card-title {
        font-size: 1.1rem !important;
        color: var(--blanco) !important;
        margin: 0 !important;
    }
    
    h1 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
        color: var(--azul-dominicano) !important;
        font-weight: bold !important;
    }
    
    h2 {
        font-size: 1.1rem !important;
        color: var(--azul-dominicano) !important;
        font-weight: bold !important;
        margin-bottom: 0.75rem !important;
    }
    
    .card-title {
        font-size: 1.1rem !important;
    }

    .table {
        font-size: 0.85rem !important;
        min-width: 100% !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }
    
    .table thead {
        display: none !important;
    }
    
    .table tbody tr {
        display: block !important;
        width: 100% !important;
        margin-bottom: 0.75rem !important;
        padding: 0.75rem !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        border-radius: 0.5rem !important;
        background: #fff !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    }
    
    .table tbody td {
        display: block !important;
        width: 100% !important;
        padding: 0.5rem 0 !important;
        border: none !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        text-align: left !important;
    }
    
    .table tbody td:last-child {
        border-bottom: none !important;
    }
    
    .table tbody td[data-label]::before {
        content: attr(data-label) ": " !important;
        font-weight: 600 !important;
        color: var(--azul-dominicano) !important;
        display: inline-block !important;
        margin-right: 0.5rem !important;
        font-size: 0.8rem !important;
    }
    
    .table tbody td[data-label] {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
    }
    
    .table tbody td[data-label] .badge {
        margin-left: auto !important;
    }
    
    /* Footer de cards optimizado */
    .card-footer {
        padding: 0.75rem !important;
        background: #fff !important;
        border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
    }
    
    .card-footer.text-end {
        text-align: center !important;
    }
    
    .card-footer .btn {
        width: 100% !important;
        min-height: 44px !important;
    }
    
    @media (min-width: 768px) {
        .card-footer .btn.w-md-auto {
            width: auto !important;
        }
        
        .card-footer.text-end {
            text-align: right !important;
        }
    }
    
    /* Tablas en modo stack para móviles */
    .table-responsive {
        overflow-x: visible;
    }
    
    .table-responsive table {
        display: block;
        width: 100%;
    }
    
    .table-responsive thead {
        display: none;
    }
    
    .table-responsive tbody {
        display: block;
        width: 100%;
    }
    
    .table-responsive tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
        padding: 1rem;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 0.5rem;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .table-responsive tbody tr:last-child {
        margin-bottom: 0;
    }
    
    .table-responsive tbody td {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        text-align: left !important;
    }
    
    .table-responsive tbody td:last-child {
        border-bottom: none;
    }
    
    .table-responsive tbody td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--azul-dominicano);
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }
    
    .table-responsive tbody td[data-label="Acciones"] {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 0.75rem;
    }
    
    .table-responsive tbody td[data-label="Acciones"]::before {
        margin-bottom: 0.5rem;
    }
    
    .table-responsive tbody td[data-label="Acciones"] .btn {
        width: 100%;
    }
    
    .table-responsive tbody td.text-center {
        text-align: left !important;
    }
    
    .table img.img-thumbnail {
        width: 80px !important;
        height: 80px !important;
        margin: 0 auto;
        display: block;
    }
    
    /* Formularios en móvil */
    .form-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.25rem !important;
        color: var(--azul-dominicano) !important;
        font-weight: 500 !important;
        display: block !important;
    }
    
    /* Formularios optimizados para móvil - mínimo 44px */
    .form-control,
    .form-select {
        font-size: 1rem !important;
        padding: 0.75rem 1rem !important;
        min-height: 44px !important;
        border-radius: 0.65rem !important;
        border: 2px solid #ced4da !important;
        width: 100% !important;
        display: block !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
    }
    
    .form-select {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
        background-repeat: no-repeat !important;
        background-position: right 0.75rem center !important;
        background-size: 16px 12px !important;
        padding-right: 2.5rem !important;
    }
    
    .form-control:focus,
    .form-select:focus {
        border-color: var(--azul-dominicano) !important;
        box-shadow: 0 0 0 0.25rem rgba(0, 45, 98, 0.25) !important;
        outline: none !important;
    }
    
    textarea.form-control {
        min-height: 5rem !important;
    }
    
    /* Botones optimizados para toque móvil - mínimo 44px */
    .btn {
        font-size: 0.95rem !important;
        padding: 0.75rem 1.25rem !important;
        border-radius: 0.5rem !important;
        font-weight: 500 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        cursor: pointer !important;
        min-height: 44px !important;
        min-width: 44px !important;
        transition: all 0.2s ease !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
    }
    
    .btn:active {
        transform: scale(0.98) !important;
    }
    
    .btn-lg {
        font-size: 1rem !important;
        padding: 0.875rem 1.5rem !important;
        min-height: 48px !important;
    }
    
    .btn-sm {
        font-size: 0.85rem !important;
        padding: 0.5rem 0.875rem !important;
        min-height: 40px !important;
    }
    
    .btn i {
        margin-right: 0.5rem !important;
        font-size: 1rem !important;
    }
    
    .btn-primary {
        background-color: var(--azul-dominicano) !important;
        border-color: var(--azul-dominicano) !important;
        color: #fff !important;
    }
    
    .btn-danger {
        background-color: var(--rojo-dominicano) !important;
        border-color: var(--rojo-dominicano) !important;
        color: #fff !important;
    }
    
    /* Modales en móvil */
    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 0.75rem;
    }
    
    .modal-body .col-md-4,
    .modal-body .col-md-6,
    .modal-body .col-md-8 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .modal-body img {
        max-height: 200px;
        width: auto;
    }
    
    .modal-footer {
        padding: 0.75rem;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-footer .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Galería de fotos en móvil */
    .col-md-3 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Inputs de búsqueda y filtros */
    .input-group {
        flex-direction: column;
    }
    
    .input-group .form-control,
    .input-group .form-select {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .input-group-text {
        width: 100%;
        justify-content: center;
    }
    
    /* Asegurar que las alertas se vean bien */
    .alert {
        padding: 0.75rem 1rem !important;
        margin-bottom: 1rem !important;
        border-radius: 0.5rem !important;
        font-size: 0.9rem !important;
    }
    
    .alert-custom-success,
    .alert-custom-error {
        border-left-width: 4px !important;
    }
    
    /* Asegurar que los badges se vean bien */
    .badge {
        font-size: 0.75rem !important;
        padding: 0.35em 0.65em !important;
        border-radius: 0.25rem !important;
    }
    
    /* Asegurar que los modales se vean bien */
    .modal-content {
        border-radius: 0.5rem !important;
        border: none !important;
    }
    
    /* Asegurar que los dropdowns funcionen */
    .dropdown-menu {
        font-size: 0.9rem !important;
        border-radius: 0.5rem !important;
    }
    
    /* Asegurar que los inputs de búsqueda se vean bien */
    .input-group {
        width: 100% !important;
    }
    
    /* Asegurar que las filas de grid funcionen */
    .row {
        margin-left: -0.375rem !important;
        margin-right: -0.375rem !important;
        width: calc(100% + 0.75rem) !important;
    }
    
    .row > * {
        padding-left: 0.375rem !important;
        padding-right: 0.375rem !important;
    }
    
    /* Asegurar que col-12 ocupe todo el ancho */
    .col-12 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-left: 0.375rem !important;
        padding-right: 0.375rem !important;
    }
    
    /* Mejorar espaciado general en móvil */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    /* Asegurar que las imágenes sean responsivas */
    img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Mejorar la legibilidad del texto */
    p {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
    
    /* Asegurar que los badges sean visibles */
    .badge {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.6rem !important;
        min-height: 24px !important;
        display: inline-flex !important;
        align-items: center !important;
    }
}


/* Tabla VS centrado */
.table .vs-cell {
    text-align: center;
    font-weight: bold;
    color: var(--rojo-dominicano);
    font-size: 1.2rem;
}

/* Iconos en botones */
.btn i {
    margin-right: 0.5rem;
}


/* Marketplace público */
.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

@media (max-width: 768px) {
    .text-white-75,
    .text-white-50 {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
}

.store-hero {
    background: linear-gradient(135deg, var(--azul-dominicano), var(--rojo-dominicano)) !important;
    padding: 3rem 0 !important;
    color: #fff !important;
    position: relative;
    overflow: hidden;
    width: 100% !important;
}

.store-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.2), transparent 60%);
}

@media (max-width: 768px) {
    /* Sección Hero optimizada para móvil */
    .store-hero {
        padding: 1.5rem 0 !important;
        min-height: auto !important;
    }
    
    .store-hero .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
    }
    
    .store-hero .row {
        margin: 0 !important;
        --bs-gutter-y: 1.5rem !important;
    }
    
    .store-hero .col-lg-7,
    .store-hero .col-lg-5 {
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .store-hero .col-lg-5:last-child {
        margin-bottom: 0 !important;
    }
    
    .store-hero p.text-uppercase {
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
        letter-spacing: 0.05em !important;
    }
    
    .store-hero h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
        font-weight: 700 !important;
    }
    
    .store-hero p.text-white-75 {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1.25rem !important;
    }
    
    .store-hero .d-flex {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .store-hero .btn {
        width: 100% !important;
        margin-bottom: 0 !important;
        padding: 0.875rem 1.25rem !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        border-radius: 0.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 48px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }
    
    .store-hero .btn:active {
        transform: scale(0.98) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
    }
    
    .store-hero .btn i {
        margin-right: 0.5rem !important;
        font-size: 1.1rem !important;
    }
    
    .store-hero .btn-lg {
        padding: 0.875rem 1.25rem !important;
        font-size: 0.95rem !important;
        min-height: 48px !important;
    }
    
    /* Card de hero en móvil */
    .store-hero-card {
        margin-top: 1rem !important;
        padding: 1.25rem !important;
    }
    
    .store-hero-card h5 {
        font-size: 1.1rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .store-hero-card small {
        font-size: 0.85rem !important;
    }
    
    .store-hero-card ul {
        margin-top: 1rem !important;
    }
    
    .store-hero-card li {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        padding-left: 0.25rem !important;
    }
    
    .store-hero-icon {
        font-size: 2rem !important;
    }
}

.store-hero-card {
    background: #fff !important;
    border-radius: 1rem !important;
    padding: 1.5rem !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
    margin-top: 1.5rem !important;
}

@media (max-width: 768px) {
    .store-hero-card {
        padding: 1.25rem !important;
        margin-top: 1rem !important;
        border-radius: 0.75rem !important;
    }
    
    .store-hero-card h5 {
        font-size: 1.1rem !important;
    }
    
    .store-hero-card small {
        font-size: 0.85rem !important;
    }
    
    .store-hero-card ul {
        margin-top: 1rem !important;
    }
    
    .store-hero-card li {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
}

.store-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 45, 98, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--azul-dominicano);
}

.marketplace-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.marketplace-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
}

.marketplace-card-image {
    position: relative;
    padding-top: 65%;
    overflow: hidden;
}

.marketplace-card-image img,
.marketplace-card-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marketplace-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f2f2;
    font-size: 2rem;
    color: #9aa0a6;
}

.marketplace-card-image .badge {
    position: absolute;
    top: 12px;
    right: 12px;
}

.marketplace-card-image .disponibilidad {
    top: auto;
    bottom: 12px;
    right: 12px;
}

.estado-nuevo { background-color: #0d6efd; }
.estado-seminuevo { background-color: #20c997; }
.estado-usado { background-color: #6c757d; }

.disponibilidad.disp-disponible { background-color: #198754; }
.disponibilidad.disp-reservado { background-color: #ffc107; color: #000; }
.disponibilidad.disp-vendido { background-color: #6c757d; }

.marketplace-card-body {
    padding: 1.5rem;
}

.marketplace-card-description {
    color: #5f6368;
    font-size: 0.95rem;
}

.marketplace-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--azul-dominicano);
}

.marketplace-card-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: #fafbfc;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 45, 98, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--azul-dominicano);
}

.marketplace-preview img {
    max-height: 220px;
    object-fit: cover;
}

.btn-store-access {
    background: linear-gradient(135deg, #198754, #20c997);
    border: none;
}

.btn-store-access:hover {
    filter: brightness(1.05);
}

.store-nav-btn {
    min-width: 140px;
    font-weight: 600;
}

.navbar .store-nav-btn i {
    margin-right: 0.25rem;
}

@media (max-width: 768px) {
    .marketplace-card-body,
    .marketplace-card-footer {
        padding: 1rem !important;
    }

    body {
        background: #f7f8fb !important;
    }
    
    /* Contenedor principal en móvil */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .container.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .card {
        border-radius: 1rem !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
    }
    
    .card-header {
        padding: 1rem !important;
        background: #fff !important;
    }
    
    .card-header form {
        margin: 0 !important;
    }
    
    .card-header .row {
        margin: 0 !important;
        --bs-gutter-x: 0 !important;
        --bs-gutter-y: 1rem !important;
    }
    
    .card-header .col-lg-6,
    .card-header .col-lg-4,
    .card-header .col-lg-2 {
        width: 100% !important;
        margin-bottom: 1rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .card-header .col-lg-2:last-child {
        margin-bottom: 0 !important;
    }
    
    .card-header .btn {
        width: 100% !important;
        padding: 0.875rem 1rem !important;
        min-height: 44px !important;
        font-size: 0.95rem !important;
    }
    
    /* Cards del marketplace en móvil */
    .marketplace-card {
        margin-bottom: 1.5rem !important;
    }
    
    .marketplace-card-body {
        padding: 1rem !important;
    }
    
    .marketplace-card-body h5 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .marketplace-card-footer {
        padding: 1rem !important;
    }
    
    .marketplace-card-footer .btn {
        width: 100% !important;
        min-height: 44px !important;
        margin-bottom: 0.5rem !important;
    }
    
    .marketplace-card-footer .btn:last-child {
        margin-bottom: 0 !important;
    }

    .stat-card {
        margin-bottom: 0.5rem !important;
        padding: 0.9rem 0.6rem !important;
        border-radius: 0.6rem !important;
    }

    .stat-card h3 {
        font-size: 1.4rem !important;
        margin-bottom: 0.3rem !important;
    }

    .stat-card p {
        font-size: 0.75rem !important;
    }

    .quick-access .btn {
        width: 100% !important;
        min-width: auto !important;
        border-radius: 0.85rem !important;
        padding: 0.85rem 1rem !important;
        font-size: 1rem !important;
        box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
    }

    .quick-access .btn i {
        font-size: 1rem !important;
        margin-right: 0.4rem !important;
    }

    .navbar-brand {
        font-size: 1.1rem !important;
    }

    h1,
    h2 {
        font-size: 1.5rem !important;
    }
    
    /* Mejorar formularios de búsqueda en móvil */
    .form-label {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
    }
    
    .form-control,
    .form-select {
        width: 100% !important;
        padding: 0.75rem !important;
        font-size: 0.95rem !important;
        border-radius: 0.5rem !important;
    }
}