
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');


/* =========================================
   BACKGROUND LOGIN MODERN DAN ELEGAN
========================================= */

body.auth-body {
    min-height: 100vh;
    margin: 0;
    padding: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: 'Plus Jakarta Sans', sans-serif;

    position: relative;
    isolation: isolate;
    overflow-x: hidden;

    background: #f2f0e8;
}

/* =========================================
   BACKGROUND GURU
   Sage, Forest Green, dan Gold
========================================= */

body.login-guru {
    --primary: #315f46;
    --primary-dark: #204532;
    --primary-soft: #e4eee6;
    --accent: #c7a66a;

    background:
        radial-gradient(
            ellipse at 8% 12%,
            rgba(143, 183, 148, 0.65) 0%,
            transparent 35%
        ),
        radial-gradient(
            ellipse at 90% 18%,
            rgba(220, 193, 133, 0.40) 0%,
            transparent 30%
        ),
        radial-gradient(
            ellipse at 75% 95%,
            rgba(101, 151, 117, 0.42) 0%,
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #e7ebdc 0%,
            #f6f0e2 45%,
            #dce8dc 100%
        );
}

/* =========================================
   BACKGROUND SISWA
   Lavender, Peach, dan Purple
========================================= */

body.login-siswa {
    --primary: #7654a5;
    --primary-dark: #543779;
    --primary-soft: #eee5f5;
    --accent: #d8a5b8;

    background:
        radial-gradient(
            ellipse at 10% 10%,
            rgba(181, 157, 225, 0.60) 0%,
            transparent 35%
        ),
        radial-gradient(
            ellipse at 90% 15%,
            rgba(255, 184, 191, 0.50) 0%,
            transparent 32%
        ),
        radial-gradient(
            ellipse at 80% 95%,
            rgba(192, 165, 225, 0.50) 0%,
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #eee5f5 0%,
            #f9eae8 50%,
            #e7e0f5 100%
        );
}

/* =========================================
   ORNAMEN BACKGROUND
========================================= */

body.auth-body::before,
body.auth-body::after {
    content: "";
    position: fixed;

    pointer-events: none;
    z-index: -1;

    border-radius: 50%;
}

/* Lingkaran besar di kiri atas */

body.auth-body::before {
    width: 420px;
    height: 420px;

    top: -190px;
    left: -130px;

    border: 1px solid rgba(255, 255, 255, 0.65);

    box-shadow:
        0 0 0 35px rgba(255, 255, 255, 0.12),
        0 0 0 75px rgba(255, 255, 255, 0.09),
        0 0 0 120px rgba(255, 255, 255, 0.06);

    animation: backgroundFloat 12s ease-in-out infinite;
}

/* Ornamen kanan bawah */

body.auth-body::after {
    width: 330px;
    height: 330px;

    right: -110px;
    bottom: -130px;

    border: 1px solid rgba(255, 255, 255, 0.65);

    box-shadow:
        0 0 0 28px rgba(255, 255, 255, 0.12),
        0 0 0 65px rgba(255, 255, 255, 0.08);

    animation: backgroundFloat 15s ease-in-out infinite reverse;
}

/* =========================================
   EFEK CAHAYA BERGERAK
========================================= */

.ambient {
    position: fixed;
    z-index: -1;

    width: 300px;
    height: 300px;

    border-radius: 50%;
    pointer-events: none;

    filter: blur(2px);
    opacity: 0.65;

    animation: ambientDrift 10s ease-in-out infinite;
}

.ambient-one {
    top: 15%;
    left: 8%;

    background:
        radial-gradient(
            circle,
            rgba(117, 163, 124, 0.34),
            transparent 70%
        );
}

.ambient-two {
    right: 8%;
    bottom: 10%;

    background:
        radial-gradient(
            circle,
            rgba(213, 175, 112, 0.30),
            transparent 70%
        );

    animation-delay: -5s;
}

/* Warna dekorasi khusus siswa */

