:root {
    --text: #111827;
    --muted: #637083;
    --line: #e4e8f2;
    --brand: #5144d9;
    --green: #078f4f;
    --green-bright: #10a66a;
    --green-dark: #08784d;
    --ink: #061436;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: linear-gradient(135deg, #f6fbff 0, #f7f2ff 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(100%, 430px);
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(24, 36, 64, 0.12);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.brand strong {
    display: block;
    font-size: 18px;
    line-height: 1.15;
}

.brand-mark {
    position: relative;
    width: 58px;
    height: 46px;
    flex: 0 0 58px;
}

.brand-mark::before {
    content: "";
    position: absolute;
    left: 7px;
    right: 7px;
    top: 16px;
    height: 23px;
    border: 2px solid #24495e;
    border-radius: 6px;
    background: #effaf1;
}

.brand-mark::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    top: 6px;
    height: 16px;
    border-radius: 10px 10px 5px 5px;
    border: 2px solid #24495e;
    background: repeating-linear-gradient(90deg, #158a45 0 10px, #f4cd52 10px 20px);
}

.brand-mark span {
    position: absolute;
    left: 13px;
    bottom: 2px;
    width: 34px;
    height: 9px;
    border-radius: 10px;
    background: #d5e4ef;
}

.login-panel h1 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.1;
}

.login-panel p {
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.5;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
}

.alert-error {
    color: #b42318;
    background: #fff1f0;
    border: 1px solid #ffd5d2;
}

.alert-info {
    color: #155eef;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

.login-form input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    font: inherit;
}

.login-form input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(81, 68, 217, 0.12);
}

.login-form button {
    height: 46px;
    margin-top: 4px;
    color: #ffffff;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #6548df, #4933c3);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.demo-box {
    display: grid;
    gap: 3px;
    margin-top: 18px;
    padding: 13px 14px;
    border-radius: 8px;
    color: #184335;
    background: #f0fff6;
    border: 1px solid #c7f0d6;
}

.demo-box span,
.demo-box small {
    color: #4a695f;
    font-weight: 700;
}

.demo-box a {
    color: #08784d;
    text-decoration: none;
}

.auth-demo-alt {
    background: #f8fbff;
    border-color: #dbe7f5;
}

.auth-login-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(420px, 1.08fr) minmax(380px, .92fr);
    align-items: center;
    gap: 44px;
    padding: 42px max(34px, calc((100vw - 1180px) / 2));
    overflow: hidden;
    color: var(--ink);
    background:
        radial-gradient(circle at 82% 0, rgba(16, 166, 106, .14) 0 220px, transparent 360px),
        radial-gradient(circle at 8% 76%, rgba(11, 134, 232, .11) 0 230px, transparent 380px),
        linear-gradient(135deg, #ffffff 0, #f6fbff 58%, #eef8f3 100%);
}

.auth-showcase {
    min-width: 0;
    min-height: 640px;
    position: relative;
    display: grid;
    align-content: start;
    gap: 42px;
}

.auth-showcase-brand {
    margin-bottom: 4px;
}

.brand .is-green {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
}

.brand .is-green::before {
    left: 8px;
    right: 8px;
    top: 15px;
    height: 25px;
    border-color: var(--green-dark);
    background: #effaf5;
}

