/* ========================================
   SIA UNAL - ESTILOS ESPECÍFICOS
   ======================================== */

/* Variables adicionales para SIA */
:root {
    --sia-primary: #8B0000;
    --sia-secondary: #2D7A4A;
    --sia-accent: #FFE500;
    --sia-bg: #f5f5f5;
    --sia-card: #ffffff;
    --sia-text: #2C2C2C; 
    --sia-border: #e0e0e0;
    --sidebar-width: 280px;
}

/* Body específico para SIA */
.sia-body {
    background: var(--sia-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   HEADER SIA
   ======================================== */
.sia-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sia-header .university-name h1 {
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.sia-header .university-name p {
    font-size: 0.85rem;
}

/* Usuario en Header */
.header-user-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
}

.header-user-icon {
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tangram-yellow);
    border-radius: 50%;
}

.header-user-details {
    display: flex;
    flex-direction: column;
}

.header-user-name {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.header-user-code {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
}

.header-btn-logout {
    padding: 0.7rem 1.5rem;
    background: var(--tangram-red);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.header-btn-logout:hover {
    background: var(--dark-gray);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,51,51,0.3);
}

/* ========================================
   CONTAINER PRINCIPAL
   ======================================== */
.sia-container {
    flex: 1;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

/* ========================================
   PANEL DE LOGIN
   ======================================== */
.login-panel {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(45, 122, 74, 0.05) 0%, rgba(0, 184, 230, 0.05) 100%);
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 450px;
    width: 100%;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--sia-primary) 0%, #a00000 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
}

.login-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

#loginForm {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--sia-text);
    margin-bottom: 0.5rem;
}

.form-group .icon {
    font-size: 1.2rem;
}

.form-group input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--sia-border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--sia-primary);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.form-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.forgot-password {
    color: var(--sia-primary);
    text-decoration: none;
    transition: all 0.3s;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--sia-primary) 0%, #a00000 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.3);
}

.login-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
}

.login-info p {
    margin: 0.3rem 0;
}

/* ========================================
   PANEL PRINCIPAL
   ======================================== */
.main-panel {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 200px);
}

.sia-layout {
    display: flex;
    flex: 1;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--sia-border);
    overflow-y: auto;
    height: calc(100vh - 200px);
    position: sticky;
    top: 0;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    border-bottom: 1px solid var(--sia-border);
}

.nav-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.nav-header:hover {
    background: #f8f8f8;
}

.nav-item.active > .nav-header {
    background: linear-gradient(90deg, rgba(139, 0, 0, 0.1) 0%, transparent 100%);
    border-left: 4px solid var(--sia-primary);
}

.nav-icon {
    font-size: 1.3rem;
    width: 30px;
    text-align: center;
}

.nav-title {
    flex: 1;
    font-weight: 600;
    color: var(--sia-text);
    font-size: 0.9rem;
}

.nav-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
    color: #666;
}

.nav-item.expanded .nav-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    display: none;
    background: #f8f8f8;
    padding: 0.5rem 0;
}

.nav-item.expanded .nav-submenu {
    display: block;
}

.nav-submenu a {
    display: block;
    padding: 0.7rem 1.5rem 0.7rem 4rem;
    color: var(--sia-text);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.nav-submenu a:hover {
    background: white;
    color: var(--sia-primary);
    padding-left: 4.3rem;
}

.nav-submenu a.active {
    background: white;
    color: var(--sia-primary);
    font-weight: 600;
    border-left: 3px solid var(--sia-primary);
}

/* ========================================
   CONTENT AREA
   ======================================== */
.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--sia-bg);
}

.welcome-screen {
    text-align: center;
    padding: 3rem 2rem;
}

.welcome-screen h2 {
    font-size: 2rem;
    color: var(--sia-primary);
    margin-bottom: 1rem;
}

.welcome-screen > p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.quick-access {
    max-width: 800px;
    margin: 0 auto;
}

