/* ============================================
   Helper Portal - Auth Pages Styles
   ============================================ */

/* 1. Global Reset & Fonts */
:root {
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --bg-dark: #0f0f1a;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #fff;
    background-color: var(--bg-dark);
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* Prevent horizontal scroll from glowing elements */
}

/* 2. Split Layout Architecture */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    /* Full height stretch */
    background: var(--bg-dark);
}

/* Left Panel: Form Container */
.auth-container {
    flex: 1;
    max-width: 50%;
    /* Default split */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(3rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem);
    position: relative;
    z-index: 10;
    background: rgba(15, 15, 26, 0.95);
    /* Slight opacity for mesh peek */
    backdrop-filter: blur(10px);
}

/* Right Panel: Hero Visual */
.auth-hero {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(2.5rem, 5vw, 3.5rem);
    overflow: hidden;
    background: radial-gradient(circle at center, #1a1a2e 0%, #0f0f1a 100%);
}

/* 3. Hero Visuals & Animations */
.hero-content {
    text-align: center;
    z-index: 2;
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-title {
    font-size: clamp(2.75rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 400px;
    margin: 0 auto 2.25rem;
    line-height: 1.6;
}

/* Abstract Background Shapes */
.hero-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: #4f46e5;
    animation-delay: 0s;
}

.shape-2 {
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #db2777;
    animation-delay: -10s;
}

/* Glass Stats Card (Floating) */
.hero-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
    animation: floatCard 6s ease-in-out infinite;
}

.hero-card:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0) scale(1.02);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* 4. Form Styling (Refined) */
.auth-card {
    margin-top: 3rem; /* Give space from the top-left logo */
    width: 100%;
    max-width: 480px;
    /* Contain form width */
    padding: 0;
    /* Remove padding from wrapper, let form handle it */
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.wide-container .auth-card {
    max-width: 800px;
    margin-top: 1.5rem; /* Slightly less for the wider form */
    /* Only for 2-column register */
}

/* Header */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    position: absolute;
    top: 2.5rem;
    left: 2.5rem;
    transition: all 0.3s ease;
    z-index: 20;
}

.auth-logo span {
    color: #fff;
}

.auth-logo:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.auth-logo .logo-icon {
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-align: left;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    text-align: left;
    margin-bottom: 3rem;
    line-height: 1.6;
    color: #64748b;
    font-size: 1rem;
}

/* Inputs */
/* Mobile Input Group */
.mobile-input-group {
    display: flex;
    gap: 0.75rem;
}

.country-select-wrapper {
    width: 160px;
    flex-shrink: 0;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    transition: all 0.3s ease;
}

.country-select-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.country-select {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    /* Hide default arrow */
    padding-right: 1.5rem;
    /* Space for custom arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
}

.country-select option {
    background: #1e1e2e;
    color: #fff;
    padding: 10px;
}

/* Premium Input Stlying */
.premium-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0 1rem;
    transition: all 0.3s ease;
    height: 52px;
    /* Taller, premium feel */
}

.premium-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.input-icon {
    font-size: 1.2rem;
    color: #64748b;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
}

.premium-input-wrapper input,
.premium-input-wrapper select {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    /* Remove default glow, wrapper handles it */
    padding: 0 !important;
    height: 100%;
    width: 100%;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.premium-input-wrapper input::placeholder {
    color: #475569;
}

/* Social Login & Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #64748b;
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--glass-border);
}

.auth-divider span {
    padding: 0 1rem;
}

.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 0.75rem;
    border-radius: 0.75rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-social:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.btn-social img {
    width: 20px;
    height: 20px;
}


/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

/* 5. Utility Classes & Grid */
.two-col-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.full-width {
    grid-column: 1 / -1;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: 0.2s;
}

.password-toggle:hover {
    opacity: 1;
}

.error-message {
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.success-message {
    padding: 0.75rem;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* OTP Styles */
.otp-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.otp-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.otp-input-row {
    display: flex;
    gap: 1rem;
}

.otp-input-row input {
    width: 100%;
    text-align: center;
    letter-spacing: 0.3em;
    font-size: 1.2rem;
    font-weight: 700;
}

.otp-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.otp-status.verified {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

/* Footer & Links */
.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.form-action {
    margin-top: 1rem;
}

.btn-block {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
}

.back-link {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    transition: 0.2s;
}

.back-link:hover {
    color: #fff;
}

select option {
    background: #1e1e2e;
    color: #fff;
    padding: 10px;
}

/* 6. Animations */
@keyframes float {

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

    50% {
        transform: translate(30px, -30px);
    }
}

@keyframes floatCard {

    0%,
    100% {
        transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateY(0);
    }

    50% {
        transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateY(-15px);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* 7. Responsive Styles */
@media (max-width: 1024px) {
    .auth-container {
        max-width: 60%;
    }

    .auth-hero {
        display: none;
    }

    /* Hide hero visuals on tablet portait/small laptop */
}

@media (min-width: 1025px) {
    .auth-hero {
        display: flex !important;
    }

    /* Only show on large screens */
}

@media (max-width: 768px) {
    .auth-page {
        display: block;
    }

    .auth-container {
        max-width: 100%;
        min-height: 100vh;
        padding: 7rem 1.75rem 3rem; /* Extra top padding for logo */
    }

    .two-col-form {
        grid-template-columns: 1fr;
    }

    .auth-logo {
        position: absolute;
        top: 2rem;
        left: 50%;
        transform: translateX(-50%);
        margin-bottom: 0;
        justify-content: center;
        width: auto;
    }

    .auth-logo:hover {
        transform: translateX(-50%) translateY(-2px);
    }

    .auth-title,
    .auth-subtitle {
        text-align: center;
    }

    .back-link {
        position: static;
        display: block;
        text-align: center;
        margin-top: 2rem;
    }
}
