/* =========================================================
   ADMIN LOGIN CSS
   School Website Admin Panel
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #166534;
    --primary-light: #22c55e;
    --primary-dark: #052e16;

    --secondary: #facc15;

    --dark: #0f172a;
    --text: #334155;
    --text-light: #64748b;

    --white: #ffffff;
    --background: #f8fafc;
    --border: #e2e8f0;

    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;

    --radius: 16px;

    --shadow:
        0 25px 70px rgba(15, 23, 42, 0.18);
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    color: var(--text);

    background: #06130b;

    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}


/* =========================================================
   PAGE
   ========================================================= */

.admin-login-page {
    position: relative;

    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 35px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 12% 18%,
            rgba(34, 197, 94, 0.22),
            transparent 32%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(250, 204, 21, 0.10),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #020a05,
            #07170d 45%,
            #0b2916
        );
}


/* =========================================================
   BACKGROUND
   ========================================================= */

.login-background {
    position: absolute;
    inset: 0;

    overflow: hidden;

    pointer-events: none;
}

.login-grid {
    position: absolute;
    inset: 0;

    opacity: 0.5;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );

    background-size: 45px 45px;
}

.login-shape {
    position: absolute;

    display: block;

    border-radius: 50%;

    filter: blur(2px);

    animation:
        loginFloat
        8s ease-in-out infinite;
}

.shape-one {
    width: 320px;
    height: 320px;

    top: -130px;
    left: -100px;

    background:
        rgba(34, 197, 94, 0.12);
}

.shape-two {
    width: 400px;
    height: 400px;

    right: -180px;
    bottom: -180px;

    background:
        rgba(250, 204, 21, 0.06);

    animation-delay: -3s;
}

.shape-three {
    width: 170px;
    height: 170px;

    top: 30%;
    right: 10%;

    border:
        1px solid
        rgba(255, 255, 255, 0.07);

    background:
        rgba(255, 255, 255, 0.025);

    animation-delay: -5s;
}

@keyframes loginFloat {

    0%,
    100% {
        transform:
            translate3d(0, 0, 0);
    }

    50% {
        transform:
            translate3d(0, -18px, 0);
    }
}


/* =========================================================
   MAIN CONTAINER
   ========================================================= */

.login-container {
    position: relative;
    z-index: 10;

    width: min(1080px, 100%);
    min-height: 650px;

    display: grid;

    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(420px, 0.7fr);

    background: var(--white);

    border:
        1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: 28px;

    box-shadow: var(--shadow);

    overflow: hidden;
}


/* =========================================================
   LEFT BRAND PANEL
   ========================================================= */

.login-brand-panel {
    position: relative;

    min-height: 650px;

    padding: 45px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    color: var(--white);

    background:
        radial-gradient(
            circle at 85% 10%,
            rgba(34, 197, 94, 0.28),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #020b05,
            #06210f 55%,
            #14532d
        );

    overflow: hidden;
}

.login-brand-panel::before {
    content: "";

    position: absolute;

    width: 330px;
    height: 330px;

    right: -180px;
    bottom: -180px;

    border:
        45px solid
        rgba(255, 255, 255, 0.025);

    border-radius: 50%;
}

.login-brand-panel::after {
    content: "";

    position: absolute;

    width: 150px;
    height: 150px;

    right: 50px;
    top: 170px;

    border:
        1px solid
        rgba(255, 255, 255, 0.06);

    border-radius: 28px;

    transform:
        rotate(25deg);

    pointer-events: none;
}

.login-brand-content,
.login-brand-footer {
    position: relative;
    z-index: 2;
}


/* =========================================================
   SCHOOL BRAND
   ========================================================= */

.login-school-brand {
    display: inline-flex;
    align-items: center;

    gap: 13px;

    max-width: 100%;

    margin-bottom: 65px;
}

.login-school-logo,
.login-logo-placeholder {
    flex: 0 0 auto;

    width: 58px;
    height: 58px;

    border-radius: 16px;
}

.login-school-logo {
    padding: 5px;

    object-fit: contain;

    background: var(--white);
}

.login-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    color: #052e16;

    background:
        linear-gradient(
            135deg,
            #fde047,
            #facc15
        );

    font-size: 23px;

    box-shadow:
        0 14px 30px
        rgba(0, 0, 0, 0.18);
}

.login-school-brand span {
    display: block;

    margin-bottom: 3px;

    color: var(--secondary);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.1px;

    text-transform: uppercase;
}

.login-school-brand h1 {
    max-width: 320px;

    color: var(--white);

    font-size: 19px;
    line-height: 1.35;
}


/* =========================================================
   BRAND MESSAGE
   ========================================================= */

.login-brand-message {
    max-width: 500px;
}

