/* ============================================================
   LOGIN V8 — Two-Tone Card: Tinted Header Zone + White Form Zone
   Left testimonial slider (V9 crossfade) + right form card.
   Header/nav and footer are provided by the new-design layout.
   ============================================================ */

/* ---------- PAGE LAYOUT ---------- */
.v8-page {
    display: flex;
    min-height: calc(100vh - 56px);
}

/* ==========================================================
   LEFT PANEL — Testimonial content (shared by slider)
   ========================================================== */
.v5-left {
    flex: 0 0 50%;
    max-width: 50%;
    position: relative;
    overflow: hidden;
    background: #265CFF;
}

.v5-left__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 44px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
}

.v5-left__name {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px;
    line-height: 1.2;
}

.v5-left__role {
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 20px;
}

.v5-left__rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.v5-left__rating-score {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.v5-left__stars {
    display: flex;
    gap: 2px;
}

.v5-left__star {
    width: 18px;
    height: 18px;
    color: #facc15;
}

.v5-left__quote {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.55;
    margin: 0;
    max-width: 480px;
}

/* ==========================================================
   V9 SLIDER — Crossfade testimonial slider
   ========================================================== */
.v9-slider {
    position: relative;
    overflow: hidden;
}

.v9-slider__track {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: grab;
}

.v9-slider__track.is-dragging {
    cursor: grabbing;
}

.v9-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
    z-index: 1;
}

.v9-slider__slide--active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.v9-slider__bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center 30%;
}

.v9-slider__nav {
    position: absolute;
    display: flex;
    align-items: center;
    z-index: 10;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    gap: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.v9-slider__dots {
    display: flex;
    align-items: center;
    gap: 2px;
}

.v9-slider__dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: transparent;
    position: relative;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.v9-slider__dot::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.25s ease;
}

.v9-slider__dot:hover::before {
    background: rgba(255, 255, 255, 0.7);
}

.v9-slider__dot--active::before {
    background: #ffffff;
    width: 7px;
    height: 7px;
}

/* ---- Testimonial overlay spacing (desktop) ---- */
.v9-slider__slide .v5-left__overlay {
    z-index: 3;
    padding: 48px 44px 92px;
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.82) 25%,
        rgba(0, 0, 0, 0.55) 55%,
        rgba(0, 0, 0, 0.15) 85%,
        rgba(0, 0, 0, 0) 100%
    );
}

/* ==========================================================
   RIGHT PANEL
   ========================================================== */
.v8-right {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 32px;
    background: var(--primary0);
    position: relative;
    overflow: hidden;
}

/* Large soft glow — top-right */
.v8-right::before {
    content: "";
    position: absolute;
    width: 550px;
    height: 550px;
    top: -140px;
    right: -120px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

/* Warm glow — bottom-left */
.v8-right::after {
    content: "";
    position: absolute;
    width: 450px;
    height: 450px;
    bottom: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.10) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

/* Decorative rings */
.v8-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.v8-deco::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    top: 40px;
    right: -60px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.v8-deco::after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    bottom: 50px;
    left: -40px;
    border: 1.5px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;
}

/* Dot grid pattern */
.v8-deco2 {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.v8-deco2::before {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    top: 30px;
    left: 30px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    opacity: 0.7;
}

.v8-deco2::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    bottom: 40px;
    right: 40px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    opacity: 0.7;
}

/* ---------- CARD (outer shell) ---------- */
.v8-right__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.06),
        0 2px 6px rgba(0, 0, 0, 0.03),
        0 10px 36px rgba(0, 0, 0, 0.07);
}

/* ---------- TOP ZONE — Tinted header ---------- */
.v8-right__top {
    background: linear-gradient(175deg, #eef2ff 0%, #f0f4ff 100%);
    padding: 32px 52px 22px;
    border-bottom: 1px solid rgba(38, 92, 255, 0.08);
}

.v8-right__header {
    margin-bottom: 22px;
    text-align: center;
}

.v8-right__title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.v8-right__subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* ---------- GOOGLE / SOCIAL ZONE ---------- */
.v8-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.v8-social .social-sign-container {
    display: inline-block;
}

.v8-google-note {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    margin: 0;
    font-weight: 400;
}

/* ---------- DIVIDER (between zones) ---------- */
.v8-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 52px;
    margin: 0;
    background: #ffffff;
    padding-top: 28px;
    padding-bottom: 6px;
}

.v8-divider__line {
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.v8-divider__text {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
    white-space: nowrap;
}

/* ---------- BOTTOM ZONE — White form area ---------- */
.v8-right__bottom {
    background: #ffffff;
    padding: 16px 52px 28px;
}

/* ---------- FORM ---------- */
.v8-form .form-group {
    margin-bottom: 14px;
    position: relative;
}

.v8-form label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    display: block;
}

.v8-form .form-control {
    height: 46px;
    line-height: 46px;
    padding: 0 16px;
    font-size: 14px;
    border-radius: 8px;
    background: #ffffff;
    border: 1.5px solid #d1d5db;
    transition: all 0.15s ease;
    width: 100%;
    box-sizing: border-box;
    color: #111827;
}

.v8-form .form-control:hover {
    border-color: #9ca3af;
}