.brand .is-green::after {
    left: 5px;
    right: 5px;
    border-color: var(--green-dark);
    background: repeating-linear-gradient(90deg, #10a66a 0 14px, #ffffff 14px 28px);
}

.auth-showcase-brand strong {
    color: var(--ink);
    font-size: 27px;
    line-height: 1;
}

.auth-showcase-brand strong span {
    color: var(--green-bright);
}

.auth-showcase-brand small {
    display: block;
    margin-top: 4px;
    color: #34425d;
    font-size: 12px;
    font-weight: 850;
}

.auth-showcase-copy h1 {
    max-width: 520px;
    margin: 0 0 16px;
    font-size: clamp(38px, 4.4vw, 66px);
    line-height: 1.08;
    letter-spacing: 0;
}

.auth-showcase-copy p {
    max-width: 500px;
    margin: 0;
    color: #40506a;
    font-size: 19px;
    font-weight: 750;
    line-height: 1.55;
}

.auth-showcase-scene {
    position: relative;
    min-height: 310px;
    max-width: 610px;
}

.auth-shop-mini {
    position: absolute;
    left: 38px;
    bottom: 18px;
    width: 238px;
    height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 18px;
    border: 1px solid #dfe8f3;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff, #eaf8f1);
    box-shadow: 0 22px 54px rgba(10, 32, 70, .14);
}

.auth-shop-mini::before {
    content: "";
    position: absolute;
    left: -12px;
    right: -12px;
    top: -44px;
    height: 60px;
    border: 1px solid #d4e3f0;
    border-radius: 18px 18px 10px 10px;
    background: repeating-linear-gradient(90deg, #10a66a 0 42px, #ffffff 42px 84px);
    box-shadow: 0 14px 30px rgba(10, 32, 70, .1);
}

.auth-shop-mini strong {
    color: var(--green-dark);
    font-size: 30px;
    font-weight: 950;
}

.auth-shop-mini i {
    padding: 7px 12px;
    color: #ffffff;
    border-radius: 9px;
    background: #8a6a43;
    font-size: 12px;
    font-style: normal;
    font-weight: 950;
}

.auth-product {
    position: absolute;
    overflow: hidden;
    border: 8px solid #ffffff;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(10, 32, 70, .16);
}

.auth-product img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.auth-product-main {
    left: 190px;
    bottom: 0;
    width: 150px;
    height: 178px;
    z-index: 2;
}

.auth-product-side {
    left: 92px;
    bottom: -8px;
    width: 120px;
    height: 128px;
    transform: rotate(-4deg);
}

.auth-metric-card {
    position: absolute;
    right: 0;
    top: 16px;
    width: min(330px, 58%);
    min-height: 218px;
    padding: 20px;
    border: 1px solid #dfe8f3;
    border-radius: 22px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 60px rgba(10, 32, 70, .14);
    backdrop-filter: blur(14px);
}

.auth-metric-card > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-metric-card span,
.auth-metric-card small,
.auth-metric-card dt {
    color: #5d6a82;
    font-size: 12px;
    font-weight: 900;
}

.auth-metric-card small {
    padding: 7px 9px;
    border: 1px solid #e4eaf4;
    border-radius: 999px;
    background: #f8fbff;
}

.auth-metric-card dl {
    display: grid;
    gap: 16px;
    margin: 0;
}

.auth-metric-card dl div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 10px;
}

.auth-metric-card dt,
.auth-metric-card dd { margin: 0; }
.auth-metric-card dd { color: var(--ink); font-size: 21px; font-weight: 950; }
.auth-metric-card em { color: var(--green-bright); font-size: 12px; font-style: normal; font-weight: 950; }

.auth-login-card {
    width: min(100%, 520px);
    justify-self: end;
    padding: 54px;
    border: 1px solid rgba(223, 232, 243, .86);
    border-radius: 22px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 30px 90px rgba(10, 32, 70, .14);
    backdrop-filter: blur(18px);
}

.auth-login-card h1 {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 32px;
}

.auth-login-card > p {
    margin-bottom: 26px;
    color: #5d6a82;
    font-weight: 750;
}

.auth-login-card .login-form {
    gap: 16px;
}

.auth-login-card .login-form label {
    color: #263853;
    font-size: 13px;
    font-weight: 900;
}

.input-wrap {
    min-height: 50px;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid #dfe8f3;
    border-radius: 12px;
    background: #ffffff;
}

.input-wrap:focus-within {
    border-color: var(--green-bright);
    box-shadow: 0 0 0 4px rgba(16, 166, 106, .12);
}

.input-wrap i {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    color: #8a96aa;
    border-radius: 8px;
    background: #f8fbff;
    font-style: normal;
    font-weight: 950;
}

.auth-login-card .input-wrap input {
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-weight: 800;
}

.auth-login-card .input-wrap input:focus {
    box-shadow: none;
}

.login-form .password-toggle {
    width: auto;
    height: 34px;
    margin: 0;
    padding: 0 9px;
    color: var(--green-dark);
    border: 0;
    border-radius: 9px;
    background: #eaf8f1;
    box-shadow: none;
    font-size: 12px;
    font-weight: 950;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #5d6a82;
    font-size: 13px;
    font-weight: 800;
}

.login-options label {
    display: inline-flex;
    grid-template-columns: none;
    align-items: center;
    gap: 8px;
}

.login-options input {
    width: 16px;
    height: 16px;
    accent-color: var(--green-bright);
}

.login-options a {
    color: var(--green-dark);
    text-decoration: none;
}

.auth-login-card .login-form > button[type="submit"] {
    min-height: 50px;
    margin-top: 6px;
    border-radius: 12px;
    background: linear-gradient(135deg, #11aa6e, #068653);
    box-shadow: 0 16px 34px rgba(11, 147, 91, .24);
}

.auth-register-button {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    color: var(--green-dark);
    border: 1px solid #ccebdd;
    border-radius: 12px;
    background: #ffffff;
    font-weight: 950;
    text-decoration: none;
}

.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin: 20px 0 14px;
    color: #8a96aa;
    font-size: 12px;
    font-weight: 900;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    background: #e4eaf4;
}

.auth-login-card .demo-box {
    margin-top: 0;
    text-align: center;
}

.auth-register-card {
    padding-block: 42px;
}

.auth-register-card .login-form {
    gap: 13px;
}

.auth-register-card .input-wrap {
    min-height: 48px;
}

.auth-register-card .input-wrap i {
    font-size: 11px;
}

@media (max-width: 980px) {
    .auth-login-shell {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 28px;
    }

    .auth-showcase {
        min-height: auto;
        gap: 24px;
    }

    .auth-showcase-scene {
        min-height: 240px;
    }

    .auth-login-card {
        justify-self: center;
    }
}

@media (max-width: 620px) {
    .auth-login-shell {
        padding: 18px;
    }

    .auth-showcase-copy h1 {
        font-size: 34px;
    }

    .auth-showcase-copy p {
        font-size: 16px;
    }

    .auth-showcase-scene {
        display: none;
    }

    .auth-login-card {
        padding: 26px;
        border-radius: 18px;
    }

    .auth-register-card {
        padding-block: 24px;
    }

    .auth-login-card h1 {
        font-size: 27px;
    }

    .login-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 16px;
    }

    .login-panel {
        padding: 22px;
    }
}
