/* --- Auth Style System (for login, register, etc) --- */

.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-deep);
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow: hidden;
    position: relative;
}

.auth-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(112, 255, 209, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.auth-bg-glow-top-right {
    top: -200px;
    right: -200px;
}

.auth-bg-glow-bottom-left {
    bottom: -200px;
    left: -200px;
}

.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.auth-card {
    background: rgba(10, 17, 17, 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(112, 255, 209, 0.1);
    border-radius: 32px;
    padding: 32px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5), 0 0 40px rgba(112, 255, 209, 0.05);
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.auth-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(112, 255, 209, 0.3);
    margin-bottom: 12px;
    transform: rotate(-5deg);
}

.auth-logo-icon i {
    color: #000;
    font-size: 24px;
}

.auth-logo-text {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -1.2px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.auth-logo-text span {
    color: var(--primary);
}

.auth-logo-subtitle {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.auth-error-alert {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 0.2);
    color: #ffbcbc;
    padding: 12px;
    border-radius: 16px;
    margin-bottom: 16px;
    font-size: 12px;
    text-align: center;
    font-weight: 600;
}

.auth-error-icon {
    margin-right: 8px;
}

.auth-form-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    margin-left: 4px;
}

.auth-input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.auth-input-wrapper i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    opacity: 0.4;
    transition: 0.3s;
}


.auth-password-toggle {
    position: absolute;
    right: 20px;
    left: auto !important;
    /* Force override */
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.auth-password-toggle:hover {
    color: var(--primary);
    opacity: 1;
}

.auth-input {
    width: 100%;
    background: rgba(2, 6, 6, 0.5);
    border: 1.5px solid rgba(112, 255, 209, 0.1);
    border-radius: 16px;
    padding: 16px 20px 16px 52px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.auth-input:focus {
    border-color: var(--primary);
    background: rgba(112, 255, 209, 0.02);
    box-shadow: 0 0 20px rgba(112, 255, 209, 0.1);
}

.auth-input:focus+i {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.auth-remember-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-muted);
}

.auth-remember-checkbox {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.auth-turnstile-container {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.auth-submit-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), #50E6B8);
    border: none;
    border-radius: 16px;
    color: #010A0A;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(112, 255, 209, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(112, 255, 209, 0.4);
}

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

.auth-submit-btn-icon {
    font-size: 12px;
}

.auth-divider-container {
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(112, 255, 209, 0.1);
}

.auth-divider-text {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-google-btn {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(112, 255, 209, 0.1);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.auth-google-icon {
    width: 18px;
    height: 18px;
}

.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.auth-footer-link {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(112, 255, 209, 0.3);
    padding-bottom: 2px;
}

.auth-grains {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

.auth-resend-btn {
    width: auto;
    border: 1px solid rgba(112, 255, 209, 0.12);
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px auto;
    padding: 10px;
    border-radius: 12px;
}

.auth-resend-btn:hover {
    color: var(--primary);
    background: rgba(112, 255, 209, 0.05);
}

.auth-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent;
    color: var(--text-muted);
}

.auth-forgot-link {
    color: #44ad8b;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(112, 255, 209, 0.3);
    padding-bottom: 2px;
}

.auth-forgot-link:hover {
    color: var(--primary);
    text-decoration: none;

}

/* --- PIN SPECIFIC STYLES (from auth/pin.blade.php) --- */

.auth-card-pin {
    background: rgba(10, 17, 17, 0.82);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(112, 255, 209, 0.12);
    padding: 48px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5), 0 0 50px rgba(112, 255, 209, 0.08);
    text-align: center;
}

.auth-pin-inputs {
    display: flex;
    margin-bottom: 30px;
    justify-content: center;
    gap: 12px;
}

.auth-pin-box {
    width: 64px;
    height: 64px;
    background: rgba(2, 6, 6, 0.6);
    border: 2px solid rgba(112, 255, 209, 0.1);
    border-radius: 16px;
    color: var(--primary);
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.auth-pin-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(112, 255, 209, 0.25);
    background: rgba(112, 255, 209, 0.05);
    transform: scale(1.05);
}

.auth-pin-icon-box {
    width: 72px;
    height: 72px;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    transform: rotate(-5deg);
}

.auth-pin-icon {
    color: var(--primary);
    font-size: 32px;
}

.auth-pin-title {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -1px;
    color: #fff;
}

.auth-pin-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
}

.auth-pin-cancel-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
    opacity: 0.7;
    transition: 0.3s;
    border-bottom: 1px solid transparent;
}

