/* Estilos para el panel de administración */
.admin-header {
    background: linear-gradient(135deg, #265A99 0%, #1a4a7a 100%);
    color: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.8em;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-content {
    padding: 40px;
    background: #f5f5f5;
    min-height: calc(100vh - 140px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #265A99;
}

.stat-card h3 {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.stat-card .stat-value {
    color: #265A99;
    font-size: 2.5em;
    font-weight: 700;
}

.section-title {
    color: #265A99;
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #265A99;
}

.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

thead {
    background: #265A99;
    color: white;
}

th, td {
    padding: 12px 15px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

tbody tr:hover {
    background: #f8f9fa;
}

.btn-logout {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #c82333;
}

.nav-menu {
    background: #f8f9fa;
    padding: 15px 40px;
    border-bottom: 2px solid #e0e0e0;
}

.nav-menu a {
    color: #265A99;
    text-decoration: none;
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-menu a:hover, .nav-menu a.active {
    background: #265A99;
    color: white;
}

.filters-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.filters-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filters-form .form-group {
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.filters-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.filters-form select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.btn-view {
    background: #265A99;
    color: white;
    padding: 6px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: #1a4a7a;
}

/* Estilos para la página de login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-tema, #265A99) 0%, var(--color-tema-oscuro, #1a4a7a) 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    max-width: 135px;
}

.login-title {
    text-align: center;
    color: var(--color-tema, #265A99);
    margin-bottom: 30px;
    font-size: 1.8em;
}

.error-message {
    background: #ffebee;
    color: #d32f2f;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #d32f2f;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding: 12px 45px 12px 15px;
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    font-family: inherit;
    margin: 0;
}

.password-wrapper input:focus {
    outline: none;
    border-color: var(--color-tema, #265A99);
    box-shadow: 0 0 0 3px rgba(var(--color-tema-rgb, 38, 90, 153), 0.1);
}

.password-wrapper input::placeholder {
    color: #999;
}

/* Asegurar que el input de contraseña tenga los mismos estilos que otros inputs */
.login-box .form-group input[type="password"] {
    padding: 12px 45px 12px 15px;
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    font-family: inherit;
}

.login-box .form-group input[type="password"]:focus {
    outline: none;
    border-color: var(--color-tema, #265A99);
    box-shadow: 0 0 0 3px rgba(var(--color-tema-rgb, 38, 90, 153), 0.1);
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--color-tema, #265A99);
    cursor: pointer;
    color: #666;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    z-index: 10;
}

.toggle-password:hover {
    color: #265A99;
    background: rgba(38, 90, 153, 0.1);
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.95);
    background: rgba(38, 90, 153, 0.15);
}

.toggle-password:focus {
    outline: 2px solid #265A99;
    outline-offset: 2px;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.toggle-password:hover svg {
    stroke-width: 2.5;
}

/* Estilos para iconos Font Awesome en toggle password */
.toggle-password i {
    font-size: 16px;
    transition: all 0.3s ease;
}

.toggle-password:hover i {
    color: #265A99;
}

/* Estilo para input de texto en login */
.login-box .form-group input[type="text"] {
    padding: 12px 15px;
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    font-family: inherit;
}

.login-box .form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--color-tema, #265A99);
    box-shadow: 0 0 0 3px rgba(var(--color-tema-rgb, 38, 90, 153), 0.1);
}

.login-box .form-group input::placeholder {
    color: #999;
}

.ver-detalles {
    cursor: pointer;
    transition: all 0.3s ease;
}

.ver-detalles:hover {
    background: #1a4a7a !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(38, 90, 153, 0.3);
}

.docente-detalle {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cerrar-detalle:hover {
    background: rgba(255,255,255,0.3) !important;
}

.docente-row:hover {
    background: #f8f9fa;
    cursor: default;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-content {
        padding: 20px;
    }
    
    .filters-form {
        flex-direction: column;
    }
    
    /* Mejoras para login en móvil */
    .login-container {
        padding: 1rem;
        min-height: 100vh;
        align-items: center;
    }
    
    .login-box {
        max-width: 100%;
        width: 100%;
        padding: 2rem 1.5rem;
        border-radius: 20px;
        margin: 0;
    }
    
    .login-logo {
        margin-bottom: 1.5rem;
    }
    
    .login-logo img {
        max-width: 120px;
        width: auto;
        height: auto;
    }
    
    .login-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .login-box .form-group {
        margin-bottom: 1.25rem;
    }
    
    .login-box .form-group label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        display: block;
        font-weight: 600;
        color: #374151;
    }
    
    .login-box .form-group input[type="text"],
    .login-box .form-group input[type="password"],
    .password-wrapper input {
        padding: 14px 16px;
        font-size: 16px; /* Evita zoom en iOS */
        border-radius: 12px;
        border: 2px solid #e5e7eb;
        width: 100%;
        box-sizing: border-box;
        transition: all 0.2s;
    }
    
    .login-box .form-group input[type="text"]:focus,
    .login-box .form-group input[type="password"]:focus,
    .password-wrapper input:focus {
        border-color: #265A99;
        box-shadow: 0 0 0 3px rgba(38, 90, 153, 0.1);
        outline: none;
    }
    
    .password-wrapper {
        position: relative;
    }
    
    .toggle-password {
        right: 12px;
        width: 40px;
        height: 40px;
        padding: 0;
    }
    
    .toggle-password i {
        font-size: 18px;
    }
    
    .btn-primary {
        padding: 14px 20px;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 12px;
        min-height: 48px;
        transition: all 0.2s;
    }
    
    .btn-primary:active {
        transform: scale(0.98);
    }
    
    .error-message {
        padding: 14px 16px;
        font-size: 0.9rem;
        border-radius: 12px;
        margin-bottom: 1.25rem;
    }
}

