/* =====================================================================
   ClickbankMachine — Authentication screens
   (login, forgot password, reset password, get access)
   ===================================================================== */

:root {
    --cab-heading: #111c44;
    --cab-text: #3b4a6b;
    --cab-muted: #8a94a6;
    --cab-border: #e3e9f3;
    --cab-primary: #2f6bff;
    --cab-grad-primary: linear-gradient(90deg, #2f6bff 0%, #4fa3ff 100%);
    --cab-grad-brand: linear-gradient(150deg, #2c3fe8 0%, #3f6bff 45%, #6aa5ff 100%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.cab-auth-body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--cab-text);
    background: #f4f7fd;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--cab-primary);
    text-decoration: none;
    transition: color .2s ease;
}

a:hover {
    color: #1f4fd6;
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Layout ---------- */

.cab-auth {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------- Brand panel ---------- */

.cab-auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 64px 36px;
    color: #fff;
    background: var(--cab-grad-brand);
}

.cab-auth-brand::before,
.cab-auth-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.cab-auth-brand::before {
    width: 520px;
    height: 520px;
    right: -180px;
    top: -200px;
    background: radial-gradient(circle, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, 0) 70%);
}

.cab-auth-brand::after {
    width: 420px;
    height: 420px;
    left: -160px;
    bottom: -180px;
    background: radial-gradient(circle, rgba(141, 184, 255, .35) 0%, rgba(141, 184, 255, 0) 70%);
}

.cab-auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: auto 0;
}

.cab-auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 30px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .25);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
}

.cab-auth-eyebrow svg {
    width: 14px;
    height: 14px;
    color: #ffd166;
}

.cab-auth-brand h2 {
    margin: 22px 0 14px;
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: #fff;
}

.cab-auth-brand-inner>p {
    margin: 0 0 26px;
    font-size: 16px;
    color: rgba(255, 255, 255, .85);
    max-width: 460px;
}

.cab-auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.cab-auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
}

.cab-auth-features li span {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .2);
}

.cab-auth-features li svg {
    width: 13px;
    height: 13px;
}

/* Decorative dashboard + rocket */
.cab-auth-visual {
    position: relative;
    margin-top: 44px;
    height: 230px;
}

.cab-auth-glass {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 340px;
    padding: 18px 20px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 30px 60px -30px rgba(10, 20, 80, .6);
}

.cab-auth-glass-head {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.cab-auth-glass-head i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
}

.cab-auth-glass-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cab-auth-glass-row span {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    flex: none;
}

.cab-dot-blue {
    background: #9fd0ff;
}

.cab-dot-green {
    background: #7ee2b8;
}

.cab-dot-purple {
    background: #c4b5fd;
}

.cab-auth-glass-row b {
    height: 9px;
    width: 85%;
    border-radius: 6px;
    background: rgba(255, 255, 255, .45);
}

.cab-auth-glass-row b.w70 {
    width: 70%;
}

.cab-auth-glass-row b.w50 {
    width: 50%;
}

.cab-auth-glass-bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 70px;
    margin-top: 14px;
}

.cab-auth-glass-bars em {
    flex: 1;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .35));
}

.cab-auth-rocket {
    position: absolute;
    left: 300px;
    bottom: 110px;
    width: 130px;
    height: 130px;
    filter: drop-shadow(0 18px 24px rgba(10, 20, 80, .35));
    animation: cabFloat 5s ease-in-out infinite;
}

@keyframes cabFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cab-auth-rocket {
        animation: none;
    }
}

.cab-auth-copy {
    position: relative;
    z-index: 1;
    margin: 32px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, .7);
}

/* ---------- Form panel ---------- */

.cab-auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background:
        radial-gradient(600px 400px at 100% 0%, rgba(47, 107, 255, .07), transparent 70%),
        radial-gradient(500px 360px at 0% 100%, rgba(139, 92, 246, .06), transparent 70%),
        #f7f9fe;
}

.cab-auth-card {
    width: 100%;
    max-width: 460px;
    padding: 40px 40px 30px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #edf1f8;
    box-shadow: 0 30px 60px -30px rgba(28, 52, 120, .25);
}

.cab-auth-logo {
    display: inline-flex;
    margin-bottom: 24px;
}

.cab-auth-logo img {
    max-height: 66px;
    width: auto;
}

@media screen and (max-width: 575px) {
    .cab-auth-logo img {
        max-height: 54px;
    }
}

.cab-auth-head {
    margin-bottom: 26px;
}

.cab-auth-badge {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: #eef3ff;
    color: var(--cab-primary);
}

.cab-auth-badge svg {
    width: 26px;
    height: 26px;
}

.cab-auth-head h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--cab-heading);
}

.cab-auth-head p {
    margin: 0;
    font-size: 14.5px;
    color: var(--cab-muted);
}

.cab-auth-head p strong {
    color: var(--cab-text);
    font-weight: 600;
}

.cab-text-grad {
    background: var(--cab-grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Fields */
.cab-field {
    margin-bottom: 18px;
}

.cab-field>label {
    display: block;
    margin: 0 0 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--cab-heading);
}

.cab-input {
    position: relative;
}

.cab-input input {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 46px;
    border: 1px solid var(--cab-border);
    border-radius: 14px;
    background: #fbfcff;
    font-family: inherit;
    font-size: 15px;
    color: var(--cab-heading);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.cab-input input::placeholder {
    color: #a3adbf;
}

.cab-input input:hover {
    border-color: #cfd9ea;
}

.cab-input input:focus {
    background: #fff;
    border-color: var(--cab-primary);
    box-shadow: 0 0 0 4px rgba(47, 107, 255, .12);
}

.cab-input input.vp-input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .12);
}

.cab-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    color: var(--cab-muted);
    pointer-events: none;
    transition: color .2s ease;
}

