/**
 * Authentication Pages Styles
 * ONE SMART SHIELD - Login, Register, OTP Pages
 * THEME MATCHED WITH HOMEPAGE - Exact same design, animations, colors
 */

/* Auth Page - Same background as homepage hero */
/* Force scrolling on auth pages */
html.auth-html,
body.auth-page {
    min-height: 100vh;
    height: auto !important;
    overflow-x: hidden;
    overflow-y: auto !important;
}

.auth-page {
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto !important;
    padding: 40px 20px;
    padding-top: 60px;
    padding-bottom: 60px;
}

/* Animated Background - Same as homepage hero */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.auth-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f6f0 50%, #ffffff 100%);
}

/* Animated Gradient Orbs - Same as homepage */
.auth-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    animation: float 20s ease-in-out infinite;
}

.auth-bg .orb-1 {
    width: 500px;
    height: 500px;
    background: #D4AF37;
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.auth-bg .orb-2 {
    width: 350px;
    height: 350px;
    background: #C5A028;
    bottom: -80px;
    left: -80px;
    animation-delay: -5s;
}

.auth-bg .orb-3 {
    width: 250px;
    height: 250px;
    background: #E8C564;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-30px) rotate(5deg);
    }

    50% {
        transform: translateY(0) rotate(0deg);
    }

    75% {
        transform: translateY(30px) rotate(-5deg);
    }
}

/* Grid Pattern Overlay - Same as homepage */
.auth-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Auth Container */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 35px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.auth-logo a {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.auth-logo img {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.3));
    transition: all 0.3s ease;
}

.auth-logo:hover img {
    transform: scale(1.05);
}

.auth-logo span {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.5px;
}

/* Auth Card - Glassmorphism like homepage cards */
.auth-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 246, 240, 0.9) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid #e8e4d9;
    border-radius: 24px;
    padding: 45px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.1),
        0 0 40px rgba(212, 175, 55, 0.08);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.auth-header h1 i {
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: #4a4a4a;
    font-size: 1rem;
}

.auth-header .email-display {
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.05rem;
    font-weight: 600;
    display: block;
    margin-top: 8px;
}

/* OTP Icon */
.otp-icon {
    width: 90px;
    height: 90px;
    background: rgba(212, 175, 55, 0.12);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }

    50% {
        box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
    }
}

.otp-icon i {
    font-size: 40px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 35px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(100, 116, 139, 0.2);
    border: 2px solid rgba(100, 116, 139, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #94a3b8;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    border-color: transparent;
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.step.completed .step-number {
    background: linear-gradient(135deg, #C5A028 0%, #D4AF37 100%);
    border-color: transparent;
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.step-label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.step.active .step-label {
    color: #ffffff;
}

.step-line {
    width: 70px;
    height: 3px;
    background: rgba(100, 116, 139, 0.3);
    border-radius: 2px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.step-line.active {
    background: rgba(100, 116, 139, 0.3);
}

.step-line.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #10b981, #D4AF37);
    animation: lineProgress 0.5s ease forwards;
}

@keyframes lineProgress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* Auth Form */
.auth-form {
    margin-top: 25px;
}

.auth-form .form-group {
    margin-bottom: 22px;
}

.auth-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.auth-form label i {
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.9rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form input[type="password"],
.auth-form input[type="number"],
.auth-form select {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e8e4d9;
    border-radius: 12px;
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="tel"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="number"]:focus,
.auth-form select:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15), 0 0 30px rgba(212, 175, 55, 0.08);
}

.auth-form input::placeholder {
    color: #9e9e9e;
}

/* Phone Input Wrapper */
.phone-input-wrapper {
    display: flex;
    align-items: stretch;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.phone-input-wrapper:focus-within {
    border-color: #D4AF37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15), 0 0 30px rgba(212, 175, 55, 0.1);
}

.phone-prefix {
    padding: 16px 16px;
    background: rgba(212, 175, 55, 0.1);
    color: #D4AF37;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(212, 175, 55, 0.2);
}

.phone-input-wrapper input {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 16px 20px !important;
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 500;
}

.phone-input-wrapper input:focus {
    box-shadow: none !important;
}

/* Error Message */
.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 8px;
    min-height: 22px;
}

/* OTP Inputs */
.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 25px;
}

.otp-input {
    width: 55px;
    height: 65px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 14px;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    transition: all 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15), 0 0 30px rgba(212, 175, 55, 0.1);
    transform: scale(1.05);
}

.otp-inputs.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    50% {
        transform: translateX(10px);
    }

    75% {
        transform: translateX(-10px);
    }
}

/* OTP Timer */
.otp-timer {
    text-align: center;
    color: #94a3b8;
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.otp-timer i {
    margin-right: 6px;
    color: #f59e0b;
}

#timer {
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons - Same as homepage */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.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: all 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #D4AF37 0%, #E8C564 50%, #F0D875 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.btn-primary:active {
    transform: translateY(0) scale(1);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: #D4AF37;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-link:hover:not(:disabled) {
    color: #E8C564;
    text-decoration: underline;
}

.btn-link:disabled {
    color: #64748b;
    cursor: not-allowed;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.3), transparent);
}

.auth-divider span {
    padding: 0 18px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Resend Section */
.resend-section {
    text-align: center;
    margin-top: 22px;
}

.resend-section p {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer p {
    color: #94a3b8;
    font-size: 0.95rem;
}

.auth-footer a {
    background: linear-gradient(135deg, #D4AF37 0%, #E8C564 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    filter: brightness(1.2);
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 35px;
    margin-top: 35px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.trust-badges .badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.trust-badges .badge i {
    color: #10b981;
    font-size: 1rem;
}

/* Alert */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-card {
        padding: 35px 25px;
        border-radius: 20px;
    }

    .auth-header h1 {
        font-size: 1.6rem;
    }

    .otp-inputs {
        gap: 10px;
    }

    .otp-input {
        width: 48px;
        height: 58px;
        font-size: 1.4rem;
    }

    .trust-badges {
        flex-wrap: wrap;
        gap: 20px;
    }

    .step-line {
        width: 50px;
    }
}

@media (max-width: 400px) {
    .auth-container {
        padding: 0 15px;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .otp-input {
        width: 42px;
        height: 52px;
        font-size: 1.2rem;
    }

    .auth-logo img {
        height: 55px;
    }

    .auth-logo span {
        font-size: 1.1rem;
    }
}