:root {
    --ink: #272c43;
    --muted: #777d91;
    --accent: #5655d9;
    --line: #e5e7f0;
}

.app-install {
    position: fixed;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 1040;
    box-shadow: 0 4px 18px #272c4326;
}

.app-install[hidden] {
    display: none;
}

body {
    margin: 0;
    background: #f7f8fc;
    color: var(--ink);
    font-family: "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
    font: inherit;
}

a {
    color: var(--accent);
}

:focus-visible {
    outline: 3px solid #a2a0fa;
    outline-offset: 3px;
}

.btn-primary {
    --bs-btn-bg: #5655d9;
    --bs-btn-border-color: #5655d9;
    --bs-btn-hover-bg: #4544c2;
    --bs-btn-hover-border-color: #4544c2;
    --bs-btn-active-bg: #4544c2;
    --bs-btn-active-border-color: #4544c2;
    border-radius: 9px;
}

.form-control:focus, .form-select:focus {
    border-color: #8b87eb;
    box-shadow: 0 0 0 3px #5655d91a;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    font-size: 27px;
    font-weight: 750;
    letter-spacing: -1px;
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 37px;
    height: 37px;
    border-radius: 12px;
    background: #ffffff18;
    font-size: 21px;
}

.brand-dot {
    margin-left: -9px;
    color: #a5a1ff;
}

.auth-page {
    min-height: 100vh;
    background: radial-gradient(ellipse at 8% 20%, #e9e7fb, transparent 55%), #f7f8fc;
    padding: 40px 8%;
}

.auth-brand .brand-mark {
    color: #6560d4;
    background: #e3e0f8;
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 430px;
    align-items: center;
    gap: 90px;
    max-width: 1100px;
    margin: 80px auto;
}

.eyebrow {
    color: #8883ac;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.auth-story h1 {
    margin: 24px 0;
    font-size: clamp(36px, 4vw, 58px);
    font-weight: 750;
    letter-spacing: -2px;
    line-height: 1.12;
}

.auth-story > p {
    max-width: 430px;
    color: #73788e;
    font-size: 17px;
    line-height: 1.8;
}

.auth-memory {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 40px 0 25px;
    padding: 24px;
    border: 1px solid #dedcf1;
    border-radius: 14px;
    background: #ffffffa8;
    box-shadow: 0 8px 40px #3e376408;
    transform: rotate(-2deg);
}

.memory-icon {
    color: #6e65d9;
    font-size: 24px;
}

.auth-memory p {
    margin: 6px 0 0;
    color: #858398;
    font-size: 12px;
}

.auth-memory > .bi {
    margin-left: auto;
    color: #c0b6de;
}

.privacy-line, .auth-footer {
    color: #9192a5;
    font-size: 12px;
}

.privacy-line .bi {
    margin-right: 7px;
}

.auth-card {
    padding: 38px;
    border: 1px solid #e7e7f0;
    border-radius: 20px;
    background: white;
    box-shadow: 0 12px 60px #28254208;
}

.auth-card h2 {
    margin: 12px 0;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.8px;
}

.auth-card > p {
    color: #898c9e;
    font-size: 13px;
}

.auth-card form {
    margin-top: 28px;
}

.auth-card label {
    font-size: 13px;
    font-weight: 500;
}

.auth-card .form-control {
    min-height: 45px;
    border-color: #e0e2ed;
    border-radius: 8px;
}

.auth-submit {
    width: 100%;
    min-height: 46px;
    margin-top: 15px;
}

.auth-switch {
    margin: 26px 0 0;
    text-align: center;
}

.auth-switch a {
    text-decoration: none;
    font-weight: 600;
}

.password-hint {
    color: #9393a4;
    font-size: 11px;
}

.auth-footer {
    text-align: center;
}

@media (max-width: 850px) {
    .auth-page {
        padding: 24px;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        gap: 35px;
        max-width: 460px;
        margin: 40px auto;
    }

    .auth-story h1 {
        font-size: 38px;
    }

    .auth-memory, .privacy-line {
        display: none;
    }

    .auth-card {
        padding: 28px;
    }
}
