@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

:root {
    --rojo-ilb: #7B1E2B;
    --gris-bg: #F8F9FA;
    --gris-texto: #6C757D;
    --negro-ilb: #212529;
    --borde-ilb: #CED4DA;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background-color: var(--gris-bg);
}

.left-panel {
    flex: 1;
    background-color: var(--rojo-ilb);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.left-panel img {
    max-width: 80%;
    height: auto;
}

.right-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--gris-bg);
    padding: 40px;
}

.login-card {
    background-color: #FFFFFF;
    width: 100%;
    max-width: 420px;
    padding: 40px 35px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.login-card h2.brand-title {
    color: var(--rojo-ilb);
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.login-card h3.welcome-msg {
    color: var(--negro-ilb);
    font-size: 20px;
    font-weight: 700;
    text-align: left;
    margin-bottom: 5px;
}

.login-card p.subtitle {
    color: var(--gris-texto);
    font-size: 13px;
    text-align: left;
    margin-bottom: 25px;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--negro-ilb);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--borde-ilb);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    border-color: var(--rojo-ilb);
}

.password-container {
    position: relative;
}

.password-container input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gris-texto);
    background: none;
    border: none;
    font-size: 16px;
    outline: none;
    display: flex;
    align-items: center;
}

.forgot-password {
    display: block;
    text-align: right;
    color: var(--rojo-ilb);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 10px;
    margin-bottom: 25px;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    background-color: var(--rojo-ilb);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease;
    margin-bottom: 20px;
}

.btn-primary:hover {
    background-color: #651722;
}

.separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--negro-ilb);
    font-size: 12px;
    font-weight: 700;
    margin: 20px 0;
    text-transform: uppercase;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--borde-ilb);
}

.separator:not(:empty)::before {
    margin-right: 15px;
}

.separator:not(:empty)::after {
    margin-left: 15px;
}

.btn-secondary {
    display: block;
    width: 100%;
    background-color: transparent;
    color: var(--rojo-ilb);
    border: 1px solid var(--rojo-ilb);
    border-radius: 8px;
    padding: 14px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s, color 0.2s;
    margin-bottom: 15px;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--rojo-ilb);
    color: #FFFFFF;
}

.error-message {
    background-color: #F8D7DA;
    color: #721C24;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    text-align: left;
    border-left: 4px solid #F5C6CB;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        overflow: auto;
    }

    .left-panel {
        flex: none;
        height: 200px;
        padding: 20px;
    }

    .left-panel img {
        max-height: 120px;
    }

    .right-panel {
        flex: 1;
        padding: 20px;
        align-items: flex-start;
    }

    .login-card {
        box-shadow: none;
        background-color: transparent;
        padding: 10px 0;
    }
}

/* Tabs for Student/Teacher login */
.login-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--borde-ilb);
    gap: 10px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--gris-texto);
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: var(--rojo-ilb);
    border-bottom-color: var(--rojo-ilb);
}

.tab-btn:hover:not(.active) {
    color: var(--negro-ilb);
}