﻿:root {
    --auth-red: #c82121;
    --auth-red-deep: #a51a1a;
    --auth-red-soft: #f8e8e8;
    --auth-ink: #1f2937;
    --auth-muted: #6b7280;
    --auth-line: #e5e7eb;
    --auth-panel: #ffffff;
    --auth-page: #f7f8fa;
    --auth-danger: #b42318;
    --auth-font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    --auth-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --auth-radius: 18px;
}

* { box-sizing: border-box; }

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

body.auth-body {
    font-family: var(--auth-font);
    color: var(--auth-ink);
    background: var(--auth-page);
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.auth-page {
    position: relative;
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-deco {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

.auth-deco--tr {
    top: 0;
    right: 0;
    width: min(420px, 48vw);
    height: auto;
    display: block;
}

.auth-deco--bl {
    left: 0;
    bottom: var(--auth-trust-h, 64px);
    width: min(380px, 46vw);
    height: auto;
    display: block;
    transform: scaleX(-1) scaleY(-1);
    opacity: 0.95;
}

.auth-skyline {
    position: absolute;
    inset: auto 0 var(--auth-trust-h, 64px) 0;
    height: 140px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 140' fill='%231f2937'%3E%3Cpath d='M0 140V90h40V50h30v40h20V30h50v60h25V70h35v70H0zm220 0V40h20V20h40v20h20v100h-80zm110 0V55h45v85h-45zm70 0V25h25V10h40v15h25v115H400zm130 0V60h30V35h50v25h30v80H530zm150 0V45h40v95h-40zm70 0V20h20V5h50v15h20v120h-90zm120 0V50h60v90h-60zm90 0V35h25V15h40v20h25v105h-90zm110 0V55h80v85h-80z'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom center;
    background-size: 1200px 140px;
}

.auth-stage {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
    gap: clamp(1rem, 3vw, 2.5rem);
    width: min(1180px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem) 0 1rem;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
}

.auth-hero {
    position: relative;
    z-index: 1;
    padding: 0.5rem 0 1rem;
    animation: auth-rise 0.75s ease-out both;
}

.auth-brand-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.auth-brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: var(--auth-red);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(200, 33, 33, 0.28);
}

.auth-brand-mark svg {
    width: 22px;
    height: 22px;
}

.auth-logo {
    display: none;
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.auth-brand-text strong {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--auth-red);
    line-height: 1.1;
}

.auth-brand-text span {
    font-size: 0.82rem;
    color: var(--auth-muted);
    font-weight: 500;
}

.auth-headline {
    margin: 0 0 0.7rem;
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.18;
    color: var(--auth-ink);
    max-width: 18ch;
}

.auth-headline em {
    font-style: normal;
    color: var(--auth-red);
}

.auth-sub {
    margin: 0 0 1.15rem;
    max-width: 28rem;
    color: var(--auth-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    display: block;
}

.auth-features {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0;
    display: grid;
    gap: 0.7rem;
    position: relative;
    z-index: 1;
    max-width: 28rem;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.auth-feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--auth-red);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0;
}

.auth-feature-icon svg {
    width: 15px;
    height: 15px;
    display: block;
    flex-shrink: 0;
    stroke: #ffffff;
}

.auth-features strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--auth-ink);
    line-height: 1.25;
}

.auth-features li > div {
    min-width: 0;
    flex: 1;
}

.auth-features li > div span {
    display: block;
    font-size: 0.78rem;
    color: var(--auth-muted);
    margin-top: 0.05rem;
    line-height: 1.35;
    white-space: normal;
}

.auth-visual {
    margin: 0 0 1.25rem;
    max-width: 280px;
}

.auth-visual-card {
    position: relative;
    height: 120px;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f3f4f6 100%);
    border: 1px solid rgba(31, 41, 55, 0.08);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.auth-visual-screen {
    position: absolute;
    left: 18px;
    bottom: 18px;
    width: 120px;
    height: 72px;
    border-radius: 8px 8px 4px 4px;
    background:
        linear-gradient(180deg, #e5e7eb 0 12px, transparent 12px),
        linear-gradient(180deg, #fff 0%, #f9fafb 100%);
    border: 2px solid #d1d5db;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
}

.auth-visual-screen::before {
    content: "";
    position: absolute;
    inset: 16px 10px 10px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--auth-red) 0%, #f87171 55%, #fee2e2 100%);
    opacity: 0.9;
}

.auth-visual-stack {
    position: absolute;
    right: 54px;
    bottom: 22px;
    width: 42px;
    height: 54px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--auth-red) 0%, var(--auth-red-deep) 100%);
    box-shadow:
        8px -6px 0 -2px #111827,
        14px -12px 0 -4px #e5e7eb;
}

.auth-visual-mug {
    position: absolute;
    right: 18px;
    bottom: 22px;
    width: 28px;
    height: 34px;
    border-radius: 4px 4px 8px 8px;
    background: #ffffff;
    border: 2px solid #d1d5db;
}

