//Estilos para Dashboard y Vistas Principales
//Grupo3: Dashboard del Usuario

/* Layout Principal */
body {
    margin:0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand h1 {
    margin: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-logout {
    background: rgba(244, 67, 54, 0.9);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    background: rgba(244, 67, 54, 1);
    transform: translateY(-1px);
}

.navbar-user {
    font-weight: 500;
    margin-left: 2rem;
}

/* Contenido Principal */
.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 2rem;
}

.welcome-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.welcome-card h2 {
    margin: 0;
    color: #1976d2;
    font-size: 1.8rem;
}

.welcome-card p {
    margin: 0.5rem 0 0;
    color: #666;
}

.membership-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.membership-badge.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.membership-badge.inactive {
    background: #ffebee;
    color: #c62828;
}

.membership-badge.expired {
    background: #fff3e0;
    color: #ef6c00;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 2.5rem;
    background: #1976d2;
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-content h3 {
    margin: 0;
    font-size: 1.8rem;
    color: #1976d2;
}

.stat-content p {
    margin: 0.25rem 0 0;
    color: #666;
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.3rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    border-color: #1976d2;
}

.action-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.action-card h4 {
    margin: 0 0 0.5rem;
    color: #1976d2;
    font-size: 1.1rem;
}

.action-card p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Recent Activity */
.recent-activity {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.activity-header h3 {
    margin: 0;
    color: #333;
}

.view-all {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.view-all:hover {
    text-decoration: underline;
}

.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-info h4 {
    margin: 0 0 0.25rem;
    color: #333;
    font-size: 1rem;
}

.activity-info p {
    margin: 0;
    color: #666;
    font-size: 0.85rem;
}

.activity-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
}

.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-pending {
    background: #fff3e0;
    color: #ef6c00;
}

.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state p {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

/* Next Visit Card */
.next-visit-card {
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.next-visit-card h3 {
    margin: 0;
    font-size: 1.2rem;
}

.next-visit-card p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
}

.next-visit-card .btn-primary {
    background: white;
    color: #1976d2;
}

.next-visit-card .btn-primary:hover {
    background: #f5f5f5;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    background: white;
    padding: 2rem 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    text-align: center;
    font-size: 1.2rem;
    color: #1976d2;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .navbar {
        padding: 1rem;
        flex-wrap: wrap;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .welcome-card {
        padding: 1.5rem;
    }
    
    .action-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand h1 {
        font-size: 1.5rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .welcome-card h2 {
        font-size: 1.5rem;
    }
    
    .quick-actions h3,
    .activity-header h3 {
        font-size: 1.1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card, .action-card, .welcome-card, .recent-activity {
    animation: fadeInUp 0.4s ease-out;
}

.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.3s; }
