/* ═══════════════════════════════════════════════════════════════════
   Digitstem Premium Auth Pages — Stripe / Linear / Vercel Standard
   ═══════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
    --auth-primary: #115d52;
    --auth-primary-light: #2CB5A1;
    --auth-primary-glow: rgba(17, 93, 82, 0.25);
    --auth-dark: #0B1220;
    --auth-bg: #F8FAFC;
    --auth-card: #FFFFFF;
    --auth-border: rgba(226, 232, 240, 0.8);
    --auth-text: #0F172A;
    --auth-text-sub: #64748B;
    --auth-input-bg: #F1F5F9;
    --auth-input-border: #E2E8F0;
}

body.ds-dark-mode {
    --auth-bg: #0B1220;
    --auth-card: #111A2C;
    --auth-border: rgba(255, 255, 255, 0.08);
    --auth-text: #FFFFFF;
    --auth-text-sub: #94A3B8;
    --auth-input-bg: #192438;
    --auth-input-border: rgba(255, 255, 255, 0.1);
}

/* ── Base Layout ── */
.ds-auth-page {
    min-height: 100vh;
    display: flex;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background: var(--auth-bg);
    color: var(--auth-text);
}

/* ── Left Branding Panel ── */
.ds-auth-brand {
    width: 45%;
    min-height: 100vh;
    background: linear-gradient(165deg, #115d52 0%, #0a3d35 40%, #0B1220 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 48px;
    overflow: hidden;
}

.ds-auth-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(44, 181, 161, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(167, 209, 41, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.ds-auth-brand::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.ds-auth-brand-content {
    position: relative;
    z-index: 2;
}

.ds-auth-logo {
    font-size: 28px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -1px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ds-auth-logo img {
    height: 36px;
    width: auto;
}

.ds-auth-brand-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.ds-auth-brand-sub {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 420px;
}

/* Brand Feature List */
.ds-auth-features {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.ds-auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.ds-auth-features li .feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(44, 181, 161, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2CB5A1;
    font-size: 16px;
    flex-shrink: 0;
}

/* Floating Stats */
.ds-auth-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 32px;
}

.ds-auth-stat-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 18px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.ds-auth-stat-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
}

.ds-auth-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2CB5A1;
    letter-spacing: -0.5px;
}

.ds-auth-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-top: 2px;
}

/* Rotating Reviews */
.ds-auth-reviews {
    margin-top: 32px;
    position: relative;
    height: 80px;
    overflow: hidden;
}

.ds-auth-review {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 18px;
}

.ds-auth-review.active {
    opacity: 1;
    transform: translateY(0);
}

.ds-auth-review-stars {
    color: #FBBF24;
    font-size: 13px;
    margin-bottom: 6px;
    letter-spacing: 2px;
}

.ds-auth-review-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    font-style: italic;
}

.ds-auth-review-author {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
    font-weight: 600;
}

/* ── Right Form Panel ── */
.ds-auth-form-panel {
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 32px;
    background: var(--auth-bg);
    overflow-y: auto;
}

.ds-auth-form-container {
    width: 100%;
    max-width: 480px;
}

.ds-auth-form-logo-mobile {
    display: none;
    font-size: 24px;
    font-weight: 800;
    color: var(--auth-primary);
    letter-spacing: -1px;
    margin-bottom: 32px;
    text-align: center;
}

.ds-auth-heading {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--auth-text);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.ds-auth-subheading {
    font-size: 1rem;
    color: var(--auth-text-sub);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* ── Premium Inputs ── */
.ds-auth-field {
    margin-bottom: 20px;
}

.ds-auth-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--auth-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ds-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ds-auth-input-wrap .input-icon {
    position: absolute;
    left: 16px;
    color: var(--auth-text-sub);
    font-size: 18px;
    pointer-events: none;
    z-index: 2;
    transition: color 0.3s ease;
}

.ds-auth-input-wrap .form--control,
.ds-auth-input-wrap input,
.ds-auth-input-wrap select {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 46px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    border: 1.5px solid var(--auth-input-border);
    border-radius: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.ds-auth-input-wrap .form--control:focus,
.ds-auth-input-wrap input:focus,
.ds-auth-input-wrap select:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px var(--auth-primary-glow);
    background: var(--auth-card);
}

.ds-auth-input-wrap .form--control:focus ~ .input-icon,
.ds-auth-input-wrap input:focus ~ .input-icon {
    color: var(--auth-primary);
}

/* Input without icon */
.ds-auth-input-wrap.no-icon .form--control,
.ds-auth-input-wrap.no-icon input,
.ds-auth-input-wrap.no-icon select {
    padding-left: 16px;
}

/* Select styling */
.ds-auth-input-wrap select {
    appearance: none;
    cursor: pointer;
}

/* Input group (mobile code + input) */
.ds-auth-mobile-group {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--auth-input-bg);
    border: 1.5px solid var(--auth-input-border);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ds-auth-mobile-group:focus-within {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px var(--auth-primary-glow);
    background: var(--auth-card);
}

.ds-auth-mobile-group .mobile-code {
    padding: 0 12px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--auth-text-sub);
    border: none;
    background: transparent;
    white-space: nowrap;
    border-right: 1px solid var(--auth-input-border);
}

.ds-auth-mobile-group input {
    flex: 1;
    height: 50px;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 16px;
    font-size: 0.95rem;
    color: var(--auth-text);
    border-radius: 0;
}

/* Password toggle */
.ds-auth-input-wrap .toggle-password,
.ds-auth-input-wrap .toggle-confirm-password {
    position: absolute;
    right: 14px;
    cursor: pointer;
    color: var(--auth-text-sub);
    font-size: 16px;
    z-index: 2;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s ease;
}

