/* css/login.css */
:root {
    --primary-color: #1E3A8A;
    --secondary-color: #3B82F6;
    --accent-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --light-color: #F8FAFC;
    --dark-color: #1E293B;
    --gray-color: #64748B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    margin: 20px;
}

.login-header {
    background: var(--primary-color);
    color: white;
    padding: 30px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: white;
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.school-name h1 {
    font-size: 16px;
    margin: 0;
    line-height: 1.2;
}

.school-name p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.welcome-message {
    opacity: 0.8;
    font-size: 14px;
    margin-top: 10px;
}

.login-content {
    padding: 40px;
}

.login-form,
.recovery-form,
.recovery-confirmation,
.unauthorized-message {
    display: none;
}

.login-form.active,
.recovery-form.active,
.recovery-confirmation.active,
.unauthorized-message {
    display: block;
}

.login-form h2,
.recovery-form h2 {
    color: var(--dark-color);
    margin-bottom: 10px;
    text-align: center;
}

.register-instructions,
.recovery-instructions {
    color: var(--gray-color);
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.input-with-icon input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 5px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.remember-me input {
    margin: 0;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1D4ED8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.login-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #E2E8F0;
}

.login-divider span {
    background: white;
    padding: 0 15px;
    color: var(--gray-color);
    font-size: 14px;
}

.demo-accounts {
    margin-bottom: 25px;
}

.demo-accounts h4 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--dark-color);
    font-size: 14px;
}

.demo-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-demo {
    padding: 10px;
    border: 2px solid #E2E8F0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-demo:hover {
    border-color: var(--primary-color);
    background: #EFF6FF;
}

.btn-demo.padre { border-left: 4px solid #10B981; }
.btn-demo.admin { border-left: 4px solid #EF4444; }
.btn-demo.docente { border-left: 4px solid #F59E0B; }
.btn-demo.dece { border-left: 4px solid #8B5CF6; }

.register-link {
    text-align: center;
    margin-bottom: 20px;
}

.register-link p {
    color: var(--gray-color);
    font-size: 14px;
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

.public-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.public-links a {
    color: var(--gray-color);
    text-decoration: none;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.public-links a:hover {
    color: var(--primary-color);
}

.confirmation-icon,
.error-icon {
    text-align: center;
    margin-bottom: 20px;
}

.confirmation-icon i {
    font-size: 64px;
    color: var(--accent-color);
}

.error-icon i {
    font-size: 64px;
    color: var(--danger-color);
}

.confirmation-actions,
.unauthorized-actions {
    display: flex;
    gap: 10px;
    margin: 25px 0;
}

.email-tips {
    background: #F8FAFC;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.email-tips p {
    margin-bottom: 10px;
    font-weight: 600;
}

.email-tips ul {
    list-style: none;
    padding: 0;
}

.email-tips li {
    padding: 5px 0;
    color: var(--gray-color);
    font-size: 14px;
}

.email-tips li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.unauthorized-message {
    text-align: center;
}

.unauthorized-message h2 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.unauthorized-message p {
    color: var(--gray-color);
    margin-bottom: 30px;
}

.contact-support {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #E2E8F0;
}

.contact-support p {
    margin-bottom: 15px;
    color: var(--gray-color);
}

.login-footer {
    background: #F8FAFC;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #E2E8F0;
}

.login-footer p {
    color: var(--gray-color);
    font-size: 12px;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--gray-color);
    text-decoration: none;
    font-size: 12px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.background-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    max-width: 500px;
    padding: 20px;
}

.background-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.background-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.feature i {
    font-size: 18px;
    opacity: 0.8;
}

/* Alertas */
.alert {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
}

.alert-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #16A34A;
}

.alert-warning {
    background: #FFFBEB;
    border: 1px solid #FED7AA;
    color: #D97706;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .login-content {
        padding: 30px 20px;
    }
    
    .demo-buttons {
        grid-template-columns: 1fr;
    }
    
    .confirmation-actions,
    .unauthorized-actions {
        flex-direction: column;
    }
    
    .background-content h2 {
        font-size: 2rem;
    }
    
    .features-list {
        grid-template-columns: 1fr;
    }
    
    .public-links {
        flex-direction: column;
        gap: 10px;
    }
}