/* --- Password Strength & Match Indicators --- */
.password-strength-meter {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
    display: flex;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 11px;
    font-weight: 700;
    margin-top: 6px;
    text-align: right;
    text-transform: uppercase;
    display: none;
    /* Hidden by default */
}

.strength-weak .strength-bar {
    width: 33.33%;
    background: #ff4d4d;
}

.strength-weak .strength-text {
    color: #ff4d4d;
    display: block;
}

.strength-medium .strength-bar {
    width: 66.66%;
    background: #ffca28;
}

.strength-medium .strength-text {
    color: #ffca28;
    display: block;
}

.strength-strong .strength-bar {
    width: 100%;
    background: #00e676;
}

.strength-strong .strength-text {
    color: #00e676;
    display: block;
}

.password-match-indicator {
    font-size: 11px;
    font-weight: 700;
    margin-top: 6px;
    text-align: right;
    display: none;
}

.match-success {
    color: #00e676;
    display: block;
}

.match-error {
    color: #ff4d4d;
    display: block;
}

.auth-pin-cancel-btn:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 576px) {
    .auth-container {
        padding: 16px;
        max-width: 100%;
    }

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

    .auth-logo-icon {
        width: 40px;
        height: 40px;
    }

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

    .auth-logo-text {
        font-size: 20px;
    }

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

    .auth-pin-inputs {
        gap: 8px;
    }

    .auth-pin-box {
        width: 50px;
        height: 50px;
        font-size: 20px;
        border-radius: 12px;
    }

    .auth-input {
        padding: 14px 16px 14px 44px;
        font-size: 14px;
    }

    .auth-input-wrapper i {
        left: 16px;
        font-size: 14px;
    }

    .auth-footer-text {
        font-size: 12px;
    }
}



/* Verification Page Animations */
.input-typing {
    animation: typePulse 0.2s ease-in-out;
    border-color: var(--primary) !important;
    box-shadow: 0 0 10px rgba(112, 255, 209, 0.3) !important;
}

@keyframes typePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.verification-code-input {
    letter-spacing: 8px;
    font-size: 24px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
}

.verification-code-input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(112, 255, 209, 0.3);
    border-color: var(--primary);
}

/* Typing Animation */
@keyframes typePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
        border-color: var(--primary);
    }

    100% {
        transform: scale(1);
    }
}

.input-typing {
    animation: typePulse 0.2s ease-in-out;
}

/* Button Loading State - Premium Dotted Loader */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    transition: all 0.3s ease;
}

.btn-loading .btn-text,
.btn-loading i,
.btn-loading .btn-icon {
    opacity: 0 !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #010A0A;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    margin: -2px 0 0 -2px;
    box-shadow:
        0 -11px 0 0 #010A0A,
        7.8px -7.8px 0 0 rgba(1, 10, 10, 0.8),
        11px 0 0 0 rgba(1, 10, 10, 0.6),
        7.8px 7.8px 0 0 rgba(1, 10, 10, 0.4),
        0 11px 0 0 rgba(1, 10, 10, 0.2),
        -7.8px 7.8px 0 0 rgba(1, 10, 10, 0.1),
        -11px 0 0 0 rgba(1, 10, 10, 0.05),
        -7.8px -7.8px 0 0 rgba(1, 10, 10, 0.02);
    animation: dot-spin 1s infinite linear;
}

@keyframes dot-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Success State */
.btn-success-anim {
    background: linear-gradient(135deg, #00b09b, #96c93d) !important;
    border: none !important;
    color: white !important;
    pointer-events: none;
}

/* Shake Animation */
@keyframes shake {
    0% {
        transform: translateX(0);
    }

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

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

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

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

.shake {
    animation: shake 0.3s ease-in-out;
}

/* Slide In Animation for Alerts */
@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Google Loading Bridge */
.google-loading-body {
    background: var(--bg-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #000;
    text-align: center;
}

.google-loading-container {
    animation: fadeIn 0.8s ease-out forwards;
}

.google-loading-logo {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px auto;
    box-shadow: 0 0 50px rgba(112, 255, 209, 0.2);
    animation: google-pulse 2s infinite ease-in-out;
}

.google-loading-logo img {
    width: 48px;
    height: auto;
}

.google-loading-logo i {
    font-size: 32px;
    color: #000;
}

.google-loading-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.google-loading-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

@keyframes google-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 50px rgba(112, 255, 209, 0.2);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 70px rgba(112, 255, 209, 0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 50px rgba(112, 255, 209, 0.2);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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