/* ═══════════════════════════════════════════════════════════════════════
   Страница входа. Контур управления 26.27
   Орбитальная анимация — оригинальная реализация на CSS, без внешних
   библиотек и без заимствования чужих материалов.
   ═══════════════════════════════════════════════════════════════════════ */

.login-body {
    margin: 0;
    min-height: 100dvh;
    background: radial-gradient(circle at 20% 15%, #16345f 0%, #0d1f3c 45%, #071227 100%);
    color: #e8eef8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.login-screen {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .login-screen { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 56px; }
}

/* ── Левая часть: бренд ─────────────────────────────────────────────── */
.login-brand-side { display: flex; flex-direction: column; align-items: center; gap: 22px; }

.login-logo img {
    height: 54px; width: auto; max-width: 78vw; object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45));
}

.login-promise { text-align: center; }
.login-promise span {
    display: block; font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
    color: #7ea6dd; margin-bottom: 6px;
}
.login-promise h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: .01em; }
.login-promise p { margin: 0; color: #a9c2e4; font-size: 15px; }

/* ── Орбитальная анимация ───────────────────────────────────────────── */
.yudens-orbit {
    position: relative;
    width: min(300px, 76vw);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}

.orbit-ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(126, 166, 221, .22);
    border-radius: 50%;
    animation: orbit-spin linear infinite;
}

.orbit-1 { inset: 26%; animation-duration: 14s; }
.orbit-2 { inset: 13%; animation-duration: 24s; animation-direction: reverse; }
.orbit-3 { inset: 0;   animation-duration: 38s; }

.orbit-body {
    position: absolute;
    width: 30px; height: 30px;
    margin: -15px 0 0 -15px;
    border-radius: 10px;
    display: grid; place-items: center;
    font-style: normal; font-size: 15px; line-height: 1;
    background: rgba(15, 38, 72, .92);
    border: 1px solid rgba(140, 180, 235, .35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
    animation: orbit-counter linear infinite;
    animation-duration: inherit;
}

/* Спутники держатся вертикально, пока орбита вращается */
.orbit-1 .orbit-body { animation-direction: reverse; }
.orbit-2 .orbit-body { animation-direction: normal; }
.orbit-3 .orbit-body { animation-direction: reverse; }

.orbit-1 .body-doc    { top: 0;    left: 50%; }
.orbit-2 .body-shield { top: 50%;  left: 0; }
.orbit-2 .body-wagon  { top: 50%;  left: 100%; }
.orbit-3 .body-bell   { top: 0;    left: 50%; }
.orbit-3 .body-leaf   { top: 75%;  left: 7%; }
.orbit-3 .body-cam    { top: 75%;  left: 93%; }

.body-doc::before    { content: "▤"; color: #9fd0ff; }
.body-shield::before { content: "◈"; color: #7dd6b0; }
.body-wagon::before  { content: "▰"; color: #ffc98a; }
.body-bell::before   { content: "◎"; color: #ff9d9d; }
.body-leaf::before   { content: "❧"; color: #a6e08a; }
.body-cam::before    { content: "▣"; color: #c3b3ff; }

.orbit-core {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 2px;
}
.orbit-core svg { width: 84px; height: 84px; filter: drop-shadow(0 8px 22px rgba(18, 100, 232, .5)); }
.orbit-core b { font-size: 15px; letter-spacing: .22em; margin-top: 8px; }
.orbit-core span { font-size: 10px; letter-spacing: .14em; color: #7ea6dd; text-transform: uppercase; }

@keyframes orbit-spin    { to { transform: rotate(360deg); } }
@keyframes orbit-counter { to { transform: rotate(-360deg); } }

@media (prefers-reduced-motion: reduce) {
    .orbit-ring, .orbit-body { animation: none !important; }
}

/* ── Правая часть: форма ────────────────────────────────────────────── */
.login-form-side { display: grid; place-items: center; }

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(160, 196, 240, .18);
    border-radius: 18px;
    padding: 26px 22px calc(22px + env(safe-area-inset-bottom));
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .38);
}

.login-card > p {
    margin: 0 0 4px; font-size: 11px; letter-spacing: .16em;
    text-transform: uppercase; color: #7ea6dd;
}
.login-card h2 { margin: 0 0 6px; font-size: 22px; }
.login-card > span { display: block; color: #a9c2e4; font-size: 14px; margin-bottom: 18px; }

.login-card label {
    display: block; margin-bottom: 14px;
    font-size: 13px; color: #bcd3ef;
}

.login-card input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 13px 14px;
    /* 16px обязательны: иначе Safari на iPhone приближает страницу (26.26) */
    font-size: 16px;
    color: #f2f7ff;
    background: rgba(8, 22, 44, .72);
    border: 1px solid rgba(150, 186, 232, .3);
    border-radius: 12px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.login-card input:focus {
    outline: none;
    border-color: #5aa9ff;
    box-shadow: 0 0 0 3px rgba(90, 169, 255, .22);
}

.login-card button.primary {
    width: 100%;
    margin-top: 4px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2f7ef0, #1150c4);
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}
.login-card button.primary:active { transform: translateY(1px); }

.login-error {
    margin-bottom: 16px;
    padding: 11px 13px;
    border-radius: 11px;
    font-size: 14px;
    color: #ffd9d9;
    background: rgba(180, 40, 40, .22);
    border: 1px solid rgba(255, 120, 120, .38);
}

.login-note {
    display: block;
    margin-top: 16px;
    font-size: 12px;
    line-height: 1.5;
    color: #86a5cd;
}
