/* ========================================
   ATFXAUS Authentication Page
======================================== */

:root {
    --auth-bg: #050816;
    --auth-bg-soft: #0b1023;
    --auth-card: rgba(11, 16, 35, 0.88);
    --auth-border: rgba(255, 255, 255, 0.08);

    --auth-gold: #f6b73c;
    --auth-orange: #ff8a1f;
    --auth-blue: #1f7cff;
    --auth-cyan: #28d7ff;

    --auth-text: #ffffff;
    --auth-muted: #9ca8c7;
    --auth-danger: #ff5f6d;
}

/* Page */

.auth-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(31, 124, 255, 0.18),
            transparent 35%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(246, 183, 60, 0.15),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            var(--auth-bg),
            var(--auth-bg-soft)
        );
}

/* Background Glow */

.auth-page::before,
.auth-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.auth-page::before {
    width: 240px;
    height: 240px;
    top: -60px;
    left: -60px;
    background: rgba(31, 124, 255, 0.22);
}

.auth-page::after {
    width: 260px;
    height: 260px;
    right: -80px;
    bottom: -80px;
    background: rgba(255, 138, 31, 0.16);
}

/* Card */

.auth-card {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 2;

    padding: 34px 28px;
    border-radius: 24px;

    background: var(--auth-card);
    border: 1px solid var(--auth-border);

    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.48),
        0 0 35px rgba(31, 124, 255, 0.08);

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

    animation: authCardEntry 0.6s ease;
}

/* Logo */

.auth-logo {
    text-align: center;
    margin-bottom: 18px;
}

.auth-logo img {
    width: 150px;
    max-width: 70%;
    height: auto;
    object-fit: contain;
}

/* Heading */

.auth-card h2 {
    margin: 0;
    text-align: center;
    color: var(--auth-text);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
}

.auth-card > p {
    margin: 10px 0 28px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.7;
}

/* Form Group */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #dce4ff;
    font-size: 14px;
    font-weight: 600;
}

/* Inputs */

.form-group input {
    width: 100%;
    height: 52px;
    box-sizing: border-box;

    padding: 0 16px;

    color: var(--auth-text);
    background: rgba(255, 255, 255, 0.04);

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;

    font-size: 15px;
    outline: none;

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

.form-group input::placeholder {
    color: #76809b;
}

.form-group input:focus {
    border-color: var(--auth-blue);
    background: rgba(31, 124, 255, 0.06);

    box-shadow:
        0 0 0 4px rgba(31, 124, 255, 0.12),
        0 0 18px rgba(31, 124, 255, 0.1);
}

/* Remember Row */

.remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;

    margin: 4px 0 24px;
}

.remember-row label {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--auth-muted);
    font-size: 13px;
    cursor: pointer;
}

.remember-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-gold);
}

.remember-row a {
    color: var(--auth-cyan);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.remember-row a:hover {
    color: var(--auth-gold);
}

/* Login Button */

.login-btn {
    width: 100%;
    height: 54px;

    border: none;
    border-radius: 14px;

    color: #09101f;
    background: linear-gradient(
        135deg,
        var(--auth-gold),
        var(--auth-orange)
    );

    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.3px;

    cursor: pointer;

    box-shadow:
        0 14px 30px rgba(246, 183, 60, 0.22);

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

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

    box-shadow:
        0 18px 38px rgba(246, 183, 60, 0.3);
}

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

.login-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Register Link */

.register-link {
    margin-top: 24px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 14px;
}

.register-link a {
    margin-left: 5px;
    color: var(--auth-gold);
    font-weight: 700;
    text-decoration: none;
}

.register-link a:hover {
    color: var(--auth-cyan);
}

/* Error Message */

.text-danger {
    display: block;
    margin-top: 7px;
    color: var(--auth-danger);
    font-size: 12px;
    line-height: 1.5;
}

/* Animation */

@keyframes authCardEntry {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

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

/* Mobile Responsive */

@media (max-width: 576px) {
    .auth-page {
        padding: 18px 12px;
        align-items: flex-start;
    }

    .auth-card {
        margin-top: 28px;
        padding: 28px 20px;
        border-radius: 20px;
    }

    .auth-card h2 {
        font-size: 26px;
    }

    .auth-logo img {
        width: 132px;
    }

    .remember-row {
        align-items: flex-start;
    }
}

@media (max-width: 380px) {
    .remember-row {
        flex-direction: column;
    }
}

/* Password Wrapper */

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 74px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    
    border: none;
    background: transparent;
    
    color: var(--auth-cyan);
    font-size: 12px;
    font-weight: 700;
    
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--auth-gold);
}

.form-group input.input-error {
    border-color: var(--auth-danger);
}

.login-btn.is-loading {
    opacity: 0.8;
    cursor: wait;
}

.auth-success-message {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid rgba(54, 211, 153, 0.28);
    border-radius: 10px;
    color: #b9f6dd;
    background: rgba(54, 211, 153, 0.10);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
}