/* Орбита — страница авторизации */

html.auth-html,
html.auth-html body.auth-body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    z-index: 0;
    overflow: hidden;
    background: #000;
    pointer-events: none;
}

.auth-bg-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 72%;
    z-index: 0;
}

.auth-dots {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.auth-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(2, 7, 19, 0.2) 0%, rgba(2, 7, 19, 0.38) 100%);
    pointer-events: none;
}

.auth-page {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    overflow: hidden;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;
    padding: 30px 32px 32px;
    color: #e8edf5;
    background:
        linear-gradient(155deg, rgba(30, 42, 65, 0.9) 0%, rgba(13, 20, 34, 0.95) 64%, rgba(10, 16, 29, 0.97) 100%);
    border: 1px solid rgba(151, 180, 229, 0.17);
    border-radius: 20px;
    backdrop-filter: blur(20px) saturate(1.15);
    -webkit-backdrop-filter: blur(20px) saturate(1.15);
    box-shadow:
        0 26px 56px rgba(0, 0, 0, 0.42),
        0 0 36px rgba(45, 116, 244, 0.08);
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(circle at 82% 0%, rgba(81, 150, 255, 0.16), transparent 35%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent 24%);
    pointer-events: none;
}

/* --- Брендинг --- */
.auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

/* Allows a running instance with the previous Razor view to remain readable
   until it is restarted with the new compact brand mark. */
.auth-logo {
    display: block;
    width: auto;
    height: 112px;
    max-width: 100%;
    margin: 0;
    object-fit: contain;
    filter: drop-shadow(0 6px 24px rgba(59, 130, 246, 0.32));
}

.auth-logo--compact {
    height: 52px;
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.auth-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: #ffffff;
}

.auth-subtitle {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.01em;
    color: #7b8ba3;
}

.auth-intro {
    position: relative;
    z-index: 1;
    margin: 0 0 24px;
}

.auth-intro h2 {
    margin: 0 0 5px;
    color: #f6f8fc;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.25;
}

.auth-intro p {
    margin: 0;
    color: #97a6bb;
    font-size: 13px;
    line-height: 1.45;
}

/* --- Поля --- */
.auth-form {
    position: relative;
    z-index: 1;
    margin: 0;
}

.auth-field {
    margin-bottom: 19px;
}

.auth-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 400;
    color: #c8d0dc;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    height: 48px;
}

.auth-input-wrap > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 15px;
    line-height: 1;
    color: #5c6b82;
    pointer-events: none;
    z-index: 1;
}

.auth-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px 0 42px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    background: rgba(7, 12, 23, 0.58);
    color: #f0f4fa;
    font-size: 14px;
    font-family: inherit;
    line-height: 48px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-input::placeholder {
    color: #5c6b82;
    opacity: 1;
}

.auth-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.65);
    background: rgba(7, 12, 23, 0.82);
    box-shadow: 0 0 0 3px rgba(79, 143, 246, 0.16);
}

.auth-input-wrap--password .auth-input {
    padding-right: 42px;
}

.auth-toggle-pwd {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #5c6b82;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
}

.auth-toggle-pwd > i {
    display: block;
    line-height: 1;
}

.auth-toggle-pwd:hover {
    color: #8b95a8;
}

/* --- Запомнить / Забыли --- */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 12px;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    color: #8b95a8;
    cursor: pointer;
    user-select: none;
}

.auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #3b82f6;
    cursor: pointer;
    flex-shrink: 0;
}

.auth-forgot {
    font-size: 13px;
    font-weight: 400;
    color: #4d9fff;
    text-decoration: none;
    white-space: nowrap;
}

.auth-forgot:hover {
    color: #6eb0ff;
    text-decoration: underline;
}

.auth-forgot--muted {
    color: #667085;
    cursor: default;
}

/* --- Кнопка --- */
.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #4b8ef7 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.auth-submit:hover {
    background: linear-gradient(135deg, #609cf8 0%, #2e6fec 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.auth-submit:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

.auth-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

/* --- Разделитель --- */
.auth-divider {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0 18px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-divider span {
    font-size: 13px;
    font-weight: 400;
    color: #6b7789;
    flex-shrink: 0;
}

/* --- Футер --- */
.auth-footer {
    position: relative;
    z-index: 1;
    margin: 0;
    text-align: center;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: #8b95a8;
}

.auth-footer a {
    color: #4d9fff;
    text-decoration: none;
}

.auth-footer a:hover {
    color: #6eb0ff;
    text-decoration: underline;
}

/* --- Режим просмотра --- */
.auth-preview-hint {
    position: relative;
    z-index: 1;
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.22);
    font-size: 12px;
    line-height: 1.45;
    color: #9db8e8;
    text-align: center;
}

.auth-preview-hint strong {
    color: #c8daf8;
    font-weight: 600;
}

/* --- Ошибки --- */
.auth-error-block {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    font-size: 13px;
    color: #fca5a5;
    line-height: 1.4;
}

.auth-field-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #f87171;
}

@media (max-width: 480px) {
    html.auth-html,
    html.auth-html body.auth-body {
        overflow: auto;
    }

    .auth-page {
        min-height: 100dvh;
        height: auto;
        padding: 20px 16px;
    }

    .auth-card {
        padding: 26px 22px;
        border-radius: 16px;
    }

    .auth-brand {
        margin-bottom: 22px;
    }
}

.auth-submit > i {
    font-size: 13px;
    transition: transform 0.15s ease;
}

.auth-submit:hover > i {
    transform: translateX(2px);
}
