
/* ==========================================================================
   LOGIN PENGGUNA - MODERN 2026
   ========================================================================== */

:root {
    --primary: #e50914;
    --primary-dark: #b20710;
    --primary-light: #ff3340;

    --bg: #f5f7fa;
    --card: rgba(255, 255, 255, 0.88);

    --text: #111827;
    --text-soft: #6b7280;
    --border: #e5e7eb;

    --input-bg: #f8fafc;
    --shadow: 0 25px 70px rgba(0, 0, 0, 0.12);

    --radius: 24px;
}


/* ==========================================================================
   COLOR THEMES
   ========================================================================== */

body[data-theme="blue"] {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
}

body[data-theme="green"] {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #22c55e;
}

body[data-theme="purple"] {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #8b5cf6;
}


/* ==========================================================================
   DARK MODE
   ========================================================================== */

body.dark-mode {

    --bg: #080b12;

    --card: rgba(17, 24, 39, 0.90);

    --text: #f8fafc;
    --text-soft: #94a3b8;

    --border: rgba(255, 255, 255, 0.09);

    --input-bg: rgba(255, 255, 255, 0.055);

    --shadow:
        0 30px 80px rgba(0, 0, 0, 0.55);
}


/* ==========================================================================
   RESET
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {

    min-height: 100vh;

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

    font-family: "Inter", sans-serif;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(229, 9, 20, 0.12),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(229, 9, 20, 0.10),
            transparent 30%
        ),
        var(--bg);

    color: var(--text);

    overflow-x: hidden;

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


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

.bg-decoration {

    position: fixed;

    width: 280px;
    height: 280px;

    border-radius: 50%;

    filter: blur(80px);

    opacity: 0.18;

    pointer-events: none;

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

.bg-one {

    background: var(--primary);

    top: -100px;
    left: -100px;
}

.bg-two {

    background: var(--primary-light);

    bottom: -100px;
    right: -100px;

    animation-delay: -4s;
}


@keyframes float {

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

    50% {
        transform: translate(25px, -25px);
    }
}


/* ==========================================================================
   THEME CONTROLS
   ========================================================================== */

.theme-controls {

    position: fixed;

    top: 24px;
    right: 24px;

    display: flex;

    gap: 10px;

    z-index: 100;
}

.theme-btn {

    width: 44px;
    height: 44px;

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

    border-radius: 13px;

    background: var(--card);

    color: var(--text);

    backdrop-filter: blur(15px);

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

    cursor: pointer;

    transition:
        transform 0.25s ease,
        color 0.25s ease,
        background 0.25s ease;
}

.theme-btn:hover {

    transform: translateY(-3px);

    color: var(--primary);
}


/* ==========================================================================
   COLOR MENU
   ========================================================================== */

.color-menu {
    position: relative;
}

.color-options {

    position: absolute;

    top: 52px;
    right: 0;

    display: flex;

    gap: 8px;

    padding: 9px;

    border-radius: 14px;

    background: var(--card);

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

    backdrop-filter: blur(20px);

    box-shadow: var(--shadow);

    opacity: 0;

    visibility: hidden;

    transform: translateY(-8px);

    transition: 0.25s ease;
}

.color-options.show {

    opacity: 1;

    visibility: visible;

    transform: translateY(0);
}

.color-options button {

    border: none;

    background: transparent;

    cursor: pointer;
}

.color {

    width: 25px;
    height: 25px;

    display: block;

    border-radius: 50%;

    border: 2px solid rgba(255, 255, 255, 0.8);

    transition: transform 0.2s ease;
}

.color:hover {
    transform: scale(1.18);
}

.color.red {
    background: #e50914;
}

.color.blue {
    background: #2563eb;
}

.color.green {
    background: #16a34a;
}

.color.purple {
    background: #7c3aed;
}


/* ==========================================================================
   LOGIN WRAPPER
   ========================================================================== */

.login-wrapper {

    width: 100%;

    padding: 40px 20px;

    display: flex;

    justify-content: center;
}


/* ==========================================================================
   LOGIN CARD
   ========================================================================== */

.login-card {

    width: 100%;

    max-width: 440px;

    padding: 42px;

    border-radius: var(--radius);

    background: var(--card);

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

    backdrop-filter: blur(25px);

    -webkit-backdrop-filter: blur(25px);

    box-shadow: var(--shadow);

    position: relative;

    overflow: hidden;

    animation: cardIn 0.7s ease both;
}

.login-card::before {

    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background:
        linear-gradient(
            90deg,
            var(--primary-dark),
            var(--primary-light),
            var(--primary)
        );
}


