/**
 * FortiLabs Market - Authentication Pages Styles
 * Premium, trustworthy design for login, register, password reset
 */

/* =====================================================
   AUTH PAGE LAYOUT
   ===================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

/* Animated background pattern */
.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* =====================================================
   AUTH CONTAINER
   ===================================================== */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* =====================================================
   AUTH CARD
   ===================================================== */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 2rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
        border-radius: 12px;
        margin: 0.5rem;
    }
}

/* =====================================================
   AUTH LOGO
   ===================================================== */
.auth-logo {
    height: 64px;
    width: auto;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05);
}

/* =====================================================
   AUTH FORM ELEMENTS
   ===================================================== */
.auth-card .form-control {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    min-height: 50px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.auth-card .form-control:focus {
    background-color: #fff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.auth-card .form-control::placeholder {
    color: #94a3b8;
}

.auth-card .input-group-text {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-right: none;
    border-radius: 10px 0 0 10px;
    min-height: 50px;
    color: #64748b;
}

.auth-card .input-group .form-control {
    border-left: none;
    border-radius: 0;
}

.auth-card .input-group .form-control:focus {
    border-left: none;
}

.auth-card .input-group .form-control:focus+.input-group-text,
.auth-card .input-group:focus-within .input-group-text {
    border-color: #2563eb;
}

.auth-card .input-group .btn {
    border: 2px solid #e2e8f0;
    border-left: none;
    border-radius: 0 10px 10px 0;
    min-height: 50px;
    background-color: #f8fafc;
    color: #64748b;
}

.auth-card .input-group:focus-within .btn {
    border-color: #2563eb;
}

/* =====================================================
   AUTH BUTTONS
   ===================================================== */
.auth-card .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    border-radius: 10px;
    min-height: 52px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: all 0.2s ease;
}

.auth-card .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

.auth-card .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.auth-card .btn-outline-dark {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    min-height: 52px;
    font-size: 1rem;
    font-weight: 500;
    background-color: #fff;
    color: #1e293b;
    transition: all 0.2s ease;
}

.auth-card .btn-outline-dark:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

/* =====================================================
   DIVIDER
   ===================================================== */
.divider {
    position: relative;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.divider-text {
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background: #fff;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}

/* =====================================================
   PASSWORD REQUIREMENTS
   ===================================================== */
#passwordReq {
    padding-left: 0;
}

#passwordReq li {
    color: #94a3b8;
    padding: 0.15rem 0;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

#passwordReq li i {
    width: 16px;
    font-size: 0.625rem;
}

#passwordReq li.text-success {
    color: #10b981 !important;
}

#passwordReq li.text-success i {
    font-size: 0.75rem;
}

/* =====================================================
   FORM CHECK CUSTOM
   ===================================================== */
.auth-card .form-check {
    padding-left: 1.75rem;
}

.auth-card .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-left: -1.75rem;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    background-color: #f8fafc;
    transition: all 0.15s ease;
}

.auth-card .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.auth-card .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.auth-card .form-check-label {
    color: #64748b;
    font-size: 0.9375rem;
}

/* =====================================================
   LINKS
   ===================================================== */
.auth-card a {
    color: #2563eb;
    font-weight: 500;
    transition: color 0.15s ease;
}

.auth-card a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* =====================================================
   TRUST INDICATORS
   ===================================================== */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.8125rem;
}

.trust-badge i {
    color: #10b981;
}

/* =====================================================
   VERIFICATION PAGE
   ===================================================== */
.verification-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verification-icon i {
    font-size: 3rem;
    color: #2563eb;
}

.verification-icon.success {
    background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
}

.verification-icon.success i {
    color: #10b981;
}

.verification-icon.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%);
}

.verification-icon.error i {
    color: #ef4444;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 575.98px) {
    .auth-logo {
        height: 56px;
    }

    .auth-card h1 {
        font-size: 1.25rem;
    }

    .auth-card .form-control,
    .auth-card .input-group-text,
    .auth-card .input-group .btn {
        min-height: 46px;
    }

    .auth-card .btn-primary,
    .auth-card .btn-outline-dark {
        min-height: 48px;
    }

    .trust-badges {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
}

/* =====================================================
   REMEMBER ME TOGGLE
   ===================================================== */
.auth-card .form-label {
    color: #334155;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.auth-card .form-text {
    color: #64748b;
    font-size: 0.8125rem;
}

/* =====================================================
   OAUTH BUTTONS
   ===================================================== */
.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-oauth .oauth-icon {
    flex-shrink: 0;
}

.btn-google {
    background-color: #fff;
    border: 2px solid #e2e8f0;
    color: #1e293b;
}

.btn-google:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.btn-github {
    background-color: #24292f;
    border: 2px solid #24292f;
    color: #fff;
}

.btn-github:hover {
    background-color: #1c2127;
    border-color: #1c2127;
    color: #fff;
}

/* =====================================================
   VERIFICATION CODE INPUTS
   ===================================================== */
.verification-code-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.code-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background-color: #f8fafc;
    color: #1e293b;
    transition: all 0.2s ease;
}

.code-input:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.code-separator {
    font-size: 1.5rem;
    color: #94a3b8;
    margin: 0 0.25rem;
}

.verify-code-card {
    max-width: 380px;
}

.code-help {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
}

/* Mobile adjustments for code inputs */
@media (max-width: 400px) {
    .code-input {
        width: 42px;
        height: 50px;
        font-size: 1.25rem;
    }

    .code-separator {
        display: none;
    }

    .verification-code-inputs {
        gap: 0.35rem;
    }
}

/* =====================================================
   PASSWORD STRENGTH BAR
   ===================================================== */
.password-strength {
    padding: 0.5rem;
    background-color: #f8fafc;
    border-radius: 8px;
}

.strength-bar {
    height: 4px;
    background-color: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-progress {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-weak {
    background-color: #ef4444;
    width: 25%;
}

.strength-fair {
    background-color: #f59e0b;
    width: 50%;
}

.strength-good {
    background-color: #3b82f6;
    width: 75%;
}

.strength-strong {
    background-color: #10b981;
    width: 100%;
}

/* =====================================================
   TURNSTILE CONTAINER
   ===================================================== */
.turnstile-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.turnstile-container .cf-turnstile {
    border-radius: 8px;
    overflow: hidden;
}

/* =====================================================
   LOADING STATES
   ===================================================== */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =====================================================
   MOBILE RESPONSIVENESS
   ===================================================== */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem 0.5rem;
    }

    .btn-oauth {
        padding: 0.75rem 0.875rem;
        font-size: 0.9375rem;
    }

    .oauth-buttons {
        gap: 0.75rem;
    }
}