@charset "UTF-8";
/* Inventio — экраны входа Gitea в стиле портала. 2026-11-16, v=3 (вход по пути в Garage подписан «Garage»);
   2026-11-17, v=4: окно — карточка портала на живом небе (вид окна, кнопки и эффекты — fx.css и login.js), цвет Gitea — зелёный.
   Страницы: вход, регистрация, вход через OpenID, двухфакторный код и резервный код,
   ключ безопасности, восстановление пароля, активация, привязка аккаунта, подтверждение доступа приложения (OAuth).
   Карточка — любой контейнер, у которого прямой потомок — заголовок формы (h1–h5.ui.top.attached.header). */

/* цвет окна — как у карточки Gitea на портале; вход по пути в Garage — цвет Garage */
:root { --ik-acc: #45d483; }
body[data-ik-target="garage"] { --ik-acc: #f58a3d; }

/* содержимое — над небом и городом */
.full.height { position: relative; z-index: 1; background: transparent !important; }
.page-footer { position: relative; z-index: 2; }

/* верхняя полоса Gitea — тёмное стекло с бирюзовой линией, как полоса вкладок портала */
#navbar {
    background: rgba(7, 18, 34, 0.72) !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(58, 208, 245, 0.22) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    animation: ik-up 0.6s ease-out backwards;
}
#navbar .item, #navbar a.item { color: var(--ik-muted) !important; }
#navbar .item:hover, #navbar a.item:hover { color: var(--ik-text) !important; background: rgba(58, 208, 245, 0.09) !important; }
#navbar .ui.button, #navbar a.item.active { border: 1px solid rgba(58, 208, 245, 0.45) !important; border-radius: 10px !important; background: rgba(58, 208, 245, 0.1) !important; color: var(--ik-cyan-soft) !important; }

/* надпись над формой */
.page-content { padding-top: 2vh; }
.page-content::before {
    content: "INVENTIO · ПОРТАЛ КОМАНДЫ";
    display: block;
    margin: 4vh auto 6px;
    text-align: center;
    font-family: var(--ik-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--ik-cyan);
    text-shadow: 0 0 12px rgba(58, 208, 245, 0.5);
    animation: ik-up 0.7s ease-out 0.15s backwards;
}
.page-content a { color: color-mix(in srgb, var(--ik-acc) 55%, #fff); }
.page-content a:hover { color: #fff; }
.page-content, .page-content p, .page-content .ui.segment { color: var(--ik-text); }
.page-content p b, .page-content p strong { color: #fff; }

/* окно — шириной как карточка портала (вид окна — fx.css) */
.page-content :is(div, form):has(> :is(h1, h2, h3, h4, h5).ui.top.attached.header) { width: 100%; max-width: 560px; margin-left: auto !important; margin-right: auto !important; }
.page-content .ui.attached.segment.header { width: 100%; max-width: 560px; margin-left: auto !important; margin-right: auto !important; }

/* заголовок формы — шрифт и градиент заголовков портала */
.page-content :is(h1, h2, h3, h4, h5).ui.top.attached.header {
    position: relative;
    padding: 30px 24px 14px !important;
    border: 0 !important;
    background: transparent !important;
    text-align: center;
    font-family: var(--ik-display) !important;
    font-size: 23px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.01em;
    color: transparent !important;
    background-image: linear-gradient(90deg, var(--accent, var(--ik-acc)) 0%, color-mix(in srgb, var(--accent, var(--ik-acc)) 45%, #fff) 40%, var(--ik-text) 75%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    filter: drop-shadow(0 0 18px rgba(58, 208, 245, 0.25));
}
/* линия цвета окна под заголовком — при наведении и вводе вырастает (как у карточек портала) */
.page-content :is(h1, h2, h3, h4, h5).ui.top.attached.header::before {
    content: "";
    position: absolute;
    left: 50%; bottom: 2px;
    width: 28px; height: 2px;
    translate: -50% 0;
    border-radius: 2px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 20%, transparent), var(--accent), color-mix(in srgb, var(--accent) 20%, transparent));
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent);
    opacity: 0.6;
    transition: width 0.35s ease, opacity 0.35s ease;
}
[data-sky-card]:is(:hover, :focus-within) > :is(h1, h2, h3, h4, h5).ui.top.attached.header::before { width: 76px; opacity: 1; }

/* блоки внутри карточки — прозрачные, между ними тонкий разделитель */
.page-content :is(div, form):has(> :is(h1, h2, h3, h4, h5).ui.top.attached.header) > .ui.attached.segment {
    padding: 18px 26px 22px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--ik-text) !important;
}
.page-content :is(div, form):has(> :is(h1, h2, h3, h4, h5).ui.top.attached.header) > .ui.attached.segment:last-child { padding-bottom: 28px !important; }
.page-content :is(div, form):has(> :is(h1, h2, h3, h4, h5).ui.top.attached.header) > .ui.attached.segment + .ui.attached.segment {
    border-top: 1px solid rgba(120, 170, 230, 0.14) !important;
}
/* отдельный блок вне карточки (на странице входа — «Войти с ключом доступа») */
.page-content .ui.attached.segment.header {
    border: 1px solid var(--ik-line) !important;
    border-radius: 14px !important;
    background: rgba(7, 18, 34, 0.66) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--ik-muted) !important;
    font-family: var(--ik-body) !important;
    font-size: 14px !important;
    animation: ik-up 0.7s ease-out 0.7s backwards;
}
.page-content a.signin-passkey { color: color-mix(in srgb, var(--ik-acc) 55%, #fff) !important; font-weight: 700; }

/* поля */
.page-content .ui.form label, .page-content .ui.form .field > label {
    color: var(--ik-muted) !important;
    font-family: var(--ik-body);
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
}
.page-content .ui.form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.page-content .ui.form textarea {
    min-height: 46px;
    padding: 0 14px !important;
    border: 1px solid var(--ik-line) !important;
    border-radius: 12px !important;
    background: rgba(4, 12, 24, 0.72) !important;
    color: var(--ik-text) !important;
    font-family: var(--ik-body);
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.25s ease, background-color 0.2s ease;
}
.page-content .ui.form input#passcode, .page-content .ui.form input#token { /* коды 2FA — крупно и вразрядку */
    text-align: center;
    font-family: var(--ik-display);
    font-size: 22px;
    letter-spacing: 0.4em;
}
.page-content .ui.form input:focus, .page-content .ui.form textarea:focus {
    border-color: var(--ik-acc) !important;
    background: rgba(6, 18, 34, 0.9) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ik-acc) 18%, transparent), 0 0 18px color-mix(in srgb, var(--ik-acc) 25%, transparent) !important;
}
.page-content .ui.form input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 40px #07142a inset !important;
    -webkit-text-fill-color: var(--ik-text) !important;
    caret-color: var(--ik-text);
}
.page-content .ui.checkbox label { color: var(--ik-muted) !important; }
.page-content .ui.checkbox label::before {
    border: 1px solid rgba(120, 170, 230, 0.4) !important;
    border-radius: 5px !important;
    background: rgba(4, 12, 24, 0.72) !important;
}
.page-content .ui.checkbox input:checked ~ label::before { border-color: var(--ik-acc) !important; box-shadow: 0 0 10px color-mix(in srgb, var(--ik-acc) 35%, transparent); }
.page-content .ui.checkbox input:checked ~ label::after { color: var(--ik-acc) !important; }