.auth-visual-mug::after {
    content: "e";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-red);
    font-weight: 800;
    font-size: 0.85rem;
}

.auth-quote {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.35rem 0 0;
    padding: 0.7rem 1rem;
    border-radius: 0 12px 12px 0;
    background: linear-gradient(90deg, var(--auth-red) 0%, var(--auth-red-deep) 100%);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(200, 33, 33, 0.25);
    position: relative;
    z-index: 1;
    animation: auth-rise 0.9s ease-out 0.15s both;
}

.auth-quote span {
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 700;
    opacity: 0.85;
}

.auth-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 0;
    animation: auth-rise 0.85s ease-out 0.1s both;
}

.auth-card {
    width: min(100%, 340px);
    max-width: 100%;
    background: var(--auth-panel);
    border-radius: 14px;
    box-shadow: var(--auth-shadow);
    border: 1px solid rgba(31, 41, 55, 0.06);
    padding: clamp(1.1rem, 2vw, 1.45rem);
}

.auth-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--auth-red);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    box-shadow: 0 8px 16px rgba(200, 33, 33, 0.28);
}

.auth-card-icon svg {
    width: 20px;
    height: 20px;
}

.auth-form-wrap h1 {
    margin: 0 0 0.25rem;
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--auth-ink);
}

.auth-form-wrap .lead {
    margin: 0 0 1rem;
    color: var(--auth-muted);
    font-size: clamp(0.8rem, 1.4vw, 0.9rem);
    line-height: 1.45;
}

.auth-alert {
    background: #fdeceb;
    border: 1px solid #f0c2c0;
    color: var(--auth-danger);
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-form .field {
    margin-bottom: 0.8rem;
}

.auth-form label {
    display: block;
    margin: 0 0 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--auth-ink);
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 0.75rem;
    width: 16px;
    height: 16px;
    color: #9ca3af;
    pointer-events: none;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.7rem 2.4rem 0.7rem 2.3rem;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    background: #ffffff;
    font: inherit;
    font-size: 0.88rem;
    color: var(--auth-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input::placeholder {
    color: #9ca3af;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--auth-red);
    box-shadow: 0 0 0 3px rgba(200, 33, 33, 0.15);
}

.auth-toggle-pass {
    position: absolute;
    right: 0.4rem;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-toggle-pass:hover,
.auth-toggle-pass.is-on {
    color: var(--auth-red);
}

.auth-toggle-pass svg {
    width: 16px;
    height: 16px;
}

.auth-toggle-pass .icon-off { display: none; }
.auth-toggle-pass.is-on .icon-on { display: none; }
.auth-toggle-pass.is-on .icon-off { display: block; }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.15rem 0 0.9rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--auth-muted);
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 14px;
    height: 14px;
    accent-color: var(--auth-red);
    cursor: pointer;
}

.auth-form button[type="submit"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 10px;
    background: var(--auth-red);
    color: #ffffff;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 18px rgba(200, 33, 33, 0.25);
}

.auth-form button[type="submit"]:hover {
    background: var(--auth-red-deep);
    transform: translateY(-1px);
}

.auth-form button[type="submit"]:active {
    transform: translateY(0);
}

.auth-foot {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--auth-muted);
}

.auth-foot strong {
    color: var(--auth-red);
    font-weight: 700;
}

.auth-trustbar {
    --auth-trust-h: 52px;
    position: relative;
    z-index: 3;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    min-height: var(--auth-trust-h);
    background: linear-gradient(90deg, var(--auth-red-deep) 0%, var(--auth-red) 50%, var(--auth-red-deep) 100%);
    color: #ffffff;
    flex: 0 0 auto;
}

.auth-trustbar-inner {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: clamp(1rem, 2.5vw, 2rem);
    width: fit-content;
    max-width: min(520px, 34vw);
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.auth-trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 0;
    white-space: nowrap;
}

.auth-trust-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.95;
}

.auth-trust-item strong {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
}

.auth-trust-item span {
    display: block;
    font-size: 0.62rem;
    opacity: 0.85;
    margin-top: 0.05rem;
    line-height: 1.2;
}

@keyframes auth-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes auth-float {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-12px, 10px, 0) scale(1.04); }
}

@media (max-width: 1100px) {
    .auth-stage {
        grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.7fr);
        width: min(100%, calc(100% - 2rem));
        gap: 1.25rem;
    }

    .auth-card {
        width: min(100%, 310px);
    }

    .auth-headline {
        font-size: clamp(1.7rem, 3.2vw, 2.2rem);
    }

    .auth-logo {
        width: min(180px, 55%);
    }
}