.quick-access h3 {
    font-size: 1.4rem;
    color: var(--sia-text);
    margin-bottom: 1.5rem;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.quick-links button {
    padding: 2rem 1rem;
    background: white;
    border: 2px solid var(--sia-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.quick-links button:hover {
    transform: translateY(-5px);
    border-color: var(--sia-primary);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.quick-links button span {
    font-size: 2.5rem;
}

/* Contenido dinámico */
.page-content {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--sia-primary);
}

.page-header h2 {
    font-size: 1.8rem;
    color: var(--sia-primary);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Cards de contenido */
.info-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.info-card h3 {
    color: var(--sia-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    padding: 0.8rem;
    background: #f8f8f8;
    border-radius: 8px;
}

.info-item label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.info-item span {
    display: block;
    color: var(--sia-text);
    font-size: 0.95rem;
}

/* Tablas */
.data-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--sia-primary);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--sia-border);
    font-size: 0.9rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: #f8f8f8;
}

/* ========================================
   FOOTER
   ======================================== */
.sia-footer {
    background: #2d2d2d;
    color: white;
    padding: 1.5rem 0;
    text-align: center;
}

.footer-content p {
    margin: 0.3rem 0;
    font-size: 0.85rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
    }
    
    .content-area {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-user-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-btn-logout {
        width: 100%;
    }
    
    .sia-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 280px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: -280px;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }
    
    .sidebar.mobile-open {
        left: 0;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .login-panel {
        padding: 1rem;
    }
    
    .login-card {
        border-radius: 12px;
    }
    
    .login-header {
        padding: 2rem 1.5rem;
    }
    
    .login-header h2 {
        font-size: 1.4rem;
    }
    
    #loginForm {
        padding: 1.5rem;
    }
    
    .quick-links {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.7rem 0.5rem;
    }
}

/* Estilos para el menú móvil en el top bar */
/* Estilos para el menú móvil en el top bar */
.mobile-menu-btn {
    display: none;
    background: var(--sia-primary);
    border: 2px solid white;
    color: white;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
}

.mobile-menu-btn:hover {
    background: #a00000;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block !important;
    }
    
    .top-bar-container {
        position: relative;
        padding-right: 4rem;
    }
    
    .top-bar-container a {
        display: none;
    }
    
    .top-bar-container a:first-child {
        display: inline-block;
    }
}

/* ========================================
   ICONOS TANGRAM
   ======================================== */

/* Iconos en el header */
.header-user-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Iconos en el formulario de login */
.form-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Iconos en el sidebar */
.nav-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Iconos en los accesos rápidos */
.quick-link-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

/* Asegurar que las imágenes no se deformen */
.nav-icon-img,
.header-user-icon-img,
.form-icon,
.quick-link-icon {
    display: inline-block;
    vertical-align: middle;
}

/*estilos para modal de olvidar contraseña*/

/* ========================================
   MODAL RECUPERACIÓN DE CONTRASEÑA
   ======================================== */
.modal-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: 9999;
    animation: fadeIn 0.3s ease;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

.modal-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--sia-primary) 0%, #a00000 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: #f8f8f8;
    border-radius: 0 0 16px 16px;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.info-alert {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #1976d2;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.alert-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.info-alert h4 {
    color: #0d47a1;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.info-alert p {
    color: #1565c0;
    margin: 0;
    line-height: 1.6;
}

.proceso-pasos {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.proceso-pasos h4 {
    color: var(--sia-primary);
    margin: 0 0 1rem 0;
}

.proceso-pasos ol {
    margin: 0;
    padding-left: 1.5rem;
}

.proceso-pasos li {
    padding: 0.5rem 0;
    color: #666;
    line-height: 1.6;
}

.contacto-info {
    margin-bottom: 1.5rem;
}

.contacto-info h4 {
    color: var(--sia-primary);
    margin: 0 0 1rem 0;
}

.contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.contacto-item {
    background: #f8f8f8;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contacto-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.contacto-item strong {
    display: block;
    color: var(--sia-text);
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.contacto-item span,
.contacto-item a {
    font-size: 0.85rem;
    color: #666;
    text-decoration: none;
}

.contacto-item a:hover {
    color: var(--sia-primary);
    text-decoration: underline;
}

.importante-nota {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.importante-nota strong {
    color: #e65100;
}

.btn-primary {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--sia-primary) 0%, #a00000 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.3);
}

.btn-secondary {
    padding: 0.8rem 1.5rem;
    background: white;
    color: var(--sia-text);
    border: 2px solid var(--sia-border);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #f8f8f8;
    border-color: var(--sia-primary);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .contacto-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}