/* ===== Страница входа ===== */
.auth {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.95fr);
    min-height: 100vh;
}

.auth-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 44px;
    padding: 40px 60px 56px;
    overflow: hidden;
    color: #f4f0e8;
    background:
        radial-gradient(760px 520px at 8% 0%, rgba(224, 181, 122, 0.26), transparent 58%),
        radial-gradient(640px 520px at 96% 88%, rgba(110, 181, 168, 0.22), transparent 56%),
        radial-gradient(420px 280px at 50% 50%, rgba(196, 90, 74, 0.1), transparent 70%),
        #07080c;
    isolation: isolate;
}

.auth-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, transparent 0%, rgba(7, 8, 12, 0.2) 100%),
        radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.4px) 0 0 / 24px 24px;
    mask-image: linear-gradient(180deg, #000 20%, transparent 88%);
}

.auth-hero::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    right: -80px;
    bottom: -90px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224, 181, 122, 0.16), transparent 68%);
    filter: blur(10px);
}

.hero-shelf {
    position: relative;
    height: 320px;
    margin: 24px auto 0;
    width: 100%;
    max-width: 460px;
    perspective: 900px;
}

.hero-book {
    position: absolute;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 154px;
    height: 232px;
    padding: 26px 16px 16px 26px;
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: #fff;
    border-radius: 4px 14px 14px 4px;
    box-shadow:
        0 34px 56px -22px rgba(0, 0, 0, 0.82),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: float 8s ease-in-out infinite;
}

.hero-book::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 14px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.22) 46%, rgba(0, 0, 0, 0.18));
    border-radius: 4px 0 0 4px;
}

.hero-book .cover-band {
    width: 42px;
}

.hb1 {
    left: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 32%),
        linear-gradient(155deg, #4a1570 0%, #e07a48 100%);
    transform: rotate(-11deg) translateY(10px);
    animation-delay: -2s;
}

.hb2 {
    left: 50%;
    z-index: 1;
    width: 172px;
    height: 258px;
    margin-left: -86px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 32%),
        linear-gradient(155deg, #0a3d52 0%, #e2a84a 100%);
    box-shadow: 0 40px 64px -20px rgba(0, 0, 0, 0.88);
}

.hb3 {
    right: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 32%),
        linear-gradient(155deg, #0f4f46 0%, #4db8a6 100%);
    transform: rotate(10deg) translateY(10px);
    animation-delay: -4.5s;
}

@keyframes float {
    50% {
        translate: 0 -12px;
    }
}

.hero-wave {
    position: absolute;
    top: 8px;
    left: 50%;
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 40px;
    transform: translateX(-50%);
}

.hero-wave i {
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #e8c48a, #6eb5a8);
    border-radius: 99px;
    animation: wave 1.2s ease-in-out infinite;
}

.hero-wave i:nth-child(3n) { animation-delay: -0.4s; }
.hero-wave i:nth-child(3n + 1) { animation-delay: -0.8s; }
.hero-wave i:nth-child(4n) { animation-delay: -1s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.22); }
    50% { transform: scaleY(1); }
}

.hero-copy h1 {
    font-family: var(--font-serif);
    font-size: clamp(36px, 4vw, 58px);
    font-weight: 560;
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.hero-copy em {
    font-style: italic;
    font-weight: 500;
    background: linear-gradient(120deg, #e8c48a, #f0d7b0 40%, #6eb5a8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy p {
    max-width: 500px;
    margin-top: 18px;
    font-size: 16.5px;
    line-height: 1.55;
    color: rgba(244, 240, 232, 0.7);
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
    list-style: none;
}

.hero-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14.5px;
    font-weight: 600;
    color: rgba(244, 240, 232, 0.9);
}

.hero-features .icon {
    width: 36px;
    height: 36px;
    padding: 8px;
    color: #e8c48a;
    background: rgba(224, 181, 122, 0.12);
    border: 1px solid rgba(224, 181, 122, 0.14);
    border-radius: 12px;
}

/* ===== Панель с формой ===== */
.auth-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 28px;
}

.auth-panel .container {
    padding: 8px 4px 4px;
}

.theme-switch {
    position: absolute;
    top: 24px;
    right: 24px;
    background: color-mix(in srgb, var(--surface-2) 80%, transparent);
    border: 1px solid var(--border);
}

.container {
    width: 100%;
    max-width: 400px;
    animation: rise 0.55s var(--ease) both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

.auth-brand-mobile {
    display: none;
    margin-bottom: 36px;
}

.form-section h2 {
    font-family: var(--font-serif);
    font-size: 34px;
    font-weight: 560;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.form-lead {
    margin: 10px 0 30px;
    color: var(--text-2);
}

.form-section form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.consent-link {
    display: inline;
    padding: 0;
    color: var(--accent);
    font-weight: 700;
    line-height: inherit;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.consent-copy p + p {
    margin-top: 12px;
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.45;
    cursor: pointer;
}

.consent input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.form-section .btn-block {
    height: 52px;
    margin-top: 8px;
    font-size: 15.5px;
}

.form-section .btn-ghost.btn-block {
    margin-top: 0;
}

.code-input {
    font-size: 22px !important;
    font-weight: 700;
    letter-spacing: 0.5em;
    text-align: center;
}

#confirmCodeForm .hint-text {
    margin: -4px 0 0;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
}

.switch-form {
    margin-top: 26px;
    font-size: 14.5px;
    color: var(--text-2);
    text-align: center;
}

.switch-form a,
.forgot-password a {
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.switch-form a:hover,
.forgot-password a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.forgot-password {
    margin-top: 14px;
    font-size: 14px;
    text-align: center;
}

.result {
    margin-top: 20px;
    padding: 12px 16px;
    font-size: 14.5px;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-sm);
    animation: rise 0.3s var(--ease) both;
}

.result.success {
    color: var(--success);
    background: var(--success-soft);
}

.result.error {
    color: var(--danger);
    background: var(--danger-soft);
}

.result.info {
    color: var(--info);
    background: var(--info-soft);
}

@media (max-width: 960px) {
    .auth {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        display: none;
    }

    .auth-brand-mobile {
        display: inline-flex;
    }
}