.v8-form .form-control:focus {
    background: #ffffff;
    border-color: var(--primary0);
    box-shadow: 0 0 0 3px rgba(38, 92, 255, 0.08);
    outline: none;
}

.v8-form .form-control::placeholder {
    color: #9ca3af;
}

/* Password label + forgot row */
.v8-password-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.v8-forgot {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary0);
    text-decoration: none;
}

.v8-forgot:hover {
    text-decoration: underline;
    color: var(--primary0);
}

/* Password wrapper + toggle */
.v8-form .password-container {
    position: relative;
}

.v8-form .password-container .form-control {
    padding-right: 44px;
}

/* Wrap holds only the input + eye toggle, so the toggle anchors to the input
   height — the validation error is appended outside this wrap. */
.v8-form .v8-password-wrap {
    position: relative;
}

.v8-form .v8-password-wrap .form-control {
    padding-right: 44px;
}

.v8-form .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.35;
    transition: opacity 0.2s;
}

.v8-form .password-toggle:hover {
    opacity: 0.7;
}

.v8-form .password-toggle svg {
    width: 18px;
    height: 18px;
    stroke: #6b7280;
}

/* reCAPTCHA */
.v8-form .v8-captcha {
    margin: 4px 0 16px;
    display: flex;
    justify-content: center;
}

/* ---------- LOGIN BUTTON ---------- */
.v8-login-btn {
    width: 100%;
    display: block;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    background: var(--primary0);
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.v8-login-btn:hover {
    background: #1c4fd4;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(38, 92, 255, 0.25);
}

/* ---------- REGISTER TEXT ---------- */
.v8-register-text {
    text-align: center;
    margin: 16px 0 0;
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
}

.v8-register-text a {
    color: var(--primary0);
    font-weight: 600;
    text-decoration: none;
}

.v8-register-text a:hover {
    text-decoration: underline;
}

/* Validation error styling within v8 form */
.v8-form span.error {
    display: block;
    color: #cf5859;
    font-size: 12px;
    margin-top: 4px;
}

.v8-form .form-control.error {
    border-color: #cf5859;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (min-width: 1400px) {
    .v8-right__card {
        max-width: 580px;
    }

    .v8-right__top {
        padding: 52px 56px 30px;
    }

    .v8-right__bottom {
        padding: 26px 56px 52px;
    }

    .v8-divider {
        padding-left: 56px;
        padding-right: 56px;
    }

    .v8-right__title {
        font-size: 30px;
    }
}

@media (min-width: 1700px) {
    .v8-right__card {
        max-width: 620px;
    }

    .v8-right__top {
        padding: 56px 64px 32px;
    }

    .v8-right__bottom {
        padding: 28px 64px 56px;
    }

    .v8-divider {
        padding-left: 64px;
        padding-right: 64px;
    }

    .v8-right__title {
        font-size: 32px;
    }

    .v8-right__subtitle {
        font-size: 15px;
    }

    .v8-form .form-control {
        height: 48px;
        line-height: 48px;
        font-size: 15px;
    }

    .v8-login-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
}

@media (max-width: 1200px) and (min-width: 992px) {
    .v8-right {
        padding: 24px;
    }

    .v8-right__card {
        max-width: 520px;
    }

    .v8-right__top {
        padding: 40px 44px 24px;
    }

    .v8-right__bottom {
        padding: 20px 44px 40px;
    }

    .v8-divider {
        padding-left: 44px;
        padding-right: 44px;
    }

    .v8-right__title {
        font-size: 22px;
    }

    .v9-slider__slide .v5-left__overlay {
        padding: 36px 32px 80px;
    }

    .v9-slider__nav {
        bottom: 22px;
    }
}

/* Tablet and below — stack vertically, FORM ON TOP */
@media (max-width: 991px) {
    .v8-page {
        flex-direction: column;
        background: #ffffff;
    }

    .v8-right {
        order: 1;
        flex: none;
        max-width: 100%;
        padding: 24px 16px 32px;
    }

    .v5-left {
        order: 2;
        flex: none;
        max-width: 100%;
        height: 560px;
        margin: 0;
        border-radius: 0;
        width: 100%;
    }

    .v9-slider__slide .v5-left__overlay {
        padding: 18px 20px 56px;
        background: linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 0, 0, 0.65) 40%,
            rgba(0, 0, 0, 0.2) 75%,
            rgba(0, 0, 0, 0) 100%
        );
    }

    .v9-slider__bg {
        object-position: center 25%;
    }

    .v9-slider__nav {
        bottom: 14px;
    }

    .v5-left__name {
        font-size: 20px;
        margin-bottom: 2px;
    }

    .v5-left__role {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .v5-left__rating {
        margin-bottom: 10px;
    }

    .v5-left__rating-score {
        font-size: 15px;
    }

    .v5-left__star {
        width: 14px;
        height: 14px;
    }

    .v5-left__quote {
        font-size: 13px;
        line-height: 1.5;
    }

    .v8-right__card {
        max-width: 100%;
        border-radius: 12px;
    }

    .v8-right__top {
        padding: 28px 24px 20px;
    }

    .v8-right__bottom {
        padding: 16px 24px 28px;
    }

    .v8-divider {
        padding-left: 24px;
        padding-right: 24px;
    }

    .v8-right__title {
        font-size: 20px;
    }
}
