
/* =====================================================
   SchoolOS Login Page
   File: static/css/pages/login.css
   ===================================================== */

:root {
    --login-primary: #1265f5;
    --login-primary-dark: #0646df;
    --login-accent: #6c4dff;
    --login-text: #101a38;
    --login-muted: #7584a5;
    --login-border: rgba(255, 255, 255, 0.9);
    --login-glass: rgba(255, 255, 255, 0.48);
    --login-shadow: 0 12px 30px rgba(70, 110, 190, 0.16);
}

.login-page,
.login-page * {
    box-sizing: border-box;
}

.login-page {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 38px 20px;
    overflow: hidden;
    background:
        radial-gradient(
            ellipse at 50% 35%,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(242, 247, 255, 0.8) 37%,
            transparent 70%
        ),
        linear-gradient(140deg, #dce8ff 0%, #edf3ff 48%, #dce7ff 100%);
    color: var(--login-text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

/* Decorative circles */

.login-orb {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: linear-gradient(135deg, #f8fbff, #cbdcff);
    box-shadow:
        inset -8px -8px 20px rgba(75, 121, 222, 0.1),
        inset 6px 6px 18px rgba(255, 255, 255, 0.95),
        0 8px 24px rgba(82, 121, 202, 0.12);
}

.login-orb--top {
    top: -135px;
    left: -125px;
    width: 245px;
    height: 245px;
}

.login-orb--top::after {
    position: absolute;
    inset: 0;
    border: 8px solid transparent;
    border-right-color: rgba(92, 151, 255, 0.85);
    border-bottom-color: rgba(92, 151, 255, 0.45);
    border-radius: inherit;
    content: "";
    filter: drop-shadow(0 2px 5px rgba(45, 104, 235, 0.4));
}

.login-orb--right {
    top: 23%;
    right: -90px;
    width: 170px;
    height: 170px;
}

.login-orb--bottom {
    right: -100px;
    bottom: -130px;
    width: 250px;
    height: 250px;
}

/* Main card */

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: 26px 30px 22px;
    text-align: center;
    animation: login-enter 0.65s ease both;
}

@keyframes login-enter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Theme toggle */

.theme-toggle {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 5;
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.72);
    color: #152342;
    font-size: 23px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(55, 95, 175, 0.13);
    backdrop-filter: blur(14px);
    transition: transform 0.2s, background 0.2s;
}

.theme-toggle:hover {
    transform: translateY(-2px);
}

/* Logo */

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 36%;
    background: linear-gradient(145deg, #f9fbff, #dfe9ff);
    box-shadow:
        12px 14px 28px rgba(91, 123, 192, 0.18),
        -8px -8px 22px rgba(255, 255, 255, 0.96),
        inset 1px 1px 2px white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: translateY(-3px);
}

.logo-art {
    position: relative;
    display: block;
    width: 70px;
    height: 82px;
    filter: drop-shadow(0 8px 6px rgba(27, 79, 190, 0.22));
}

.logo-wave {
    position: absolute;
    display: block;
    border-radius: 60% 12% 60% 20%;
    transform: rotate(-35deg) skewY(-8deg);
}

.logo-wave--one {
    top: 7px;
    left: 26px;
    width: 34px;
    height: 43px;
    background: linear-gradient(140deg, #fff 8%, #a8c9ff 45%, #5c8aff 100%);
}

.logo-wave--two {
    top: 27px;
    left: 10px;
    width: 40px;
    height: 47px;
    background: linear-gradient(145deg, #4388ff, #0754e8 68%, #0635b5);
}

.logo-wave--three {
    top: 43px;
    left: 25px;
    width: 30px;
    height: 34px;
    background: linear-gradient(145deg, #1676ff, #102fc2);
}

/* Heading */

.login-heading {
    margin-bottom: 25px;
}

.login-heading h1 {
    margin: 0;
    color: var(--login-text);
    font-size: clamp(27px, 5vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1.1px;
}

.login-heading > p {
    margin: 8px 0 0;
    color: var(--login-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.school-name {
    margin-top: 15px;
    color: #526588;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.25px;
}

/* Form */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    margin: 0;
    text-align: left;
}

.login-form .form-field {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.form-field > label:not(.visually-hidden) {
    display: block;
    margin-bottom: 7px;
    color: #536482;
    font-size: 12px;
    font-weight: 700;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.input-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    padding: 0 15px;
    border: 1px solid var(--login-border);
    border-radius: 17px;
    background: var(--login-glass);
    box-shadow:
        0 6px 15px rgba(72, 109, 179, 0.12),
        inset 1px 1px 3px rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.input-shell:focus-within {
    border-color: rgba(37, 105, 255, 0.6);
    box-shadow:
        0 0 0 4px rgba(44, 112, 255, 0.09),
        0 7px 18px rgba(72, 109, 179, 0.12);
}

.field-icon {
    display: inline-flex;
    flex: 0 0 19px;
    align-items: center;
    justify-content: center;
    color: #60759e;
}

.field-icon svg {
    display: block;
    width: 19px;
    height: 19px;
}

.input-shell input,
.input-shell select {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    margin: 0;
    padding: 0;
    border: 0 !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #243654;
    font-family: inherit;
    font-size: 12px;
}

.input-shell input::placeholder {
    color: #7888a7;
    opacity: 1;
}

.input-shell select {
    cursor: pointer;
}

.password-toggle {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 34px;
    place-items: center;
    padding: 5px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #647798;
}

.password-toggle:hover {
    background: rgba(65, 107, 200, 0.09);
}

.password-toggle svg {
    width: 19px;
    height: 19px;
}

/* Remember me */

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1px 1px 0;
}

.remember-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #536482;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

.remember-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.custom-checkbox {
    display: grid;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    place-items: center;
    border: 1px solid #b8c7e0;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.8);
    color: transparent;
    font-size: 12px;
    font-weight: 800;
}

.remember-label input:checked + .custom-checkbox {
    border-color: #2874ff;
    background: linear-gradient(135deg, #3988ff, #1459ee);
    color: #fff;
    box-shadow: 0 3px 8px rgba(32, 100, 245, 0.22);
}

.remember-label input:focus-visible + .custom-checkbox {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.forgot-link {
    color: #1265f5;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.forgot-link:hover {
    color: #073cc7;
    text-decoration: underline;
}

/* Login button */

.login-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 51px;
    margin-top: 0;
    padding: 10px 54px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 30px;
    background: linear-gradient(
        105deg,
        #3993ff 0%,
        #0860f3 54%,
        #413be9 100%
    );
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    box-shadow:
        0 9px 18px rgba(23, 94, 239, 0.32),
        0 3px 5px rgba(37, 99, 235, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.login-submit:hover {
    transform: translateY(-2px);
    box-shadow:
        0 13px 24px rgba(23, 94, 239, 0.36),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    filter: saturate(1.1);
}

.login-submit:active {
    transform: translateY(0) scale(0.99);
}

.login-submit:focus-visible,
.social-button:focus-visible,
.theme-toggle:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.45);
    outline-offset: 3px;
}

.submit-arrow {
    position: absolute;
    right: 7px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.17);
    font-size: 23px;
    font-weight: 400;
}

/* Errors and notices */

.login-error,
.login-notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    background: rgba(255, 241, 242, 0.9);
    color: #be123c;
    font-size: 12px;
    line-height: 1.6;
    text-align: left;
    overflow-wrap: anywhere;
}

.login-notice {
    border-color: #bbf7d0;
    background: rgba(240, 253, 244, 0.92);
    color: #166534;
}

/* Social buttons */

.social-section {
    margin-top: 24px;
}

.social-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.social-divider > span {
    height: 1px;
    flex: 1;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(113, 137, 184, 0.65)
    );
}

.social-divider > span:last-child {
    transform: rotate(180deg);
}

.social-divider p {
    margin: 0;
    color: #7b8bac;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2.5px;
    white-space: nowrap;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.social-button {
    display: grid;
    width: 57px;
    height: 53px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.47);
    color: #53688c;
    box-shadow:
        0 6px 15px rgba(76, 110, 174, 0.13),
        inset 0 1px 2px white;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.social-button:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.88);
}

.social-button svg {
    width: 24px;
    height: 24px;
}

.google-mark {
    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: 800;
    color: #4285f4;
    text-shadow: 1px 1px 0 #34a853;
}

.facebook-mark {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: end center;
    overflow: hidden;
    border-radius: 50%;
    background: #1877f2;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: 800;
}

/* Footer */

.login-footer {
    margin: 23px 0 0;
    color: #8593ae;
    font-size: 10px;
    line-height: 1.7;
}

.back-home {
    display: inline-block;
    margin-top: 13px;
    color: #5275b7;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.back-home:hover {
    color: #1259e8;
}

/* Dark theme */

.login-page.dark-mode {
    --login-text: #edf3ff;
    --login-muted: #a9bad9;
    --login-border: rgba(159, 184, 231, 0.22);
    --login-glass: rgba(25, 39, 72, 0.72);
    background:
        radial-gradient(
            circle at 50% 30%,
            rgba(35, 65, 125, 0.5),
            transparent 55%
        ),
        linear-gradient(145deg, #0b1224, #17284a);
}

.dark-mode .login-orb {
    border-color: rgba(172, 196, 241, 0.1);
    background: linear-gradient(145deg, #1c3157, #111d37);
}

.dark-mode .login-logo {
    border-color: rgba(172, 196, 241, 0.15);
    background: linear-gradient(145deg, #24385e, #13213d);
}

.dark-mode .school-name,
.dark-mode .form-field > label:not(.visually-hidden),
.dark-mode .remember-label,
.dark-mode .login-footer,
.dark-mode .back-home {
    color: #a9bad9;
}

.dark-mode .input-shell input,
.dark-mode .input-shell select {
    color: #f1f5ff;
}

.dark-mode .input-shell input::placeholder {
    color: #a2b3d0;
}

.dark-mode .theme-toggle,
.dark-mode .social-button {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #e2eaff;
}

.dark-mode .custom-checkbox {
    border-color: #61769c;
    background: #192c4e;
}

/* Tablet */

@media (max-width: 768px) {
    .login-page {
        padding: 55px 20px 35px;
    }

    .login-card {
        max-width: 420px;
        padding: 22px 24px;
    }

    .login-logo {
        width: 132px;
        height: 132px;
    }

    .logo-art {
        transform: scale(0.9);
    }

    .theme-toggle {
        top: 13px;
        right: 14px;
    }

    .login-orb--right {
        right: -120px;
    }
}

/* Mobile */

@media (max-width: 480px) {
    .login-page {
        align-items: flex-start;
        padding: 40px 15px 26px;
    }

    .login-card {
        max-width: 390px;
        padding: 20px 8px;
    }

    .login-logo {
        width: 118px;
        height: 118px;
        margin-bottom: 20px;
        border-radius: 34%;
    }

    .logo-art {
        transform: scale(0.78);
    }

    .login-heading {
        margin-bottom: 22px;
    }

    .login-heading h1 {
        font-size: 29px;
        letter-spacing: -0.8px;
    }

    .login-heading > p {
        font-size: 10px;
        letter-spacing: 3px;
    }

    .login-form {
        gap: 13px;
    }

    .input-shell {
        min-height: 52px;
        padding-right: 12px;
        padding-left: 13px;
        border-radius: 15px;
    }

    .input-shell input,
    .input-shell select {
        min-height: 48px;
        font-size: 13px;
    }

    .login-options {
        gap: 9px;
    }

    .remember-label,
    .forgot-link {
        font-size: 10px;
    }

    .login-submit {
        min-height: 49px;
    }

    .social-section {
        margin-top: 23px;
    }

    .social-buttons {
        gap: 13px;
    }

    .social-button {
        width: 54px;
        height: 50px;
    }

    .login-orb--top {
        top: -160px;
        left: -165px;
    }

    .login-orb--bottom {
        right: -160px;
        bottom: -160px;
    }
}

/* Short screens and landscape phones */

@media (max-height: 680px) and (min-width: 481px) {
    .login-page {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-card {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .login-logo {
        width: 90px;
        height: 90px;
        margin-bottom: 12px;
        border-radius: 30%;
    }

    .logo-art {
        transform: scale(0.68);
    }

    .login-heading {
        margin-bottom: 16px;
    }

    .social-section {
        margin-top: 16px;
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .login-card {
        animation: none;
    }

    .login-page *,
    .login-page *::before,
    .login-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}