.login-siswa .ambient-one {
    background:
        radial-gradient(
            circle,
            rgba(151, 119, 214, 0.35),
            transparent 70%
        );
}

.login-siswa .ambient-two {
    background:
        radial-gradient(
            circle,
            rgba(238, 145, 179, 0.35),
            transparent 70%
        );
}

/* =========================================
   ANIMASI BACKGROUND
========================================= */

@keyframes backgroundFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(18px, 20px) rotate(8deg);
    }
}

@keyframes ambientDrift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(25px, -20px) scale(1.15);
    }
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 600px) {
    body.auth-body::before {
        width: 260px;
        height: 260px;

        top: -130px;
        left: -110px;
    }

    body.auth-body::after {
        width: 220px;
        height: 220px;

        right: -100px;
        bottom: -100px;
    }

    .ambient {
        width: 200px;
        height: 200px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.auth-body::before,
    body.auth-body::after,
    .ambient {
        animation: none !important;
    }
}


/* ==============================
   KARTU LOGIN
============================== */

.login-layout {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 440px;

    display: block;

    min-height: auto;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;

    background: rgba(255, 255, 255, 0.92);

    box-shadow:
        0 25px 80px rgba(54, 48, 36, 0.12),
        0 5px 18px rgba(54, 48, 36, 0.04);

    animation: appear 0.65s ease both;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==============================
   SEMBUNYIKAN PANEL SAMPING
============================== */

.login-intro {
    display: none !important;
}

/* ==============================
   PANEL FORM
============================== */

.login-form-panel {
    width: 100%;
    min-height: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 38px 35px 34px;

    background: transparent;
}

.login-form-content {
    width: 100%;
    max-width: 340px;
}

/* ==============================
   TOMBOL KEMBALI
============================== */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 30px;

    color: #85817b;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    transition: 0.25s ease;
}

.back-link:hover {
    color: var(--primary);
    transform: translateX(-3px);
}

/* ==============================
   JUDUL LOGIN
============================== */

.form-heading {
    margin-bottom: 28px;
}

.form-role-icon {
    width: 62px;
    height: 62px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 22px;

    border-radius: 20px;

    color: var(--primary);
    background: var(--primary-soft);

    font-size: 30px;

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.7);

    animation: iconAppear 0.7s ease both;
}