.ds-auth-input-wrap .toggle-password:hover,
.ds-auth-input-wrap .toggle-confirm-password:hover {
    color: var(--auth-primary);
}

/* ── Checkbox ── */
.ds-auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--auth-text-sub);
}

.ds-auth-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-primary);
    border-radius: 4px;
    cursor: pointer;
}

.ds-auth-check label {
    cursor: pointer;
}

/* ── Remember / Forgot Row ── */
.ds-auth-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ds-auth-forgot {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--auth-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.ds-auth-forgot:hover {
    opacity: 0.8;
    color: var(--auth-primary);
}

/* ── CTA Button ── */
.ds-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 56px;
    background: var(--auth-primary);
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(17, 93, 82, 0.3);
}

.ds-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(17, 93, 82, 0.4);
    background: #0d4840;
}

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

/* ── Divider ── */
.ds-auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--auth-text-sub);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ds-auth-divider::before,
.ds-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

/* ── Bottom Link ── */
.ds-auth-bottom {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--auth-text-sub);
}

.ds-auth-bottom a {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.ds-auth-bottom a:hover {
    opacity: 0.8;
}

/* ── Trust Badges ── */
.ds-auth-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-border);
}

.ds-auth-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--auth-text-sub);
    font-weight: 500;
}

.ds-auth-trust-item i {
    font-size: 14px;
    color: var(--auth-primary);
}

/* ── Feature Strip ── */
.ds-auth-feature-strip {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.ds-auth-feature-strip span {
    font-size: 0.8rem;
    color: var(--auth-text-sub);
    font-weight: 500;
}

.ds-auth-feature-strip span i {
    color: var(--auth-primary);
    margin-right: 4px;
}

/* ── Password Popup (Secure Password) ── */
.ds-auth-page .input-popup {
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.ds-auth-page .input-popup p {
    font-size: 0.78rem;
    margin: 4px 0;
    color: var(--auth-text-sub);
}

.ds-auth-page .input-popup p.error {
    color: #EF4444;
}

.ds-auth-page .input-popup p.success {
    color: #22C55E;
}

/* ── Password Match Message ── */
#passwordMatch {
    font-size: 0.8rem;
    margin-top: 6px;
    font-weight: 600;
}

/* ── Two-Column Grid (Register) ── */
.ds-auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

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

/* ── Mobile Alert (existing error) ── */
.ds-auth-page .mobileExist,
.ds-auth-page .text-danger {
    font-size: 0.78rem;
    margin-top: 4px;
}

/* ── AdSense Container ── */
.ds-auth-ads {
    margin-top: 32px;
    text-align: center;
}

/* Card Definition & Selection Styling */
.ds-account-type-card {
    border: 1.5px solid var(--auth-border) !important;
    border-radius: 16px !important;
    background: var(--auth-card) !important;
}

.ds-account-type-card.active-type {
    border-color: var(--auth-primary) !important;
    background: rgba(17, 93, 82, 0.04) !important;
    box-shadow: 0 4px 16px rgba(17, 93, 82, 0.12) !important;
}

body.ds-dark-mode .ds-account-type-card.active-type {
    background: rgba(44, 181, 161, 0.12) !important;
    border-color: #2CB5A1 !important;
}

@media (max-width: 991px) {
    html, body, .ds-auth-page {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .ds-auth-page {
        flex-direction: column;
    }

    .ds-auth-brand {
        display: none;
    }

    .ds-auth-form-panel {
        min-height: 100vh;
        padding: 20px 16px !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .ds-auth-form-logo-mobile {
        display: block;
    }

    .ds-auth-form-container {
        width: 100% !important;
        max-width: 100% !important;
    }

    .ds-auth-heading {
        font-size: 1.45rem !important;
    }

    .ds-account-type-card {
        padding: 12px 14px !important;
    }

    .ds-auth-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Stats Bar */
    .ds-auth-mobile-stats {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 0 0 12px 0;
        margin-bottom: 24px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ds-auth-mobile-stats::-webkit-scrollbar {
        display: none;
    }

    .ds-auth-mobile-stat {
        flex: 0 0 auto;
        background: var(--auth-input-bg);
        border: 1px solid var(--auth-border);
        border-radius: 12px;
        padding: 12px 16px;
        text-align: center;
        min-width: 100px;
    }

    .ds-auth-mobile-stat-value {
        font-size: 1.1rem;
        font-weight: 800;
        color: var(--auth-primary);
    }

    body.ds-dark-mode .ds-auth-mobile-stat-value {
        color: var(--auth-primary-light);
    }

    .ds-auth-mobile-stat-label {
        font-size: 0.65rem;
        color: var(--auth-text-sub);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 600;
        margin-top: 2px;
    }
}

@media (min-width: 992px) {
    .ds-auth-mobile-stats {
        display: none !important;
    }
}

/* ══════════════════════════════
   ANIMATIONS
   ══════════════════════════════ */

@keyframes ds-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.ds-auth-stat-card:nth-child(1) { animation: ds-float 4s ease-in-out infinite; }
.ds-auth-stat-card:nth-child(2) { animation: ds-float 4s ease-in-out 0.5s infinite; }
.ds-auth-stat-card:nth-child(3) { animation: ds-float 4s ease-in-out 1s infinite; }
.ds-auth-stat-card:nth-child(4) { animation: ds-float 4s ease-in-out 1.5s infinite; }

@keyframes ds-fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ds-auth-form-container {
    animation: ds-fade-in-up 0.6s ease-out;
}

/* ── Captcha Override ── */
.ds-auth-page .form-group .g-recaptcha,
.ds-auth-page .form-group .h-captcha {
    margin-bottom: 16px;
}
