:root {
    --auth-ink: #08291f;
    --auth-muted: #66756f;
    --auth-green: #82ce46;
    --auth-green-dark: #0d5a43;
    --auth-line: #dce7e1;
    --auth-soft: #f2f7ef;
    --auth-danger: #b42318;
}

* {
    box-sizing: border-box;
}

body.auth-page {
    margin: 0;
    min-height: 100vh;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 82% 7%, rgba(130, 206, 70, .13), transparent 25rem),
        #f3f5f4;
    font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 54px max(20px, calc((100vw - 1180px) / 2)) 28px;
}

button,
input {
    font: inherit;
}

.auth-page-wrap {
    width: min(1180px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 54px 0 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(460px, 1.08fr);
    min-height: 690px;
    overflow: hidden;
    border: 1px solid rgba(8, 41, 31, .09);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(8, 41, 31, .11);
    width: 100%;
    margin: auto;
}

.auth-shell--register {
    min-height: 760px;
}

.auth-form-panel {
    padding: 46px clamp(34px, 4vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-side {
    padding: 46px clamp(34px, 4vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo {
    width: fit-content;
    margin-bottom: 38px;
}

.auth-logo img {
    display: block;
    width: auto;
    height: 44px;
    max-width: 190px;
    object-fit: contain;
}

.auth-heading > span {
    color: #559b2f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-heading h1 {
    margin: 8px 0 0;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: -.045em;
    line-height: 1.08;
}

.auth-heading p {
    margin: 10px 0 25px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.65;
}

.google-auth-button {
    width: 100%;
    min-height: 48px;
    border: 1px solid #b9d0c4;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--auth-ink);
    background: #fff;
    font-weight: 750;
    text-decoration: none;
    transition: .2s ease;
}

.google-auth-button:hover {
    transform: translateY(-1px);
    border-color: #75aa91;
    box-shadow: 0 10px 24px rgba(8, 41, 31, .08);
}

.google-auth-button svg {
    width: 20px;
    height: 20px;
}

.modern-auth-form > label,
.modern-auth-form > div > label,
.auth-label-row label {
    display: block;
    margin: 0 0 7px;
    font-size: 13px;
    font-weight: 750;
}

.modern-auth-form > .auth-input,
.modern-auth-form > div {
    margin-bottom: 17px;
}

.modern-auth-form .auth-input {
    position: relative;
    min-height: 48px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    display: flex;
    align-items: center;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.modern-auth-form .auth-input:focus-within {
    border-color: #70b44b;
    box-shadow: 0 0 0 4px rgba(130, 206, 70, .14);
}

.modern-auth-form .auth-input > svg {
    width: 19px;
    height: 19px;
    margin-left: 14px;
    fill: none;
    stroke: #728079;
    stroke-width: 1.7;
}

.modern-auth-form .auth-input input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0 14px;
    border: 0;
    outline: 0;
    color: var(--auth-ink);
    background: transparent;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.auth-label-row a,
.auth-switch a {
    color: var(--auth-green-dark);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.password-toggle {
    width: 38px;
    height: 38px;
    margin-right: 5px;
    border: 0;
    border-radius: 9px;
    color: #6d7a74;
    background: transparent;
    cursor: pointer;
}

.modern-auth-form > .auth-check {
    margin: 0 0 20px;
    display: flex;
}

.auth-notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 11px;
    font-size: 13px;
}

.auth-notice p {
    margin: 0;
}

.auth-notice.success {
    color: #175b33;
    background: #eaf7e5;
}

.auth-notice.error {
    color: var(--auth-danger);
    background: #fff1ef;
}

.register-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}

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

.auth-register-shell {
    min-height: 760px;
}

.auth-brand {
    width: fit-content;
    margin-bottom: 42px;
}

.auth-brand img {
    display: block;
    width: auto;
    height: 44px;
    max-width: 190px;
    object-fit: contain;
}

.auth-kicker {
    margin: 0 0 8px;
    color: #559b2f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-title {
    margin: 0;
    color: var(--auth-ink);
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.08;
}

.auth-subtitle {
    margin: 10px 0 25px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.65;
}

.auth-google {
    width: 100%;
    min-height: 48px;
    border: 1px solid #b9d0c4;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--auth-ink);
    background: #fff;
    font-weight: 750;
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.auth-google:hover {
    transform: translateY(-1px);
    border-color: #75aa91;
    box-shadow: 0 10px 24px rgba(8, 41, 31, .08);
}

.auth-google svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.auth-divider {
    margin: 23px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #87938e;
    font-size: 12px;
}

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

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.auth-field {
    margin-bottom: 17px;
}

.auth-grid .auth-field {
    margin-bottom: 0;
}

.auth-field--wide {
    grid-column: 1 / -1;
}

.auth-label {
    display: block;
    margin-bottom: 7px;
    color: var(--auth-ink);
    font-size: 13px;
    font-weight: 750;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    outline: none;
    color: var(--auth-ink);
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-input::placeholder {
    color: #a3ada8;
}

.auth-input:focus {
    border-color: #70b44b;
    box-shadow: 0 0 0 4px rgba(130, 206, 70, .14);
}

.auth-input--password {
    padding-right: 48px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: #6d7a74;
    background: transparent;
    cursor: pointer;
}

.auth-password-toggle:hover {
    color: var(--auth-green-dark);
    background: var(--auth-soft);
}

.auth-password-toggle svg {
    width: 19px;
    height: 19px;
}

.auth-row {
    margin: 4px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #33463f;
    font-size: 13px;
    cursor: pointer;
}

.auth-check input {
    appearance: none;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin: 0;
    border: 1.5px solid #a8b5af;
    border-radius: 6px;
    display: grid;
    place-content: center;
    background: #fff;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.auth-check input::before {
    content: "";
    width: 10px;
    height: 6px;
    border: solid #fff;
    border-width: 0 0 2px 2px;
    opacity: 0;
    transform: translateY(-1px) rotate(-45deg) scale(.6);
    transition: opacity .18s ease, transform .18s ease;
}

.auth-check input:checked {
    border-color: var(--auth-green-dark);
    background: var(--auth-green-dark);
}

.auth-check input:checked::before {
    opacity: 1;
    transform: translateY(-1px) rotate(-45deg) scale(1);
}

.auth-check input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(130, 206, 70, .2);
}

.auth-link {
    color: var(--auth-green-dark);
    font-weight: 750;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--auth-green-dark);
    box-shadow: 0 12px 26px rgba(13, 90, 67, .18);
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    background: #0a4937;
    box-shadow: 0 16px 32px rgba(13, 90, 67, .23);
}

.auth-switch {
    margin: 24px 0 0;
    color: #41534c;
    font-size: 13px;
}

.auth-alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.5;
}

.auth-alert--success {
    color: #175b33;
    background: #eaf7e5;
}

.auth-alert--error {
    color: var(--auth-danger);
    background: #fff1ef;
}

.auth-errors {
    margin: 0;
    padding-left: 18px;
}

.auth-visual {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: #052d22;
    isolation: isolate;
}

.auth-visual::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background:
        linear-gradient(110deg, rgba(2, 24, 18, .77), rgba(2, 24, 18, .18) 58%, rgba(2, 24, 18, .58)),
        linear-gradient(0deg, rgba(2, 28, 21, .72), transparent 54%);
}

.auth-visual::after {
    position: absolute;
    inset: 0;
    z-index: 2;
    content: "";
    opacity: .25;
    background-image:
        linear-gradient(rgba(255,255,255,.11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.11) 1px, transparent 1px);
    background-size: 72px 72px;
    transform: perspective(600px) rotate(-8deg) scale(1.12);
}

.auth-visual-photo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    filter: saturate(.84) contrast(1.05);
}

.auth-visual-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-visual-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.auth-visual-copy {
    position: absolute;
    left: 44px;
    right: 44px;
    bottom: 42px;
    z-index: 4;
}

.auth-visual-copy > span {
    color: #b9f28b;
    font-size:12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.auth-dashboard-preview,
.auth-stat-card {
    position: absolute;
    z-index: 4;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 18px;
    color: #fff;
    background: rgba(3, 37, 28, .82);
    box-shadow: 0 22px 48px rgba(0,0,0,.28);
    backdrop-filter: blur(14px);
}

.auth-dashboard-preview {
    top: 25%;
    left: 10%;
    width: min(360px, 70%);
    padding: 20px;
    transform: rotate(-3deg);
}

.preview-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    color: #b9f28b;
    font-size:12px;
    font-weight: 750;
}

.preview-top i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 4px;
    border-radius: 50%;
    background: var(--auth-green);
}

.preview-top small {
    color: rgba(255,255,255,.55);
}

.auth-dashboard-preview > strong {
    display: block;
    font-size: 20px;
}

.auth-dashboard-preview > p {
    margin: 5px 0 18px;
    color: rgba(255,255,255,.65);
    font-size: 12px;
}

.auth-dashboard-preview > div:last-child {
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.13);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.auth-stat-card {
    top: 47%;
    right: 7%;
    width: 190px;
    padding: 16px;
    transform: rotate(3deg);
}

.auth-stat-card > span {
    color: rgba(255,255,255,.62);
    font-size:12px;
}

.auth-stat-card strong {
    display: block;
    margin: 5px 0 14px;
    font-size: 27px;
}

.auth-stat-card strong i {
    color: #a8e875;
    font-size:12px;
    font-style: normal;
}

.auth-stat-card > div {
    height: 44px;
    display: flex;
    align-items: end;
    gap: 6px;
}

.auth-stat-card > div i {
    width: 100%;
    border-radius: 4px 4px 1px 1px;
    background: var(--auth-green);
}

.auth-stat-card > div i:nth-child(1) { height: 35%; }
.auth-stat-card > div i:nth-child(2) { height: 62%; }
.auth-stat-card > div i:nth-child(3) { height: 48%; }
.auth-stat-card > div i:nth-child(4) { height: 85%; }
.auth-stat-card > div i:nth-child(5) { height: 68%; }
.auth-stat-card > div i:nth-child(6) { height: 100%; }

.auth-visual-proof {
    position: absolute;
    top: 42px;
    right: 36px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.auth-visual-proof > span {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #17370f;
    background: var(--auth-green);
}

.auth-visual-proof strong,
.auth-visual-proof small {
    display: block;
}

.auth-visual-proof strong {
    font-size:12px;
}

.auth-visual-proof small {
    margin-top: 3px;
    color: rgba(255,255,255,.6);
    font-size:12px;
}

.auth-visual-badge {
    width: fit-content;
    padding: 9px 13px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    color: #fff;
    background: rgba(5, 45, 34, .65);
    backdrop-filter: blur(12px);
    font-size: 12px;
    font-weight: 750;
}

.auth-preview {
    width: min(100%, 430px);
    margin: auto;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 22px;
    color: #fff;
    background: rgba(2, 30, 23, .78);
    box-shadow: 0 28px 60px rgba(0,0,0,.28);
    backdrop-filter: blur(14px);
    transform: rotate(-3deg);
}

.auth-preview-head,
.auth-preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-preview-label {
    color: rgba(255,255,255,.65);
    font-size:12px;
}

.auth-preview-value {
    margin-top: 5px;
    font-size: 30px;
    font-weight: 800;
}

.auth-preview-pill {
    padding: 7px 10px;
    border-radius: 999px;
    color: #17370f;
    background: var(--auth-green);
    font-size:12px;
    font-weight: 850;
}

.auth-chart {
    height: 116px;
    margin: 24px 0 18px;
    display: flex;
    align-items: end;
    gap: 9px;
}

.auth-chart span {
    flex: 1;
    min-width: 8px;
    height: var(--bar);
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(#a5f266, #4d9c31);
    animation: authBar 1.1s ease both;
    transform-origin: bottom;
}

.auth-chart span:nth-child(2n) {
    animation-delay: .08s;
}

.auth-chart span:nth-child(3n) {
    animation-delay: .15s;
}

@keyframes authBar {
    from { transform: scaleY(.15); opacity: .25; }
    to { transform: scaleY(1); opacity: 1; }
}

.auth-preview-row {
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,.13);
    color: rgba(255,255,255,.76);
    font-size: 12px;
}

.auth-preview-row strong {
    color: #fff;
}

.auth-visual-copy {
    max-width: 430px;
}

.auth-visual-copy h2 {
    margin: 0 0 9px;
    color: #fff;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -.04em;
    line-height: 1.08;
}

.auth-visual-copy p {
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: 13px;
    line-height: 1.6;
}

.auth-footer {
    padding: 24px 4px 0;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: #718079;
    font-size: 12px;
}

body.auth-page > .auth-footer {
    width: 100%;
    margin: 0 auto;
}

body.auth-page > .auth-footer > div {
    display: flex;
    gap: 20px;
}

.auth-footer a {
    color: inherit;
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--auth-green-dark);
}

.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    color: #52665c;
    font-size: 13px;
    line-height: 1.5;
}