.login-brand-badge {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    margin-bottom: 17px;
    padding: 8px 12px;

    color: #dcfce7;

    background:
        rgba(255, 255, 255, 0.07);

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-radius: 100px;

    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.4px;

    text-transform: uppercase;

    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.login-brand-message h2 {
    margin-bottom: 17px;

    color: var(--white);

    font-size:
        clamp(
            34px,
            4vw,
            48px
        );

    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -1.5px;
}

.login-brand-message h2 strong {
    display: block;

    color: var(--secondary);
}

.login-brand-message p {
    max-width: 450px;

    color:
        rgba(255, 255, 255, 0.66);

    font-size: 12px;
    line-height: 1.8;
}


/* =========================================================
   FEATURES
   ========================================================= */

.login-feature-list {
    margin-top: 35px;

    display: grid;

    gap: 12px;
}

.login-feature {
    max-width: 380px;

    display: flex;
    align-items: center;

    gap: 12px;
}

.login-feature > span {
    flex: 0 0 auto;

    width: 39px;
    height: 39px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--secondary);

    background:
        rgba(255, 255, 255, 0.07);

    border:
        1px solid
        rgba(255, 255, 255, 0.09);

    border-radius: 11px;

    font-size: 13px;
}

.login-feature strong {
    display: block;

    margin-bottom: 2px;

    color: var(--white);

    font-size: 10px;
}

.login-feature small {
    display: block;

    color:
        rgba(255, 255, 255, 0.52);

    font-size: 8px;
}


/* =========================================================
   BRAND FOOTER
   ========================================================= */

.login-brand-footer {
    margin-top: 40px;

    display: flex;
    align-items: center;

    gap: 7px;

    color:
        rgba(255, 255, 255, 0.48);

    font-size: 9px;
}

.login-brand-footer i {
    color: var(--primary-light);
}


/* =========================================================
   FORM PANEL
   ========================================================= */

.login-form-panel {
    min-height: 650px;

    padding: 48px 50px 25px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #fbfdfc
        );
}

.login-form-wrapper {
    width: 100%;
    max-width: 410px;

    margin: auto;
}


/* =========================================================
   MOBILE BRAND
   ========================================================= */

.login-mobile-brand {
    display: none;

    align-items: center;

    gap: 10px;

    margin-bottom: 35px;
}

.login-mobile-icon {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-light)
        );

    border-radius: 13px;
}

.login-mobile-brand span {
    display: block;

    color: var(--primary);

    font-size: 8px;
    font-weight: 800;

    text-transform: uppercase;
}

.login-mobile-brand strong {
    display: block;

    margin-top: 2px;

    color: var(--dark);

    font-size: 13px;
}


/* =========================================================
   HEADING
   ========================================================= */

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

.login-small-title {
    display: block;

    margin-bottom: 5px;

    color: var(--primary);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;

    text-transform: uppercase;
}

.login-heading h2 {
    margin-bottom: 8px;

    color: var(--dark);

    font-size:
        clamp(
            29px,
            4vw,
            37px
        );

    line-height: 1.2;
    letter-spacing: -0.8px;
}

.login-heading p {
    max-width: 350px;

    color: var(--text-light);

    font-size: 10px;
    line-height: 1.7;
}


/* =========================================================
   ALERT
   ========================================================= */

.login-alert {
    margin-bottom: 20px;
    padding: 13px 14px;

    display: flex;
    align-items: flex-start;

    gap: 10px;

    border-radius: 12px;
}

.login-alert-error {
    color: #991b1b;

    background: var(--danger-bg);

    border:
        1px solid
        var(--danger-border);
}

.login-alert-icon {
    flex: 0 0 auto;

    width: 31px;
    height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--danger);

    background: var(--white);

    border-radius: 9px;
}

.login-alert strong {
    display: block;

    margin-bottom: 2px;

    font-size: 10px;
}

.login-alert p {
    font-size: 9px;
    line-height: 1.55;
}


/* =========================================================
   FORM
   ========================================================= */

.admin-login-form {
    width: 100%;
}

.login-form-group {
    margin-bottom: 18px;
}

.login-form-group label {
    display: block;

    margin-bottom: 7px;

    color: var(--dark);

    font-size: 10px;
    font-weight: 700;
}

.login-input-wrapper {
    position: relative;
}

.login-input-icon {
    position: absolute;

    left: 15px;
    top: 50%;

    z-index: 2;

    transform:
        translateY(-50%);

    color: var(--text-light);

    font-size: 12px;

    pointer-events: none;

    transition:
        color 0.2s ease;
}