@media (max-width: 900px) {
    body.auth-body {
        height: auto;
        min-height: 100dvh;
        overflow: auto;
    }

    .auth-page {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .auth-stage {
        grid-template-columns: 1fr;
        width: min(480px, calc(100% - 1.25rem));
        padding: 1.15rem 0 1rem;
        gap: 1.25rem;
        align-items: stretch;
        overflow: visible;
        min-height: 0;
        flex: 1 0 auto;
    }

    .auth-hero {
        padding: 0;
    }

    .auth-brand-row {
        margin-bottom: 0.65rem;
    }

    .auth-logo {
        width: min(160px, 50%);
        margin-bottom: 1rem;
    }

    .auth-headline {
        font-size: 1.7rem;
        margin-bottom: 0.65rem;
    }

    .auth-sub {
        font-size: 0.92rem;
        margin-bottom: 1rem;
    }

    .auth-features {
        margin-bottom: 0.85rem;
        gap: 0.65rem;
    }

    .auth-visual {
        display: none;
    }

    .auth-quote {
        display: inline-flex;
        margin-bottom: 0.25rem;
    }

    .auth-card {
        max-width: none;
        width: min(100%, 360px);
        margin: 0 auto;
        padding: 1.25rem 1.15rem;
    }

    .auth-deco--tr {
        width: min(260px, 58vw);
    }

    .auth-deco--bl {
        width: min(220px, 50vw);
        bottom: var(--auth-trust-h, 72px);
        opacity: 0.85;
    }

    .auth-skyline {
        opacity: 0.05;
        height: 90px;
        bottom: var(--auth-trust-h, 72px);
    }

    .auth-trustbar {
        --auth-trust-h: 56px;
        padding: 0.55rem 0.75rem;
        position: sticky;
        bottom: 0;
    }

    .auth-trustbar-inner {
        max-width: 100%;
        width: 100%;
        gap: 0.75rem;
        justify-content: space-evenly;
    }

    .auth-trust-item {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
        white-space: normal;
    }

    .auth-trust-item strong {
        font-size: 0.68rem;
    }

    .auth-trust-item span {
        font-size: 0.58rem;
        line-height: 1.25;
    }
}

@media (max-width: 560px) {
    .auth-stage {
        width: calc(100% - 1rem);
        padding-top: 0.85rem;
    }

    .auth-brand-mark {
        width: 40px;
        height: 40px;
    }

    .auth-brand-text strong {
        font-size: 1.15rem;
    }

    .auth-brand-text span {
        font-size: 0.72rem;
        line-height: 1.3;
    }

    .auth-headline {
        font-size: 1.45rem;
    }

    .auth-sub {
        font-size: 0.88rem;
    }

    .auth-feature-icon {
        width: 36px;
        height: 36px;
    }

    .auth-feature-icon svg {
        width: 16px;
        height: 16px;
    }

    .auth-features strong {
        font-size: 0.9rem;
    }

    .auth-features li > div span {
        font-size: 0.8rem;
    }

    .auth-form-wrap h1 {
        font-size: 1.3rem;
    }

    .auth-form-wrap .lead {
        font-size: 0.88rem;
        margin-bottom: 1.1rem;
    }

    .auth-card {
        padding: 1.15rem 1rem;
        border-radius: 14px;
    }

    .auth-deco--tr {
        width: min(200px, 62vw);
    }

    .auth-deco--bl {
        width: min(160px, 48vw);
        bottom: 58px;
        opacity: 0.75;
    }

    .auth-trustbar {
        padding: 0.5rem 0.5rem;
    }

    .auth-trust-item svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 400px) {
    .auth-features {
        display: none;
    }

    .auth-trust-item span {
        display: none;
    }
}

@media (max-height: 820px) and (min-width: 901px) {
    .auth-stage {
        padding-top: 0.75rem;
        padding-bottom: 0.5rem;
        align-items: center;
    }

    .auth-logo {
        width: min(170px, 45%);
        margin-bottom: 0.85rem;
    }

    .auth-headline {
        font-size: clamp(1.55rem, 2.8vw, 2.1rem);
        margin-bottom: 0.55rem;
    }

    .auth-sub {
        margin-bottom: 0.75rem;
        font-size: 0.92rem;
    }

    .auth-features {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .auth-quote {
        font-size: 0.85rem;
        padding: 0.65rem 0.95rem;
    }

    .auth-card {
        padding: 1.25rem 1.35rem;
    }

    .auth-form-wrap h1 {
        font-size: 1.35rem;
    }

    .auth-form-wrap .lead {
        margin-bottom: 1rem;
        font-size: 0.88rem;
    }

    .auth-deco--bl {
        width: min(260px, 30vw);
        opacity: 0.75;
    }
}

@media (max-height: 700px) and (min-width: 901px) {
    .auth-sub {
        font-size: 0.85rem;
        margin-bottom: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-hero,
    .auth-panel,
    .auth-quote,
    .auth-deco {
        animation: none;
    }
}