@keyframes iconAppear {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(-8deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.section-eyebrow {
    display: block;

    margin-bottom: 9px;

    color: var(--primary);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 2px;
}

.form-heading h2 {
    margin: 0;

    color: #292b28;

    font-size: 29px;
    font-weight: 800;

    letter-spacing: -1.2px;
}

.form-heading p {
    margin: 10px 0 0;

    color: #898780;

    font-size: 12px;
    line-height: 1.7;
}

/* ==============================
   PESAN ERROR
============================== */

.login-alert {
    padding: 12px 14px;
    margin-bottom: 18px;

    border: none;
    border-radius: 12px;

    font-size: 11px;
    line-height: 1.7;
}

/* ==============================
   FORM INPUT
============================== */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field label {
    display: block;

    margin-bottom: 9px;

    color: #44443f;

    font-size: 12px;
    font-weight: 700;
}

.input-shell {
    display: flex;
    align-items: center;

    min-height: 54px;
    padding: 0 15px;

    gap: 12px;

    border: 1px solid #e9e6df;
    border-radius: 14px;

    background: #faf9f6;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.input-shell > i {
    color: #aaa69c;
    font-size: 17px;

    transition: color 0.25s ease;
}

.input-shell:focus-within {
    background: #ffffff;

    border-color: var(--primary);

    box-shadow:
        0 0 0 4px var(--primary-soft);
}

.input-shell:focus-within > i {
    color: var(--primary);
}

.input-shell input {
    width: 100%;
    min-width: 0;
    height: 51px;

    padding: 0;

    border: none;
    outline: none;

    background: transparent;

    color: #33332f;

    font-family: inherit;
    font-size: 12px;
}

.input-shell input::placeholder {
    color: #aaa69e;
}

.input-shell input:focus {
    outline: none;
    box-shadow: none;
}

/* ==============================
   TOMBOL LIHAT PASSWORD
============================== */

.password-toggle {
    width: 32px;
    height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: none;
    border-radius: 9px;

    background: transparent;
    color: #99958d;

    cursor: pointer;

    transition: 0.2s ease;
}

.password-toggle:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.password-toggle i {
    font-size: 17px;
}

/* ==============================
   TOMBOL MASUK
============================== */

.btn-login {
    position: relative;
    overflow: hidden;

    width: 100%;
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 4px;
    padding: 0 17px 0 20px;

    border: none;
    border-radius: 14px;

    background:
        linear-gradient(
            110deg,
            var(--primary-dark),
            var(--primary)
        );

    color: #ffffff;

    font-family: inherit;
    font-size: 12px;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 10px 24px rgba(49, 95, 70, 0.17);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.login-siswa .btn-login {
    box-shadow:
        0 10px 24px rgba(118, 84, 165, 0.18);
}

.btn-login::before {
    content: "";

    position: absolute;
    top: 0;
    left: -120%;

    width: 70%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
        );

    transform: skewX(-20deg);
    transition: left 0.65s ease;
}

.btn-login span,
.btn-login i {
    position: relative;
    z-index: 1;
}

.btn-login i {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.17);

    font-size: 17px;

    transition: transform 0.25s ease;
}

.btn-login:hover {
    color: #ffffff;

    transform: translateY(-2px);

    box-shadow:
        0 14px 30px rgba(49, 95, 70, 0.23);
}

.login-siswa .btn-login:hover {
    box-shadow:
        0 14px 30px rgba(118, 84, 165, 0.25);
}

.btn-login:hover::before {
    left: 150%;
}

.btn-login:hover i {
    transform: translateX(3px);
}

.btn-login:active {
    transform: scale(0.99);
}

/* ==============================
   DAFTAR AKUN
============================== */

.register-prompt {
    margin-top: 25px;

    color: #918d85;

    font-size: 11px;
    line-height: 1.9;

    text-align: center;
}

.register-prompt a {
    color: var(--primary);

    font-weight: 800;

    text-decoration: none;
}

.register-prompt a:hover {
    text-decoration: underline;
}

/* ==============================
   PILIH PERAN
============================== */

.switch-role {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: 24px;
    padding-top: 19px;

    border-top: 1px solid #efede8;

    color: #a09b93;

    font-size: 10px;
}

.switch-role a {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: #615d56;

    font-weight: 800;

    transition: 0.2s ease;
}

.switch-role a:hover {
    color: var(--primary);
}

/* ==============================
   TRANSISI PERPINDAHAN HALAMAN
============================== */

.page-enter {
    animation: appear 0.55s ease both;
}

.page-leave {
    pointer-events: none;
    animation: leavePage 0.3s ease forwards;
}

@keyframes leavePage {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ==============================
   RESPONSIVE
============================== */

@media (max-width: 480px) {
    body.auth-body {
        padding: 15px;
    }

    .login-layout {
        max-width: 390px;
        border-radius: 23px;
    }

    .login-form-panel {
        padding: 29px 23px;
    }

    .back-link {
        margin-bottom: 25px;
    }

    .form-role-icon {
        width: 55px;
        height: 55px;

        margin-bottom: 18px;

        border-radius: 17px;
        font-size: 26px;
    }

    .form-heading h2 {
        font-size: 26px;
    }

    .login-form {
        gap: 17px;
    }

    .input-shell {
        min-height: 51px;
    }

    .input-shell input {
        height: 48px;
    }

    .btn-login {
        min-height: 51px;
    }
}

@media (max-width: 350px) {
    .login-form-panel {
        padding: 24px 18px;
    }

    .switch-role {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ==============================
   AKSESIBILITAS
============================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
