:root {
    --auth-bg: #080a08;
    --auth-panel: #0d100c;
    --auth-surface: #141713;
    --auth-line: rgba(255, 255, 255, .1);
    --auth-text: #f6f8f2;
    --auth-muted: #929a8d;
    --auth-lime: #c6ff3d;
    --auth-coral: #ff6b45;
    --font-family: 'Manrope', sans-serif;
}

html, body { min-height: 100%; }

body {
    background: var(--auth-bg);
    font-family: 'Manrope', sans-serif;
}

.auth-page {
    position: relative;
    min-height: 100vh !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.08fr) minmax(480px, .92fr);
    align-items: stretch !important;
    padding: 0 !important;
    overflow: hidden;
    background: var(--auth-bg) !important;
}

.auth-page::before {
    content: '';
    position: absolute;
    z-index: 0;
    inset: 0 46% 0 0;
    opacity: .65;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 66px 66px;
    mask-image: linear-gradient(135deg, #000, transparent 85%);
}

.auth-brand {
    position: fixed;
    z-index: 20;
    top: 25px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

.auth-brand:hover { color: #fff; }

.auth-brand-mark {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #101409;
    background: var(--auth-lime);
    font-size: 14px;
    transform: rotate(-4deg);
    box-shadow: 0 10px 28px rgba(198,255,61,.13);
}

.auth-brand-name {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.055em;
}

.auth-brand-name span { color: var(--auth-lime); }

.auth-showcase {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 110px clamp(38px, 6vw, 100px) 60px;
    overflow: hidden;
    border-right: 1px solid var(--auth-line);
    background:
        radial-gradient(circle at 25% 70%, rgba(255,107,69,.08), transparent 28%),
        radial-gradient(circle at 72% 32%, rgba(198,255,61,.11), transparent 30%);
}

.auth-showcase::after {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    right: -240px;
    bottom: -150px;
    border: 1px solid rgba(198,255,61,.13);
    border-radius: 50%;
    box-shadow: 0 0 0 65px rgba(198,255,61,.018), 0 0 0 130px rgba(198,255,61,.012);
}

.auth-showcase-content {
    position: relative;
    z-index: 2;
    width: min(100%, 710px);
    margin-inline: auto;
    animation: auth-reveal .75s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes auth-reveal {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: #cfd5c8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.auth-eyebrow i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--auth-lime);
    box-shadow: 0 0 13px var(--auth-lime);
}

.auth-showcase h2 {
    max-width: 650px;
    margin: 0;
    color: #fff;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(52px, 6vw, 86px);
    font-weight: 800;
    line-height: .91;
    letter-spacing: -.07em;
}

.auth-showcase h2 em {
    color: var(--auth-lime);
    font-style: normal;
}

.auth-showcase > .auth-showcase-content > p {
    max-width: 560px;
    margin: 24px 0 30px;
    color: #9ba395;
    font-size: 16px;
    line-height: 1.7;
}

/* Login product preview */
.auth-reader-preview {
    width: min(100%, 560px);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 19px;
    background: rgba(16,19,15,.84);
    box-shadow: 0 28px 65px rgba(0,0,0,.35);
    backdrop-filter: blur(18px);
    transform: rotate(-1.2deg);
}

.auth-preview-top {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    color: #858d80;
    border-bottom: 1px solid rgba(255,255,255,.07);
    font-size: 9px;
    font-weight: 700;
}
.auth-preview-top span { display: flex; align-items: center; gap: 7px; }
.auth-preview-top span i { color: var(--auth-lime); }

.auth-preview-body {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 22px;
    padding: 20px;
}

.auth-preview-cover {
    aspect-ratio: 2/3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 13px;
    border-radius: 9px;
    color: #101409;
    background: var(--auth-lime);
    box-shadow: 0 14px 30px rgba(0,0,0,.3);
}
.auth-preview-cover small { font-size: 8px; font-weight: 800; }
.auth-preview-cover strong {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 17px;
    line-height: .92;
}

.auth-preview-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.auth-preview-copy > small { color: var(--auth-lime); font-size: 7px; font-weight: 800; letter-spacing: .13em; }
.auth-preview-copy > strong {
    max-width: 300px;
    margin: 7px 0 5px;
    color: #fff;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 20px;
    line-height: 1.05;
}
.auth-preview-copy > span { color: #777f73; font-size: 9px; }
.auth-preview-progress {
    height: 4px;
    margin: 18px 0 13px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255,255,255,.08);
}
.auth-preview-progress i { display: block; width: 68%; height: 100%; background: var(--auth-lime); }
.auth-preview-copy button {
    width: fit-content;
    min-height: 34px;
    padding: 0 13px;
    color: #101409;
    background: var(--auth-lime);
    border: 0;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 800;
}

/* Register book composition */
.auth-book-stack {
    position: relative;
    width: min(100%, 560px);
    height: 240px;
    margin: 6px 0 8px;
}

.auth-stack-book {
    position: absolute;
    width: 142px;
    aspect-ratio: 2/3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 14px;
    border-radius: 10px;
    box-shadow: 0 24px 50px rgba(0,0,0,.38);
}
.auth-stack-book small,
.auth-stack-book span { font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.auth-stack-book strong {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 20px;
    line-height: .9;
}
.stack-book-one {
    z-index: 3;
    left: 10%;
    top: 12px;
    color: #101409;
    background: var(--auth-lime);
    transform: rotate(-9deg);
}
.stack-book-two {
    z-index: 2;
    left: calc(10% + 105px);
    top: 0;
    color: #fff;
    background: #304bd8;
    transform: rotate(2deg);
}
.stack-book-three {
    z-index: 1;
    left: calc(10% + 215px);
    top: 17px;
    color: #1d120e;
    background: var(--auth-coral);
    transform: rotate(10deg);
}

.auth-benefits {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    color: #868e81;
    font-size: 9px;
    font-weight: 700;
}
.auth-benefits span { display: flex; align-items: center; gap: 6px; }
.auth-benefits i { color: var(--auth-lime); }

/* Form panel */
.auth-panel {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 90px clamp(28px, 5vw, 80px) 38px;
    overflow-y: auto;
    background:
        radial-gradient(circle at 100% 0, rgba(198,255,61,.05), transparent 28%),
        var(--auth-panel);
}

.auth-container {
    width: min(100%, 480px) !important;
    max-width: none !important;
}

.auth-header {
    margin: 0 0 25px !important;
    text-align: left !important;
    animation: none !important;
}

.auth-step {
    display: block;
    margin-bottom: 9px;
    color: var(--auth-lime);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .13em;
}

.auth-header h1 {
    margin: 0 0 6px !important;
    color: #fff;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(34px, 4vw, 46px) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: -.055em;
}

.auth-header p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 13px;
}

.auth-card {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    animation: none !important;
}

.auth-card .alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    color: #ff9d9d;
    background: rgba(255,68,68,.08);
    border: 1px solid rgba(255,68,68,.22);
    border-radius: 11px;
    font-size: 12px;
}

.auth-card .input-group { margin-bottom: 15px; }

.auth-card .input-label {
    margin-bottom: 7px;
    color: #d6dbd1;
    font-size: 11px;
    font-weight: 700;
}

.auth-card .input-wrapper { position: relative; }

.auth-card .input {
    min-height: 52px;
    padding: 0 45px !important;
    color: #fff;
    background: rgba(255,255,255,.045) !important;
    border: 1px solid var(--auth-line);
    border-radius: 11px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
}

.auth-card .input:hover { border-color: rgba(255,255,255,.17); }
.auth-card .input:focus {
    border-color: rgba(198,255,61,.43) !important;
    background: rgba(255,255,255,.065) !important;
    box-shadow: 0 0 0 3px rgba(198,255,61,.07) !important;
}
.auth-card .input::placeholder { color: #62695e; }

.auth-card .input-icon {
    left: 16px !important;
    color: #697064;
    font-size: 12px;
}

.auth-card .toggle-password {
    right: 13px !important;
    color: #697064;
}
.auth-card .toggle-password:hover { color: var(--auth-lime); }

.auth-card .input-error {
    border-color: rgba(255,85,85,.55) !important;
    background: rgba(255,68,68,.045) !important;
}

.auth-card .error-text {
    color: #ff8585;
    font-size: 10px;
}

.remember-forgot {
    margin: 2px 0 18px !important;
    color: var(--auth-muted);
    font-size: 10px !important;
}

.remember-me input {
    width: 16px !important;
    height: 16px !important;
    accent-color: var(--auth-lime);
}

.auth-help-text { color: #697064; }

.auth-card .btn-primary {
    width: 100%;
    min-height: 53px;
    margin-top: 7px;
    gap: 10px;
    color: #101409 !important;
    background: var(--auth-lime) !important;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(198,255,61,.12);
}
.auth-card .btn-primary:hover {
    color: #101409 !important;
    background: #d5ff6c !important;
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(198,255,61,.18) !important;
}

.password-strength {
    height: 3px !important;
    margin-top: 6px !important;
    background: rgba(255,255,255,.07) !important;
}

.login-footer,
.register-footer {
    margin-top: 22px !important;
    padding-top: 19px !important;
    color: var(--auth-muted) !important;
    border-color: var(--auth-line) !important;
    font-size: 11px !important;
}

.login-footer a,
.register-footer a {
    color: var(--auth-lime) !important;
    font-weight: 800 !important;
}

.trust-badges-register {
    gap: 14px !important;
    margin-top: 17px !important;
}
.trust-badge-register {
    color: #697064 !important;
    font-size: 9px !important;
}
.trust-badge-register i { color: var(--auth-lime) !important; }

.auth-legal {
    width: min(100%, 480px);
    margin: 24px 0 0;
    color: #596056;
    font-size: 9px;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 1050px) {
    .auth-page { grid-template-columns: minmax(0, .9fr) minmax(450px, 1.1fr); }
    .auth-showcase { padding-inline: 38px; }
    .auth-showcase h2 { font-size: clamp(48px, 6vw, 67px); }
    .auth-benefits { flex-wrap: wrap; }
}

@media (max-width: 760px) {
    .auth-page {
        display: block !important;
        min-height: 100vh !important;
        overflow: visible;
    }
    .auth-page::before { inset: 0; }
    .auth-brand {
        position: absolute;
        top: 18px;
        left: 19px;
    }
    .auth-brand-mark { width: 35px; height: 35px; }
    .auth-brand-name { font-size: 21px; }
    .auth-showcase { display: none; }
    .auth-panel {
        min-height: 100vh;
        justify-content: center;
        padding: 92px 19px 32px;
    }
    .auth-container { width: 100% !important; }
    .auth-header h1 { font-size: 39px !important; }
    .auth-card .input { min-height: 50px; }
    .trust-badges-register { gap: 9px !important; }
}

@media (max-height: 760px) and (min-width: 761px) {
    .auth-panel { justify-content: flex-start; padding-top: 80px; }
    .auth-showcase { padding-top: 90px; }
    .auth-reader-preview { max-width: 500px; }
    .auth-book-stack { height: 205px; transform: scale(.86); transform-origin: left center; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-showcase-content { animation: none; }
}
