/* ===== Halaman Login & Logout (3D Flip Card - Tema BookBase) ===== */

body.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    background-color: #09090b;
    background-image:
        radial-gradient(880px 520px at 16% 14%, rgba(255, 91, 46, 0.16), transparent 60%),
        radial-gradient(760px 480px at 86% 86%, rgba(254, 243, 199, 0.07), transparent 60%),
        linear-gradient(135deg, rgba(9, 9, 11, 0.86) 0%, rgba(12, 13, 18, 0.82) 50%, rgba(15, 16, 22, 0.88) 100%),
        url('../gambar/library_bg.jpg');
    background-size: cover;
    background-position: center;
    color: #f8fafc;
}

.styled-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.form {
    position: relative;
    width: 345px;
    min-height: 515px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.form .form_front,
.form .form_back {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.085) 0%, rgba(255, 91, 46, 0.07) 45%, rgba(18, 19, 24, 0.88) 100%);
    -webkit-backdrop-filter: blur(18px) saturate(165%);
    backdrop-filter: blur(18px) saturate(165%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        inset 2px 2px 10px rgba(0, 0, 0, 0.85),
        inset -1px -1px 5px rgba(255, 255, 255, 0.22),
        0 24px 48px -12px rgba(0, 0, 0, 0.85),
        0 0 36px -14px rgba(255, 91, 46, 0.24);
}

.form .form_front {
    gap: 18px;
    padding: 52px 42px;
}

.form .form_back {
    gap: 16px;
    transform: rotateY(-180deg);
    padding: 42px 42px;
}

.form_details {
    font-size: 25px;
    font-weight: 700;
    padding-bottom: 4px;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

.login-tabs {
    display: flex;
    width: 245px;
    gap: 6px;
    padding: 4px;
    border-radius: 10px;
    background-color: rgba(12, 13, 18, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.75);
}

.login-tab {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: rgba(244, 244, 245, 0.62);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s ease;
}

.login-tab.is-active {
    background: linear-gradient(180deg, rgba(255, 118, 66, 0.34) 0%, rgba(255, 91, 46, 0.18) 100%);
    border-color: rgba(255, 138, 92, 0.52);
    color: #ffffff;
    box-shadow: 0 4px 12px -4px rgba(255, 91, 46, 0.45);
}

.login-alert {
    width: 245px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.login-alert-success {
    background: rgba(34, 197, 94, 0.16);
    color: #bbf7d0;
    border: 1px solid rgba(74, 222, 128, 0.35);
}

.login-alert-danger {
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.login-alert-warning {
    background: rgba(245, 158, 11, 0.16);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.login-body .form .input,
.login-body .form input[type="text"].input,
.login-body .form input[type="password"].input {
    width: 245px;
    min-height: 45px;
    color: #f8fafc !important;
    outline: none;
    transition: 0.3s ease;
    padding: 0 12px !important;
    background: rgba(15, 16, 22, 0.78) !important;
    background-color: rgba(15, 16, 22, 0.78) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    font-family: inherit;
    font-size: 13.5px;
    box-shadow:
        4px 4px 10px rgba(0, 0, 0, 0.75),
        inset 1px 1px 4px rgba(0, 0, 0, 0.65) !important;
}

.login-body .form .input:-webkit-autofill,
.login-body .form .input:-webkit-autofill:hover,
.login-body .form .input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f8fafc !important;
    -webkit-box-shadow: 0 0 0 1000px #14151c inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.login-body .form .input::placeholder {
    color: rgba(244, 244, 245, 0.45) !important;
}

.login-body .form .input:focus::placeholder {
    transition: 0.25s;
    opacity: 0;
}

.login-body .form .input:focus {
    transform: scale(1.03);
    border-color: rgba(255, 118, 66, 0.68) !important;
    background: rgba(20, 21, 28, 0.92) !important;
    background-color: rgba(20, 21, 28, 0.92) !important;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.75),
        0 0 0 3px rgba(255, 91, 46, 0.2),
        inset 2px 2px 8px rgba(0, 0, 0, 0.85) !important;
}

.login-body .form .btn {
    padding: 11px 38px !important;
    cursor: pointer;
    background: linear-gradient(180deg, #ff7a4d 0%, #ff5b2e 100%) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 180, 140, 0.45) !important;
    box-shadow:
        0 10px 22px -8px rgba(255, 91, 46, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    transition: 0.3s ease;
}

.login-body .form .btn:hover,
.login-body .form .btn:focus {
    transform: scale(1.04);
    filter: brightness(1.07);
    background: linear-gradient(180deg, #ff875e 0%, #ff5b2e 100%) !important;
    box-shadow:
        0 14px 28px -8px rgba(255, 91, 46, 0.78),
        inset 0 1px 0 rgba(255, 255, 255, 0.38) !important;
}

.form .switch {
    font-size: 12.5px;
    color: rgba(244, 244, 245, 0.72);
}

.form .switch .signup_tog {
    font-weight: 700;
    color: #ff9f7d;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.form .switch .signup_tog:hover {
    color: #ffd1b8;
}

.container #signup_toggle {
    display: none;
}

.container #signup_toggle:checked + .form {
    transform: rotateY(-180deg);
}

.login-help-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.help-sep {
    font-size: 11px;
    color: rgba(244, 244, 245, 0.38);
}

.forgot_link {
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(244, 244, 245, 0.72);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot_link:hover {
    color: #ff9f7d;
    text-decoration: underline;
}

.form.form-single {
    min-height: 400px;
}

.form.form-single .form_front {
    position: relative;
}

.recovery-sub {
    width: 245px;
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    text-align: center;
    color: rgba(244, 244, 245, 0.72);
}

.recovery-sub strong {
    color: #ff9f7d;
    word-break: break-all;
}

.recovery-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 245px;
}

.login-options {
    width: 245px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: -4px 0 2px;
}

.login-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(244, 244, 245, 0.78);
    cursor: pointer;
    user-select: none;
}

.login-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #ff5b2e;
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    body.login-body {
        padding: 16px;
    }

    .form {
        width: 100%;
        max-width: 345px;
        min-height: 495px;
    }

    .form .form_front,
    .form .form_back {
        width: 100%;
        box-sizing: border-box;
        padding: 36px 22px;
    }

    .login-tabs,
    .login-alert,
    .login-options,
    .recovery-sub,
    .recovery-actions,
    .login-body .form .input,
    .login-body .form input[type="text"].input,
    .login-body .form input[type="password"].input {
        width: 100%;
        box-sizing: border-box;
    }

    .login-body .form .btn {
        width: 100%;
    }
}
