/* Custom Variables - Olimpiadas Especiales Chile */
:root {
    --primary-color: #dc2626; /* Rojo oficial */
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #1e40af; /* Azul oficial */
    --olympic-red: #dc2626; /* Rojo Olimpiadas Especiales */
    --olympic-blue: #1e40af; /* Azul Olimpiadas Especiales */
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --sidebar-width: 280px;
    --topbar-height: 70px;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f1f5f9;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: white;
    color: #374151;
    border-right: 1px solid #e5e7eb;
    transform: translateX(0);
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.sidebar-brand i {
    font-size: 1.5rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background-color: #f3f4f6;
    color: #dc2626;
}

.sidebar-menu {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #6b7280;
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-menu .nav-link:hover {
    color: #dc2626;
    background-color: #fef2f2;
    border-left-color: #dc2626;
}

.sidebar-menu .nav-link.active {
    color: #dc2626;
    background-color: #fef2f2;
    border-left-color: #dc2626;
    font-weight: 600;
}

.sidebar-menu .nav-link i {
    font-size: 1.125rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar i {
    font-size: 2rem;
    opacity: 0.8;
}

.user-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.user-email {
    font-size: 0.75rem; /* más pequeño */
    opacity: 0.7;       /* un poco difuminado */
    color: #555;        /* gris suave */
}


.user-role {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* Top Navigation */
.top-navbar {
    background: white;
    height: var(--topbar-height);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--box-shadow);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 100%;
}

.search-box {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    background-color: #f8fafc;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.navbar-actions {
    display: flex;
    gap: 0.5rem;
}

.navbar-actions .btn {
    position: relative;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.navbar-actions .badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    font-size: 0.625rem;
    padding: 0.125rem 0.25rem;
}

/* Content Area */
.content-area {
    padding: 2rem;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

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

.content-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--secondary-color);
    font-size: 1rem;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-title {
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.stat-content h3 {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark-color);
}

.stat-content p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Activity Items */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.activity-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.activity-content p {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
}

/* Meeting Items */
.meeting-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.meeting-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 3rem;
}

.meeting-time .time {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--dark-color);
}

.meeting-time .date {
    font-size: 0.75rem;
    color: var(--secondary-color);
}

.meeting-details h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    font-size: 0.875rem;
}

.meeting-details p {
    margin: 0;
    font-size: 0.75rem;
}

/* Project Cards */
.project-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.project-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--dark-color);
}

.project-description {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.project-progress {
    margin-bottom: 1.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--secondary-color);
}

.project-team,
.project-deadline {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Team Cards */
.team-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.team-avatar {
    margin-bottom: 1rem;
}

.team-avatar i {
    font-size: 3rem;
    color: var(--secondary-color);
}

.team-info h5 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    color: var(--dark-color);
}

.team-role {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.875rem;
    margin: 0 0 0.25rem 0;
}

.team-department {
    color: var(--secondary-color);
    font-size: 0.75rem;
    margin: 0 0 1rem 0;
}

.team-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* Document Items */
.document-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.document-icon {
    font-size: 1.5rem;
    width: 2rem;
    text-align: center;
}

.document-info {
    flex: 1;
}

.document-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    color: var(--dark-color);
}

.document-info p {
    margin: 0;
    font-size: 0.75rem;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

/* Event Items */
.event-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 3rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.event-date .day {
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1;
}

.event-date .month {
    font-size: 0.75rem;
    opacity: 0.9;
}

.event-details h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    color: var(--dark-color);
}

.event-details p {
    margin: 0;
    font-size: 0.75rem;
}

/* Metrics */
.metric {
    padding: 1rem;
}

.metric h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.metric p {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin: 0;
}

/* Calendar Placeholder */
.calendar-placeholder {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .navbar-content {
        padding: 0 1rem;
    }
    
    .search-box {
        max-width: 200px;
    }
}

@media (max-width: 767.98px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .stat-icon {
        margin-bottom: 0.5rem;
    }
    
    .project-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .team-actions {
        flex-wrap: wrap;
    }
    
    .document-item {
        flex-wrap: wrap;
    }
    
    .document-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
    
    .search-box {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .navbar-content {
        padding: 0 0.5rem;
    }
    
    .content-area {
        padding: 0.5rem;
    }
    
    .card-header,
    .card-body {
        padding: 1rem;
    }
    
    .stat-card,
    .project-card,
    .team-card {
        padding: 1rem;
    }
}

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-info { color: var(--info-color) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-info { background-color: var(--info-color) !important; }

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================= */
/* Topbar User Info (junto a notificaciones) */
/* ============================= */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-user .topbar-avatar i {
    font-size: 1.75rem;
    color: var(--secondary-color);
    opacity: 0.9;
}

.topbar-user .user-details {
    line-height: 1.2;
    text-align: right;
}

.topbar-user .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.topbar-user .user-email {
    font-size: 0.75rem;
    opacity: 0.7;
    color: #555;
}

.topbar-user .user-role {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--secondary-color);
}

/* Ocultar email en pantallas muy pequeñas */
@media (max-width: 576px) {
    .topbar-user .user-email {
        display: none;
    }
}
/*boton logout*/
.btn-outline-danger {
    border-color: var(--danger-color);
    color: var(--danger-color);
}
.btn-outline-danger:hover {
    background-color: var(--danger-color);
    color: white;
}
