/* ===================================================
   Auth Pages - Modern Login Styles
   Glassmorphism Design for Space Background
   =================================================== */

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

body {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ===== Auth Wrapper ===== */
.auth-wrapper {
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* ===== Auth Container ===== */
.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    animation: authFadeIn 0.6s ease-out;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* ===== Logo ===== */
.auth-logo {
    text-align: center;
    margin-bottom: 12px;
}

.auth-logo img {
    max-width: 320px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease;
}

.auth-logo img:hover {
    transform: scale(1.03);
}

/* ===== Glass Card ===== */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* ===== Card Header ===== */
.auth-header {
    text-align: center;
    margin-bottom: 18px;
}

.auth-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    animation: authPulse 2.5s ease-in-out infinite;
}

@keyframes authPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    }

    50% {
        transform: scale(1.04);
        box-shadow: 0 14px 40px rgba(59, 130, 246, 0.5);
    }
}

.auth-icon i {
    font-size: 34px;
    color: white;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.auth-subtitle {
    font-size: 13px;
    color: #64748b;
}

/* ===== Alert ===== */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: authShake 0.4s ease;
}

@keyframes authShake {

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

    25% {
        transform: translateX(-6px);
    }

    50% {
        transform: translateX(6px);
    }

    75% {
        transform: translateX(-3px);
    }
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.auth-alert-error i {
    font-size: 20px;
    color: #ef4444;
    flex-shrink: 0;
}

.auth-alert-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.auth-alert-close:hover {
    color: #475569;
}

/* ===== Form ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-label i {
    font-size: 14px;
    color: #3b82f6;
}

.auth-input {
    width: 100%;
    padding: 11px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    transition: all 0.25s ease;
    outline: none;
}

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

.auth-input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.auth-input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Password Field */
.auth-password-wrap {
    position: relative;
}

.auth-password-wrap .auth-input {
    padding-right: 48px;
}

.auth-password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    transition: color 0.2s;
}

.auth-password-toggle:hover {
    color: #3b82f6;
}

.auth-password-toggle i {
    font-size: 20px;
}

/* Error Text */
.auth-error {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #dc2626;
}

.auth-error i {
    font-size: 13px;
}

/* ===== Captcha ===== */
.auth-captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-captcha-img-wrap {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s;
}

.auth-captcha-img-wrap:hover {
    border-color: #3b82f6;
}

.auth-captcha-img-wrap:hover .auth-captcha-overlay {
    opacity: 1;
}

.auth-captcha-img {
    display: block;
    height: 40px;
}

.auth-captcha-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
}

.auth-captcha-overlay i {
    font-size: 24px;
    color: white;
}

.auth-captcha-input {
    flex: 1;
}

/* ===== Checkbox ===== */
.auth-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
    border-radius: 4px;
}

.auth-checkbox-label {
    font-size: 14px;
    color: #475569;
}

/* ===== Submit Button ===== */
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.auth-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(59, 130, 246, 0.5);
}

.auth-submit-btn:hover::before {
    left: 100%;
}

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

.auth-submit-btn i {
    font-size: 20px;
}

/* ===== Support Section ===== */
.auth-support {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.auth-support-text {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.auth-support-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.auth-support-logo-wrap {
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-support-logo-wrap:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.auth-support-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.auth-support-divider {
    width: 1px;
    height: 40px;
    background: #e2e8f0;
}

/* ===== Footer ===== */
.auth-footer {
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.auth-footer a {
    color: #06b6d4;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #3b82f6;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .auth-wrapper {
        padding: 16px;
    }

    .auth-card {
        padding: 28px 24px;
        border-radius: 16px;
    }

    .auth-icon {
        width: 58px;
        height: 58px;
    }

    .auth-icon i {
        font-size: 28px;
    }

    .auth-title {
        font-size: 22px;
    }

    .auth-captcha-row {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-captcha-img-wrap {
        align-self: flex-start;
    }
}