.cab-input-icon svg {
    width: 19px;
    height: 19px;
}

.cab-input:focus-within .cab-input-icon {
    color: var(--cab-primary);
}

.cab-input-action {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--cab-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.cab-input-action:hover {
    background: #f1f5fb;
    color: var(--cab-heading);
}

.cab-input-action svg {
    width: 19px;
    height: 19px;
}

.cab-input-action .cab-eye-off,
.cab-input-action.cab-visible .cab-eye {
    display: none;
}

.cab-input-action.cab-visible .cab-eye-off {
    display: block;
}

/* Remember me + forgot */
.cab-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 24px;
    font-size: 14px;
}

.cab-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--cab-text);
    cursor: pointer;
    user-select: none;
}

.cab-check input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.cab-check-box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1.5px solid #cfd8e6;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, border-color .2s ease;
}

.cab-check-box::after {
    content: "";
    width: 9px;
    height: 5px;
    margin-top: -2px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0);
    transition: transform .15s ease;
}

.cab-check input:checked+.cab-check-box {
    background: var(--cab-primary);
    border-color: var(--cab-primary);
}

.cab-check input:checked+.cab-check-box::after {
    transform: rotate(-45deg) scale(1);
}

.cab-check input:focus-visible+.cab-check-box {
    box-shadow: 0 0 0 4px rgba(47, 107, 255, .18);
}

.cab-auth-link {
    font-weight: 600;
}

/* Primary button */
.cab-auth-btn {
    width: 100%;
    height: 54px;
    margin-top: 6px;
    border: 0;
    border-radius: 14px;
    background: var(--cab-grad-primary);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 16px 28px -14px rgba(47, 107, 255, .8);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.cab-auth-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 20px 32px -14px rgba(47, 107, 255, .9);
}

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

.cab-auth-btn:focus-visible {
    outline: 3px solid rgba(47, 107, 255, .35);
    outline-offset: 3px;
}

.cab-auth-btn svg {
    width: 18px;
    height: 18px;
    transition: transform .2s ease;
}

.cab-auth-btn:hover svg {
    transform: translateX(3px);
}

/* Secondary links / footer */
.cab-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cab-text);
}

.cab-auth-back svg {
    width: 16px;
    height: 16px;
}

.cab-auth-back:hover {
    color: var(--cab-primary);
}

.cab-auth-alt {
    margin: 20px 0 0;
    text-align: center;
    font-size: 14px;
    color: var(--cab-muted);
}

.cab-auth-support {
    margin: 26px 0 0;
    padding-top: 20px;
    border-top: 1px solid #eef1f6;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: var(--cab-muted);
}

.cab-auth-support a {
    font-weight: 600;
    white-space: nowrap;
}

/* Get-access result (password returned by the server) */
.cab-auth-result {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #effbf4;
    border: 1px solid #c9f0da;
    color: #15803d;
    font-weight: 700;
    word-break: break-all;
}

.cab-auth-result:empty {
    display: none;
}

/* ---------- Loader & alerts (used by custom.min.js) ---------- */

.vp-loader {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    background: rgba(247, 249, 254, .82);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.vp-loader.show {
    display: flex;
}

.cab-spinner {
    display: block;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 4px solid #dbe5ff;
    border-top-color: var(--cab-primary);
    animation: cabSpin .8s linear infinite;
}

@keyframes cabSpin {
    to {
        transform: rotate(360deg);
    }
}

.vp-alert-wrap {
    position: fixed;
    top: 24px;
    right: 24px;
    max-width: 380px;
    z-index: 99991;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

.vp-alert-wrap.error,
.vp-alert-wrap.success {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.vp-alert-wrap>p {
    position: relative;
    margin: 0;
    padding: 14px 18px 14px 58px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #edf1f8;
    box-shadow: 0 20px 40px -16px rgba(20, 40, 100, .3);
    font-size: 14px;
    color: var(--cab-text);
}

.vp-alert-wrap>p::before {
    display: block;
    font-weight: 700;
    color: var(--cab-heading);
}

.vp-alert-wrap.success>p::before {
    content: "Success";
}

.vp-alert-wrap.error>p::before {
    content: "Please check";
}

.vp-alert-wrap>p::after {
    content: "";
    position: absolute;
    left: 16px;
    top: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.vp-alert-wrap.success>p::after {
    background-color: #dcfce7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.vp-alert-wrap.error>p::after {
    background-color: #fee2e2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='12' y1='7' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12' y2='17'/%3E%3C/svg%3E");
}

.vp-alert-wrap.error>p {
    border-left: 4px solid #ef4444;
}

.vp-alert-wrap.success>p {
    border-left: 4px solid #22c55e;
}

/* ---------- Responsive ---------- */

@media screen and (max-width: 1280px) {
    .cab-auth-brand {
        padding: 48px 44px 32px;
    }
    .cab-auth-brand h2 {
        font-size: 32px;
    }
    .cab-auth-rocket {
        left: auto;
        right: 0;
    }
}

@media screen and (max-width: 991px) {
    .cab-auth {
        grid-template-columns: 1fr;
    }
    .cab-auth-brand {
        display: none;
    }
    .cab-auth-main {
        min-height: 100vh;
        padding: 32px 20px;
    }
}

@media screen and (max-width: 575px) {
    .cab-auth-main {
        align-items: flex-start;
        padding: 20px 14px;
    }
    .cab-auth-card {
        padding: 28px 22px 22px;
        border-radius: 20px;
    }
    .cab-auth-head h1 {
        font-size: 24px;
    }
    .cab-auth-row {
        flex-wrap: wrap;
    }
    .vp-alert-wrap {
        left: 14px;
        right: 14px;
        top: 14px;
        max-width: none;
    }
}
