/* Codeur Coworking - Diseño Mobile-First estilo App Nativa */

:root {
    /* Colores corporativos Inforges - Paleta profesional moderna */
    --primary-color: #0066cc;
    --primary-dark: #0052a3;
    --primary-light: #3385d6;
    --secondary-color: #00a86b;
    --secondary-dark: #008755;
    --accent-color: #ff6b35;
    --danger-color: #e63946;
    --warning-color: #ffb703;
    --info-color: #219ebc;
    
    /* Colores de texto */
    --text-color: #1a1a1a;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --text-white: #ffffff;
    
    /* Fondos con degradados y velos - Estilo moderno */
    --bg-color: rgba(255, 255, 255, 0.95);
    --bg-light: linear-gradient(135deg, #f0f4f8 0%, #e8f0f6 100%);
    --bg-dark: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-input: rgba(255, 255, 255, 0.8);
    --bg-gradient: linear-gradient(135deg, #0066cc 0%, #00a86b 100%);
    --bg-gradient-secondary: linear-gradient(135deg, #219ebc 0%, #0066cc 100%);
    --bg-gradient-accent: linear-gradient(135deg, #ff6b35 0%, #ffb703 100%);
    
    /* Fondos con efectos glassmorphism */
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-dark: rgba(26, 32, 44, 0.7);
    
    /* Bordes y sombras - Más sutiles estilo iOS */
    --border-color: #e2e8f0;
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --border-radius-lg: 20px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px 0 rgba(0, 0, 0, 0.2);
    
    /* Transiciones suaves */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    /* Safe area para iPhone */
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-color);
    background: var(--bg-light);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 80px; /* Espacio para bottom nav */
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fondo interactivo con gradiente animado */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 102, 204, 0.05) 0%, 
        rgba(0, 168, 107, 0.05) 25%,
        rgba(33, 158, 188, 0.05) 50%,
        rgba(0, 102, 204, 0.05) 75%,
        rgba(0, 168, 107, 0.05) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Header estilo app nativa con glassmorphism */
.header {
    background: var(--bg-glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: var(--safe-area-top);
    box-shadow: 0 2px 10px rgba(0, 102, 204, 0.1);
}

.nav {
    max-width: 100%;
    margin: 0;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 60px);
    flex: 1;
    min-width: 0;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    align-items: center;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.875rem;
}

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 102, 204, 0.1);
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0.625rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    width: 40px;
    height: 40px;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle svg {
    width: 24px;
    height: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
}

.nav-toggle-icon-close {
    opacity: 0;
}

.nav-menu.active ~ .nav .nav-toggle .nav-toggle-icon-open {
    opacity: 0;
}

.nav-menu.active ~ .nav .nav-toggle .nav-toggle-icon-close {
    opacity: 1;
}

.nav-toggle:active {
    background: rgba(0, 102, 204, 0.2);
    transform: scale(0.95);
}

/* Bottom Navigation Bar - Estilo app nativa con glassmorphism */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(0, 102, 204, 0.1);
    padding: 0.75rem 0 calc(0.75rem + var(--safe-area-bottom));
    z-index: 1000;
    box-shadow: 0 -2px 15px rgba(0, 102, 204, 0.15);
    display: none;
}

.bottom-nav.active {
    display: flex;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    border-radius: var(--border-radius-sm);
    position: relative;
}

.bottom-nav-item:active {
    transform: scale(0.95);
    background: var(--bg-light);
}

.bottom-nav-item.active {
    color: var(--primary-color);
    background: rgba(0, 102, 204, 0.1);
}

.bottom-nav-item.active .bottom-nav-icon {
    transform: scale(1.1);
}

.bottom-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 102, 204, 0.1);
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
}

.bottom-nav-icon svg {
    width: 20px;
    height: 20px;
}

.bottom-nav-item.active .bottom-nav-icon {
    background: rgba(0, 102, 204, 0.2);
    color: var(--primary-color);
}

.bottom-nav-label {
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Container */
.container {
    max-width: 100%;
    margin: 0;
    padding: 1.25rem;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Cards estilo app nativa con glassmorphism */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bg-gradient);
    opacity: 0;
    transition: var(--transition);
}