/* кнопки — как у карточек портала (fx.css): основная залита цветом окна, вторичная — контур */
.page-content .ui.button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.page-content .inline.field { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }

/* подтверждение доступа приложения (OAuth): длинный вопрос — мельче, кнопки — во всю ширину друг под другом */
.page-content.oauth2-authorize-application-box :is(h1, h2, h3, h4, h5).ui.top.attached.header { font-size: 19px !important; line-height: 1.35 !important; padding: 30px 30px 6px !important; }
.page-content.oauth2-authorize-application-box form { display: flex; flex-direction: column; gap: 10px; }
.page-content.oauth2-authorize-application-box form .ui.button { width: 100%; margin: 0 !important; white-space: normal; line-height: 1.3; }

/* ключ безопасности (WebAuthn): значок ключа светится бирюзой */
.page-content.webauthn-prompt svg.octicon-key { color: var(--ik-acc); filter: drop-shadow(0 0 14px color-mix(in srgb, var(--ik-acc) 60%, transparent)); }
.page-content.webauthn-prompt h3:not(.ui) { color: var(--ik-text) !important; font-family: var(--ik-display); font-size: 18px; }

/* ошибки и уведомления (неверный пароль, неверный код и т. п.) */
.page-content .ui.message, .page-content .flash-message {
    border: 1px solid var(--ik-line) !important;
    border-radius: 12px !important;
    background: rgba(7, 18, 34, 0.8) !important;
    color: var(--ik-text) !important;
    box-shadow: none !important;
}
.page-content .ui.negative.message, .page-content .ui.error.message, .page-content .flash-error {
    border-color: rgba(242, 86, 111, 0.5) !important;
    background: rgba(242, 86, 111, 0.12) !important;
    color: #ffd9df !important;
}
.page-content .ui.positive.message, .page-content .ui.success.message, .page-content .flash-success {
    border-color: rgba(69, 212, 131, 0.5) !important;
    background: rgba(69, 212, 131, 0.1) !important;
    color: #d6ffe6 !important;
}

/* подвал Gitea — приглушённое стекло над городом */
.page-footer {
    border-top: 1px solid rgba(58, 208, 245, 0.14) !important;
    background: rgba(5, 13, 25, 0.62) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #6f839e !important;
}
.page-footer a { color: var(--ik-muted) !important; }

/* вход по пути в Garage: nginx ставит <body data-ik-target="garage">, если вход идёт в Garage
   (по redirect_to / redirect_uri в адресе или cookie redirect_to Gitea) — подпись «Garage» */
body[data-ik-target="garage"] .page-content::before { content: "INVENTIO · GARAGE"; }

@media (max-width: 767px) {
    .page-content::before { margin-top: 2vh; }
    .page-content :is(div, form):has(> :is(h1, h2, h3, h4, h5).ui.top.attached.header) > .ui.attached.segment { padding: 14px 18px 18px !important; }
    .page-content :is(h1, h2, h3, h4, h5).ui.top.attached.header { font-size: 21px !important; }
}
@media (prefers-reduced-motion: reduce) {
    #navbar, .page-content::before, .page-content .ui.attached.segment.header { animation: none !important; }
    .page-content .ui.button::after { display: none; }
}