@keyframes cardIn {

    from {
        opacity: 0;
        transform: translateY(25px) scale(0.98);
    }

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


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

.brand {

    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 34px;
}

.brand-icon {

    width: 52px;
    height: 52px;

    flex-shrink: 0;

    display: flex;

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

    border-radius: 16px;

    color: white;

    font-size: 22px;

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

    box-shadow:
        0 12px 25px rgba(229, 9, 20, 0.25);
}

.brand-text h1 {

    font-size: 17px;

    font-weight: 800;

    letter-spacing: -0.4px;
}

.brand-text span {

    display: block;

    margin-top: 3px;

    font-size: 12px;

    color: var(--text-soft);
}


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

.login-heading {

    margin-bottom: 30px;
}

.login-heading h2 {

    font-size: 29px;

    font-weight: 800;

    letter-spacing: -1px;

    margin-bottom: 8px;
}

.login-heading p {

    font-size: 14px;

    line-height: 1.6;

    color: var(--text-soft);
}


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

.form-group {

    margin-bottom: 21px;
}

.form-group label {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    margin-bottom: 9px;

    font-size: 13px;

    font-weight: 700;
}

.form-group label i {

    color: var(--primary);

    font-size: 12px;
}

.label-row {

    display: flex;

    align-items: center;

    justify-content: space-between;
}

.label-row a {

    font-size: 12px;

    font-weight: 600;

    color: var(--primary);

    text-decoration: none;

    transition: 0.2s ease;
}

.label-row a:hover {

    color: var(--primary-dark);

    text-decoration: underline;
}


/* ==========================================================================
   INPUT
   ========================================================================== */

.input-wrapper {

    position: relative;
}

.input-wrapper input {

    width: 100%;

    height: 52px;

    padding:
        0 48px
        0 45px;

    border-radius: 14px;

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

    outline: none;

    background: var(--input-bg);

    color: var(--text);

    font-family: inherit;

    font-size: 14px;

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

.input-wrapper input::placeholder {

    color: var(--text-soft);

    opacity: 0.65;
}

.input-wrapper input:focus {

    border-color: var(--primary);

    box-shadow:
        0 0 0 4px
        color-mix(
            in srgb,
            var(--primary) 12%,
            transparent
        );

    background: var(--card);
}

.input-icon {

    position: absolute;

    left: 16px;

    top: 50%;

    transform: translateY(-50%);

    color: var(--text-soft);

    font-size: 14px;

    pointer-events: none;

    transition: color 0.25s ease;
}

.input-wrapper:focus-within .input-icon {

    color: var(--primary);
}


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

.password-toggle {

    position: absolute;

    right: 10px;
    top: 50%;

    transform: translateY(-50%);

    width: 35px;
    height: 35px;

    border: none;

    border-radius: 10px;

    background: transparent;

    color: var(--text-soft);

    cursor: pointer;

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

.password-toggle:hover {

    background: rgba(127, 127, 127, 0.10);

    color: var(--primary);
}


/* ==========================================================================
   REMEMBER
   ========================================================================== */

.form-options {

    margin: 4px 0 23px;
}

.remember {

    display: inline-flex;

    align-items: center;

    gap: 9px;

    cursor: pointer;

    font-size: 13px;

    color: var(--text-soft);

    user-select: none;
}

.remember input {

    position: absolute;

    opacity: 0;

}

.checkmark {

    width: 18px;
    height: 18px;

    display: flex;

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

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

    border-radius: 5px;

    background: var(--input-bg);

    transition: 0.2s ease;
}

.remember input:checked + .checkmark {

    background: var(--primary);

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

.remember input:checked + .checkmark::after {

    content: "\f00c";

    font-family: "Font Awesome 6 Free";

    font-weight: 900;

    color: white;

    font-size: 10px;
}


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

.login-btn {

    width: 100%;

    height: 54px;

    display: flex;

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

    gap: 12px;

    border: none;

    border-radius: 14px;

    color: white;

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

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

    box-shadow:
        0 12px 28px
        color-mix(
            in srgb,
            var(--primary) 28%,
            transparent
        );

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.login-btn i {

    transition: transform 0.25s ease;
}

.login-btn:hover {

    transform: translateY(-2px);

    filter: brightness(1.06);

    box-shadow:
        0 17px 35px
        color-mix(
            in srgb,
            var(--primary) 35%,
            transparent
        );
}

.login-btn:hover i {

    transform: translateX(5px);
}

.login-btn:active {

    transform: translateY(0);

}


/* ==========================================================================
   REGISTER
   ========================================================================== */

.register-box {

    margin-top: 25px;

    padding-top: 22px;

    border-top: 1px solid var(--border);

    text-align: center;

    font-size: 13px;

    color: var(--text-soft);
}

.register-box a {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    margin-left: 4px;

    color: var(--primary);

    font-weight: 700;

    text-decoration: none;

    transition: 0.2s ease;
}

.register-box a:hover {

    color: var(--primary-dark);

    text-decoration: underline;
}


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

.security-info {

    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin-top: 23px;

    padding: 12px 13px;

    border-radius: 12px;

    background:
        color-mix(
            in srgb,
            var(--primary) 6%,
            transparent
        );

    color: var(--text-soft);

    font-size: 11px;

    line-height: 1.5;
}

.security-info i {

    flex-shrink: 0;

    margin-top: 2px;

    color: var(--primary);
}


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

.login-footer {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    margin-top: 24px;

    color: var(--text-soft);

    font-size: 10px;

    opacity: 0.75;
}

.dot {

    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: var(--text-soft);
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 600px) {

    .theme-controls {

        top: 15px;
        right: 15px;
    }

    .theme-btn {

        width: 40px;
        height: 40px;

        border-radius: 11px;
    }

    .login-wrapper {

        padding:
            75px
            15px
            25px;
    }

    .login-card {

        padding: 30px 23px;

        border-radius: 21px;
    }

    .brand {

        margin-bottom: 28px;
    }

    .login-heading h2 {

        font-size: 25px;
    }

    .login-heading p {

        font-size: 13px;
    }

    .input-wrapper input {

        height: 50px;
    }

    .login-btn {

        height: 52px;
    }

    .login-footer {

        flex-wrap: wrap;
    }
}


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

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

    *,
    *::before,
    *::after {

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}