.login-input-wrapper input {
    width: 100%;
    height: 52px;

    padding:
        10px
        48px
        10px
        43px;

    color: var(--dark);

    background: #f8fafc;

    border:
        1px solid
        #dce3e9;

    border-radius: 12px;

    outline: none;

    font-size: 11px;
    font-weight: 500;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.login-input-wrapper input::placeholder {
    color: #94a3b8;
}

.login-input-wrapper input:hover {
    border-color: #cbd5e1;
}

.login-input-wrapper input:focus {
    background: var(--white);

    border-color: var(--primary-light);

    box-shadow:
        0 0 0 4px
        rgba(34, 197, 94, 0.09);
}

.login-input-wrapper:focus-within
.login-input-icon {
    color: var(--primary);
}


/* =========================================================
   PASSWORD TOGGLE
   ========================================================= */

.password-toggle {
    position: absolute;

    right: 8px;
    top: 50%;

    width: 37px;
    height: 37px;

    display: flex;
    align-items: center;
    justify-content: center;

    transform:
        translateY(-50%);

    color: var(--text-light);

    background: transparent;

    border: 0;
    border-radius: 9px;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.password-toggle:hover {
    color: var(--primary);

    background:
        rgba(34, 197, 94, 0.08);
}


/* =========================================================
   FIELD ERRORS
   ========================================================= */

.login-field-error {
    min-height: 14px;

    display: block;

    margin-top: 5px;

    color: var(--danger);

    font-size: 8px;
    font-weight: 600;
}

.login-input-wrapper input.login-input-error {
    border-color: var(--danger);

    background: #fffafa;

    box-shadow:
        0 0 0 3px
        rgba(220, 38, 38, 0.06);
}


/* =========================================================
   SECURITY ROW
   ========================================================= */

.login-security-row {
    margin:
        3px 0
        18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-security-row span {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    color: var(--text-light);

    font-size: 8px;
}

.login-security-row i {
    color: var(--primary);
}


/* =========================================================
   LOGIN BUTTON
   ========================================================= */

.admin-login-button {
    position: relative;

    width: 100%;
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 11px 20px;

    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #15803d
        );

    border: 0;
    border-radius: 12px;

    box-shadow:
        0 13px 28px
        rgba(22, 101, 52, 0.20);

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;

    overflow: hidden;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.admin-login-button::before {
    content: "";

    position: absolute;

    width: 100px;
    height: 100px;

    left: -120px;
    top: -25px;

    background:
        rgba(255, 255, 255, 0.12);

    border-radius: 50%;

    transition:
        left 0.4s ease;
}

.admin-login-button:hover::before {
    left: calc(100% + 20px);
}

.admin-login-button:hover {
    transform:
        translateY(-2px);

    box-shadow:
        0 17px 34px
        rgba(22, 101, 52, 0.26);
}

.admin-login-button:active {
    transform:
        translateY(0);
}

.admin-login-button:disabled {
    opacity: 0.72;

    cursor: not-allowed;

    transform: none;
}

.admin-login-button > * {
    position: relative;
    z-index: 2;
}

.admin-login-button.is-loading
#loginButtonIcon {
    animation:
        adminLoginSpinner
        0.75s linear infinite;
}

@keyframes adminLoginSpinner {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   BACK HOME
   ========================================================= */

.login-back-home {
    margin-top: 22px;

    text-align: center;
}

.login-back-home a {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    color: var(--text-light);

    font-size: 9px;
    font-weight: 600;

    transition:
        color 0.2s ease;
}

.login-back-home a:hover {
    color: var(--primary);
}


/* =========================================================
   FORM FOOTER
   ========================================================= */

.login-form-footer {
    margin-top: 30px;

    text-align: center;
}

.login-form-footer p {
    color: #94a3b8;

    font-size: 8px;
}


/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 950px) {

    .admin-login-page {
        padding: 25px;
    }

    .login-container {
        grid-template-columns:
            minmax(0, 0.75fr)
            minmax(390px, 1fr);
    }

    .login-brand-panel {
        padding: 35px;
    }

    .login-brand-message h2 {
        font-size: 36px;
    }

    .login-form-panel {
        padding:
            45px
            35px
            25px;
    }
}


/* =========================================================
   RESPONSIVE - MOBILE / SMALL TABLET
   ========================================================= */

@media (max-width: 760px) {

    .admin-login-page {
        min-height: 100svh;

        padding: 20px;
    }

    .login-container {
        width: min(500px, 100%);
        min-height: auto;

        display: block;

        border-radius: 23px;
    }

    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        min-height: auto;

        padding:
            35px
            32px
            22px;
    }

    .login-form-wrapper {
        max-width: none;
    }

    .login-mobile-brand {
        display: flex;
    }

    .login-heading h2 {
        font-size: 31px;
    }
}


/* =========================================================
   RESPONSIVE - PHONE
   ========================================================= */

@media (max-width: 480px) {

    .admin-login-page {
        align-items: flex-start;

        padding: 0;

        background: var(--white);
    }

    .login-background {
        display: none;
    }

    .login-container {
        width: 100%;
        min-height: 100svh;

        border: 0;
        border-radius: 0;

        box-shadow: none;
    }

    .login-form-panel {
        min-height: 100svh;

        padding:
            28px
            21px
            20px;
    }

    .login-mobile-brand {
        margin-bottom: 45px;
    }

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

    .login-heading h2 {
        font-size: 29px;
    }

    .login-input-wrapper input {
        height: 54px;

        font-size: 12px;
    }

    .admin-login-button {
        min-height: 54px;

        font-size: 11px;
    }

    .login-form-footer {
        margin-top: 45px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .login-shape,
    .admin-login-button.is-loading
    #loginButtonIcon {
        animation: none;
    }

    .admin-login-button,
    .login-input-wrapper input,
    .password-toggle {
        transition: none;
    }
}