/* ==================== Variables y Reset ==================== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-muted: #a0aec0;
    
    --border-color: #e2e8f0;
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --border-radius-lg: 24px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ==================== Dashboard Wrapper ==================== */
.dashboard-wrapper {
    min-height: 100vh;
    padding-bottom: 60px;
}

/* ==================== Modern Navbar ==================== */
.modern-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.brand-logo:hover {
    background: var(--bg-tertiary);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-tagline {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.user-button:hover {
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.admin-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.modern-dropdown {
    margin-top: 10px !important;
    border-radius: var(--border-radius-sm) !important;
    border: none !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 8px !important;
}

.modern-dropdown ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: var(--transition);
    color: var(--text-primary);
}

.modern-dropdown ul li a:hover {
    background: var(--bg-tertiary);
}

.logout-link {
    color: #e53e3e !important;
}

/* ==================== Hero Section con Estadísticas ==================== */
.hero-section {
    padding: 40px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    margin: 0 !important;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent-color) 0%, color-mix(in srgb, var(--accent-color) 80%, transparent) 100%);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== Main Content ==================== */
.main-content {
    padding: 40px 0;
}

/* ==================== Alertas Modernas ==================== */
.modern-alert {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    animation: slideInDown 0.3s ease;
}

.modern-alert.success {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    color: #155724;
}

.modern-alert.error {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #721c24;
}

.alert-icon {
    flex-shrink: 0;
}

.alert-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.alert-content p {
    margin: 0;
    font-size: 14px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== Section Headers ==================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.title-icon {
    background: var(--primary-gradient);
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 8px 0 0 60px;
}

.file-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 12px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
}

/* ==================== Upload Section ==================== */
.upload-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.upload-zone {
    border: 3px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.upload-zone.drag-over {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: scale(1.02);
}

.upload-zone.file-selected {
    border-color: #48bb78;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.05) 0%, rgba(56, 178, 172, 0.05) 100%);
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.upload-icon-wrapper > span {
    color: #667eea;
    filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.3));
}

.upload-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

.upload-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.upload-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

.upload-formats {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.format-badge {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.upload-limit {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.upload-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 32px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 24px;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.upload-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
}

.upload-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== Files Section ==================== */
.files-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.view-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.view-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

/* ==================== File Cards ==================== */
.files-grid {
    margin: 0 !important;
}

.file-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.file-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.file-preview {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.file-card:hover .preview-image {
    transform: scale(1.1);
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.file-card:hover .preview-overlay {
    opacity: 1;
}

.preview-btn {
    width: 56px;
    height: 56px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    color: #667eea;
}

.preview-btn:hover {
    transform: scale(1.1);
}

.file-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
    color: var(--text-muted);
}

.file-extension {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.file-info {
    padding: 20px;
    flex: 1;
}

.file-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.file-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.file-actions {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.action-btn {
    flex: 1;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.action-btn.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.action-btn.danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    color: var(--text-muted);
    margin-bottom: 24px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 32px 0;
}

.empty-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.empty-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* ==================== Lightbox ==================== */
.lightbox-content {
    width: 100%;
    height: 100vh;
    padding: 40px;
}

.lightbox-content img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
}

/* ==================== Responsive ==================== */
@media (max-width: 960px) {
    .stats-grid > div {
        width: 100%;
    }
    
    .stat-card {
        padding: 24px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .upload-section,
    .files-section {
        padding: 24px;
    }
    
    .file-actions {
        flex-wrap: wrap;
    }
    
    .action-btn {
        min-width: calc(50% - 4px);
    }
}

/* ==================== Admin Styles ==================== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.admin-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.admin-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.admin-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.admin-badge span[uk-icon] {
    color: white;
}

.nav-link-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.nav-link-btn:hover {
    background: var(--bg-tertiary);
}

.nav-link-btn.logout {
    color: #e53e3e;
}

.admin-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* ==================== Modern Tables ==================== */
.modern-table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.modern-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modern-table thead th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.modern-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.modern-table tbody tr:last-child {
    border-bottom: none;
}

.modern-table tbody td {
    padding: 16px 20px;
}

.table-cell-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cell-badge {
    display: inline-flex;
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.user-name-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.role-badge.admin {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #fff;
}

.role-badge.user {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.file-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 300px;
}

.file-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-icon-cell {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.file-name-cell {
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-actions {
    gap: 4px;
}

.table-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
}

.table-action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.table-action-btn.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.table-action-btn.danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.table-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ==================== Auth Pages ==================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-branding {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.branding-content {
    position: relative;
    z-index: 1;
}

.branding-logo {
    text-align: center;
    margin-bottom: 60px;
}

.logo-circle {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.branding-logo h1 {
    color: white;
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.branding-logo p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.feature-text h4 {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.feature-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 0;
}

.auth-form-container {
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-form-content {
    width: 100%;
    max-width: 400px;
}

.auth-header {
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.auth-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 24px;
}

.auth-alert.error {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #721c24;
}

.auth-alert.success {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    color: #155724;
}

.auth-alert p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    transition: var(--transition);
    background: white;
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 32px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
    transition: var(--transition);
}

.auth-link:hover {
    gap: 10px;
    color: #764ba2;
}

/* Responsive Auth */
@media (max-width: 960px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .auth-branding {
        display: none;
    }
    
    .auth-form-container {
        padding: 40px 30px;
    }
}

/* ==================== Navbar Mejorada ==================== */
.modern-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.brand-logo:hover {
    background: var(--bg-tertiary);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-tagline {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid transparent;
}

.nav-link-btn:hover {
    background: var(--bg-tertiary);
}

.nav-link-btn.primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.nav-link-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.nav-link-btn.secondary {
    border-color: var(--border-color);
}

.nav-link-btn.secondary:hover {
    border-color: #667eea;
    color: #667eea;
}

.nav-text {
    font-size: 14px;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    padding: 15px 15px!important;
    margin-right: 20px;
}

.user-button:hover {
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    margin-right: 10px;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.admin-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-left: 10px;
}

.chevron-icon {
    color: var(--text-muted);
    transition: var(--transition);
}

.user-button:hover .chevron-icon {
    transform: translateY(2px);
}

/* Dropdown Mejorado */
.modern-dropdown {
    margin-top: 10px !important;
    border-radius: var(--border-radius-sm) !important;
    border: none !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 8px !important;
    min-width: 280px !important;
}

.dropdown-header {
    padding: 12px 16px !important;
    margin-bottom: 8px;
}

.dropdown-user-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.dropdown-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-text strong {
    font-size: 15px;
    color: var(--text-primary);
}

.dropdown-text span {
    font-size: 13px;
    color: var(--text-secondary);
}

.modern-dropdown ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: var(--transition);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.modern-dropdown ul li a:hover {
    background: var(--bg-tertiary);
}

.logout-link {
    color: #e53e3e !important;
}

.logout-link:hover {
    background: rgba(229, 62, 62, 0.1) !important;
}

/* Navbar para Auth Pages */
.auth-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
}

.auth-navbar .modern-navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-navbar .brand-name,
.auth-navbar .brand-tagline,
.auth-navbar .nav-text {
    color: white;
}

.auth-navbar .logo-icon {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.auth-navbar .nav-link-btn {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.auth-navbar .nav-link-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.auth-navbar .nav-link-btn.primary {
    background: white;
    color: #667eea;
}

.auth-wrapper {
    padding-top: 80px; /* Espacio para navbar fija */
}

/* Responsive Navbar */
@media (max-width: 960px) {
    .brand-text {
        display: none;
    }
    
    .nav-text {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .nav-link-btn {
        padding: 10px 12px;
    }
    
    .modern-dropdown {
        min-width: 240px !important;
    }
}

@media (max-width: 640px) {
    .brand-logo {
        padding: 8px 12px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    .dropdown-avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}


/* ==================== Navbar Mejorada ==================== */
.modern-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.brand-logo:hover {
    background: var(--bg-tertiary);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-tagline {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Botones de navegación */
.nav-link-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid transparent;
}

.nav-link-btn:hover {
    background: var(--bg-tertiary);
}

.nav-link-btn.primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.nav-link-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.nav-link-btn.secondary {
    border-color: var(--border-color);
}

.nav-link-btn.secondary:hover {
    border-color: #667eea;
    color: #667eea;
}

.nav-text {
    font-size: 14px;
}

/* Menú de Usuario */
.user-menu {
    margin: 0;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 6px;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
}

.user-button:hover {
    background: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.admin-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    flex-shrink: 0;
    padding: 0 6px;
}

.chevron-icon {
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.user-button:hover .chevron-icon {
    transform: translateY(2px);
    color: #667eea;
}

/* Dropdown Mejorado */
.modern-dropdown {
    margin-top: 10px !important;
    border-radius: var(--border-radius-sm) !important;
    border: none !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 8px !important;
    min-width: 280px !important;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 12px 16px !important;
    margin-bottom: 8px;
}

.dropdown-user-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.dropdown-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.dropdown-text strong {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 700;
}

.dropdown-text span {
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-dropdown ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: var(--transition);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.modern-dropdown ul li a:hover {
    background: var(--bg-tertiary);
}

.logout-link {
    color: #e53e3e !important;
}

.logout-link:hover {
    background: rgba(229, 62, 62, 0.1) !important;
}

/* Responsive Navbar */
@media (max-width: 960px) {
    .brand-text {
        display: none;
    }
    
    .nav-text {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .chevron-icon {
        display: none;
    }
    
    .user-button {
        padding: 6px;
        border-radius: 50%;
        min-width: 52px;
        height: 52px;
        justify-content: center;
    }
    
    .nav-link-btn {
        padding: 10px 12px;
    }
    
    .modern-dropdown {
        min-width: 240px !important;
    }
}

@media (max-width: 640px) {
    .brand-logo {
        padding: 8px 12px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    .dropdown-avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .admin-badge {
        min-width: 22px;
        height: 22px;
    }
}

/* ==================== Preview Container ==================== */
.preview-container {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.preview-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.preview-title span[uk-icon] {
    color: #48bb78;
}

.change-file-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.change-file-btn:hover {
    background: white;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.preview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.preview-visual {
    position: relative;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    overflow: hidden;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

.preview-item {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#imagePreview img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pdf-preview-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #e53e3e;
}

.pdf-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

.generic-file-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
    color: var(--text-muted);
}

.file-type-label {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    padding: 8px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 160px;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
    max-width: 280px;
}

/* Responsive Preview */
@media (max-width: 960px) {
    .preview-content {
        grid-template-columns: 1fr;
    }
    
    .preview-visual {
        min-height: 250px;
    }
    
    .info-value {
        max-width: 200px;
    }
    
    .change-file-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}