.auth-terms input {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: var(--auth-green-dark);
}

.auth-terms a {
    color: var(--auth-green-dark);
    font-weight: 800;
}

button.google-auth-button {
    width: 100%;
    font: inherit;
    cursor: pointer;
}

.auth-terms-google {
    justify-content: center;
    align-items: center;
    margin: 11px 0 0;
    color: #718079;
    font-size: 12px;
}

.auth-terms-google input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0;
}

.auth-terms-google a {
    text-underline-offset: 2px;
}

.auth-terms-shared {
    justify-content: flex-start;
    align-items: center;
    width: fit-content;
    margin: 12px auto 0;
    padding: 7px 10px;
    border: 0;
    border-radius: 9px;
    background: #f2f8f4;
    color: #3f5d50;
    font-size: 12px;
    cursor: pointer;
}

.auth-terms-shared input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-block;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 2px solid #58a97d;
    border-radius: 6px;
    background-color: #fff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 14px;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.auth-terms-shared input:checked {
    border-color: #16824f;
    background-color: #16824f;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.3' d='m3 8 3 3 7-7'/%3E%3C/svg%3E");
}

.auth-terms-shared input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(22,130,79,.16);
}

.auth-terms-shared a {
    color: #126c43;
    font-weight: 800;
    text-underline-offset: 2px;
}

.auth-terms-shared:hover {
    background: #eaf5ee;
}

@media (max-width: 920px) {
    .auth-page-wrap {
        width: min(720px, calc(100% - 28px));
        padding-top: 24px;
    }

    .auth-shell,
    .auth-shell--register {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-form-panel {
        padding: 42px;
    }

    .auth-form-side {
        padding: 42px;
    }

    .auth-visual {
        min-height: 430px;
    }
}

@media (max-width: 560px) {
    .auth-page-wrap {
        width: calc(100% - 20px);
        padding: 10px 0 20px;
    }

    .auth-shell {
        border-radius: 20px;
    }

    .auth-form-panel {
        padding: 30px 22px;
    }

    .auth-form-side {
        padding: 30px 22px;
    }

    .auth-brand {
        margin-bottom: 30px;
    }

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

    .register-grid {
        grid-template-columns: 1fr;
    }

    .register-full {
        grid-column: auto;
    }

    .auth-field--wide {
        grid-column: auto;
    }

    .auth-row,
    .auth-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-visual {
        min-height: 380px;
    }

    .auth-visual-content {
        padding: 26px;
    }

    .auth-preview {
        padding: 18px;
    }
}