.card:hover::after,
.card:active::after {
    opacity: 1;
}

.card:active {
    transform: scale(0.98);
    background: var(--bg-card-hover);
}

.card-header {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--bg-gradient);
    border-radius: 2px;
}

/* Buttons estilo app nativa */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.btn svg {
    flex-shrink: 0;
}

.btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--bg-gradient);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    border: none;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    box-shadow: 0 2px 10px rgba(0, 102, 204, 0.3);
    transform: translateY(0) scale(0.97);
}

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

.btn-danger {
    background: var(--danger-color);
    color: var(--text-white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

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

/* Forms estilo app nativa */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9375rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(0, 102, 204, 0.2);
    border-radius: var(--border-radius-sm);
    font-size: 0.9375rem;
    transition: var(--transition);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-color);
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15);
    transform: translateY(-1px);
}

.form-control:active {
    background: rgba(255, 255, 255, 0.95);
}

.form-select {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1rem;
    border: 2px solid rgba(0, 102, 204, 0.2);
    border-radius: var(--border-radius-sm);
    font-size: 0.9375rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230066cc' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15);
    transform: translateY(-1px);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.875rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.form-check:active {
    background: var(--bg-light);
}

.form-check input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

/* Toast Notifications - Estilo app nativa móvil con glassmorphism */
.toast-container {
    position: fixed;
    top: auto;
    bottom: 100px;
    left: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 100%;
    width: auto;
    pointer-events: none;
}

.toast {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-left: 4px solid;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    min-height: 64px;
}

.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    animation: toastProgress 5s linear forwards;
    opacity: 0.3;
}

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

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

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.toast-success {
    border-left-color: var(--secondary-color);
    color: #065f46;
    background: linear-gradient(135deg, rgba(209, 250, 229, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.toast-error {
    border-left-color: var(--danger-color);
    color: #991b1b;
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.toast-info {
    border-left-color: var(--info-color);
    color: #1e40af;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.toast-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
    line-height: 1;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    font-size: 0.9375rem;
    line-height: 1.5;
    word-wrap: break-word;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: currentColor;
    opacity: 0.5;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.toast-close:active {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.badge svg {
    flex-shrink: 0;
    margin-right: 0.25rem;
}

.badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.badge-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* Lists */
.list {
    list-style: none;
}

.list-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
    transition: var(--transition);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    -webkit-tap-highlight-color: transparent;
}

.list-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

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

/* Grid */
.grid {
    display: grid;
    gap: 1rem;
}

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

.grid-md-4 {
    grid-template-columns: 1fr;
}

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

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-md-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Prevenir overflow horizontal */
* {
    max-width: 100%;
    box-sizing: border-box;
}

img, svg, video, iframe {
    max-width: 100%;
    height: auto;
}

table {
    width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
}

td, th {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Filtros de reservas - Responsive */
.reservations-filters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reservations-filters-main {
    width: 100%;
}

.reservations-filters-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.reservations-filters-buttons .btn {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reservations-filters-buttons .btn.active {
    background: var(--bg-gradient);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

@media (min-width: 640px) {
    .reservations-filters {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .reservations-filters-main {
        width: auto;
    }
    
    .reservations-filters-buttons {
        width: auto;
        flex: 0 0 auto;
    }
    
    .reservations-filters-buttons .btn {
        flex: 0 0 auto;
    }
}

.btn-block-mobile {
    width: 100%;
}

@media (min-width: 640px) {
    .btn-block-mobile {
        width: auto;
    }
}

/* Tarjetas de estadísticas */
.stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-primary .stat-icon {
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
}

.stat-success .stat-icon {
    background: rgba(0, 168, 107, 0.1);
    color: var(--secondary-color);
}

.stat-warning .stat-icon {
    background: rgba(255, 183, 3, 0.1);
    color: var(--warning-color);
}

.stat-info .stat-icon {
    background: rgba(33, 158, 188, 0.1);
    color: var(--info-color);
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-primary .stat-value {
    color: var(--primary-color);
}

.stat-success .stat-value {
    color: var(--secondary-color);
}

.stat-warning .stat-value {
    color: var(--warning-color);
}

.stat-info .stat-value {
    color: var(--info-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Ocupación */
.occupation-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.occupation-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.occupation-name {
    font-weight: 600;
    color: var(--text-color);
}

.occupation-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.occupation-bar {
    height: 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.occupation-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.occupation-percentage {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: right;
}

/* Recursos populares */
.popular-resources {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-resource-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.popular-resource-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popular-resource-name {
    font-weight: 600;
    color: var(--text-color);
}

.popular-resource-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.popular-resource-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.popular-resource-fill {
    height: 100%;
    background: var(--bg-gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Contenedores de gráficos */
.chart-container {
    position: relative;
    height: 300px;
    max-height: 300px;
    width: 100%;
    overflow: hidden;
}

.chart-container-small {
    height: 250px;
    max-height: 250px;
}

.chart-container canvas {
    max-height: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 768px) {
    .chart-container {
        height: 250px;
        max-height: 250px;
    }
    
    .chart-container-small {
        height: 200px;
        max-height: 200px;
    }
}

/* Overlay para menú móvil */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: calc(100vh - 70px);
        background: var(--bg-glass);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        padding: 1rem 0;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-lg);
        z-index: 999;
        overflow-y: auto;
        overflow-x: hidden;
        border-right: 1px solid rgba(0, 102, 204, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        list-style: none;
        width: 100%;
        padding: 0 1rem;
        margin-bottom: 0.5rem;
    }
    
    .nav-menu-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        border-radius: var(--border-radius-sm);
        text-decoration: none;
        color: var(--text-color);
        transition: var(--transition);
        -webkit-tap-highlight-color: transparent;
        word-wrap: break-word;
        overflow-wrap: break-word;
        min-width: 0;
        position: relative;
    }
    
    .nav-menu-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--primary-color);
        border-radius: 0 4px 4px 0;
        opacity: 0;
        transition: opacity 0.2s ease;
    }
    
    .nav-menu-item:hover::before,
    .nav-menu-item:active::before {
        opacity: 1;
    }
    
    .nav-menu-item:active {
        background: rgba(0, 102, 204, 0.1);
        transform: scale(0.98);
        color: var(--primary-color);
    }
    
    .nav-menu-item-danger {
        color: var(--danger-color);
    }
    
    .nav-menu-item-danger:active {
        background: rgba(230, 57, 70, 0.1);
        color: var(--danger-color);
    }
    
    .nav-menu-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(0, 102, 204, 0.1);
        color: var(--primary-color);
        flex-shrink: 0;
    }
    
    .nav-menu-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .nav-menu-text {
        flex: 1;
        min-width: 0;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .nav-menu > li > a:not(.nav-menu-item) {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        border-radius: var(--border-radius-sm);
        word-wrap: break-word;
        overflow-wrap: break-word;
        text-decoration: none;
        color: var(--text-color);
        transition: var(--transition);
        -webkit-tap-highlight-color: transparent;
    }
    
    .nav-menu > li > a:not(.nav-menu-item):active {
        background: rgba(0, 102, 204, 0.1);
        transform: scale(0.98);
        color: var(--primary-color);
    }
    
    .bottom-nav {
        display: flex;
    }
    
    .container {
        padding: 1rem;
    }
    
    .card {
        padding: 1.25rem;
        border-radius: var(--border-radius);
    }
}

/* Tablet */
@media (min-width: 769px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .toast-container {
        top: 20px;
        bottom: auto;
        left: auto;
        right: 20px;
        max-width: 400px;
    }
    
    .toast {
        animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .nav-menu {
        gap: 1rem;
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        box-shadow: none;
        padding: 0;
        flex-direction: row;
    }
    
    .nav-toggle {
        display: none;
    }
    
    .bottom-nav {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
    
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 2rem;
    }
}

/* Títulos */
h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-light);
}

.empty-state-icon {
    margin-bottom: 1.5rem;
    opacity: 0.4;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon svg {
    width: 64px;
    height: 64px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Mejoras de accesibilidad */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

.card {
    animation: fadeIn 0.3s ease;
}

/* Efectos táctiles mejorados */
button, a, .card, .list-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button:active, a:active, .card:active, .list-item:active {
    transform: scale(0.97);
}
