/* login page styling — liquid glass theme */

body.guest {
    color: #f5f5f7;
    background-color: #0a0a0d;
    background-image:
        radial-gradient(60% 50% at 12% -5%, rgba(123, 17, 19, 0.45), transparent 60%),
        radial-gradient(50% 45% at 100% 8%, rgba(240, 180, 41, 0.12), transparent 55%),
        linear-gradient(180deg, rgba(18, 4, 6, 0.85), rgba(10, 10, 13, 0.95)),
        url('../img/TUP_BACKGROUND.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

body.guest .container {
    max-width: none;
    min-height: 100vh;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 960px;
    min-height: 540px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

/* Left Column: Visual/School Image */
.login__visual {
    position: relative;
    background-image: url('../img/TUP_BACKGROUND.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.login__visual::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(123, 17, 19, 0.88), rgba(10, 10, 13, 0.94));
    z-index: 1;
}

.login__visual-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login__logos {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.login__logos img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 50%;
    background: #0a0a0d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.login__visual-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #ffffff, #ffd9b0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login__visual-subtitle {
    color: rgba(245, 245, 247, 0.75);
    font-size: 0.92rem;
    margin: 0;
    max-width: 34ch;
    line-height: 1.45;
}

/* Right Column: Credentials Form */
.login__card {
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(10, 10, 13, 0.55);
}

.login__form-header {
    margin-bottom: 32px;
}

.login__title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #fff;
    letter-spacing: -0.01em;
}

.login__subtitle {
    color: rgba(245, 245, 247, 0.65);
    font-size: 0.92rem;
    margin: 0;
}

.login__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form Fields Styling for Dark Theme */
body.guest .field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.guest .field__label {
    color: rgba(245, 245, 247, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
}

body.guest .field__input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 12px 14px;
    border-radius: 9px;
    font: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

body.guest select.field__input {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
}

body.guest select.field__input option,
body.guest select.field__input optgroup {
    background-color: #140406 !important;
    color: #fff !important;
}
    
body.guest .field__input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

body.guest .field__input:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.22);
}

body.guest .field__input:focus {
    outline: none;
    border-color: #f0b429;
    box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.15);
}

body.guest select.field__input:focus {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
}

body.guest .alert {
    padding: 12px 16px;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
}

body.guest .alert--error {
    background: rgba(180, 35, 24, 0.15);
    color: #fda29b;
    border: 1px solid rgba(180, 35, 24, 0.3);
}

body.guest .alert--ok {
    background: rgba(26, 127, 55, 0.15);
    color: #86efac;
    border: 1px solid rgba(26, 127, 55, 0.3);
}

/* Button overrides for dark theme */
body.guest .btn--primary {
    background: var(--maroon);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

body.guest .btn--primary:hover {
    background: #9b1c1e;
    border-color: rgba(255, 255, 255, 0.2);
}

body.guest .btn--primary:active {
    transform: translateY(1px);
}

body.guest .btn--ghost {
    color: rgba(245, 245, 247, 0.85);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

body.guest .btn--ghost:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

/* sign-up prompt under the login form */
.login__alt {
    text-align: center;
    color: rgba(245, 245, 247, 0.65);
    font-size: 0.88rem;
    margin: 20px 0 0;
}

.login__alt a {
    color: #f0b429;
    font-weight: 600;
}

/* discreet staff/admin entry, set apart from the student actions */
.login__staff {
    text-align: center;
    margin: 20px 0 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login__staff a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: rgba(245, 245, 247, 0.65);
    font-size: 0.8rem;
    font-weight: 600;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.login__staff a:hover {
    color: #fff;
    border-color: rgba(240, 180, 41, 0.5);
    background: rgba(240, 180, 41, 0.08);
}

/* terms/privacy consent line under the form */
.login__legal {
    text-align: center;
    color: rgba(245, 245, 247, 0.55);
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 16px 0 0;
}

.login__legal .legal-link {
    color: rgba(245, 245, 247, 0.8);
    font-weight: 600;
}

.login__legal .legal-link:hover {
    color: #f0b429;
}

/* Responsive */
@media (max-width: 768px) {
    .login {
        grid-template-columns: 1fr;
        max-width: 440px;
        min-height: auto;
    }
    .login__visual {
        padding: 36px 24px;
    }
    .login__card {
        padding: 36px 28px;
    }
    .login__logos img {
        width: 48px;
        height: 48px;
    }
    .login__visual-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    body.guest .container {
        padding: 12px;
    }
    .login__card {
        padding: 28px 18px;
    }
    .login__visual {
        padding: 24px 18px;
    }
}
