/* Hantrum — общий стиль публичного сайта.
   Одна таблица для главной, входа и 404: иначе страницы расходятся по виду,
   а разные ответы на разные пути — верный признак прокси-хоста. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    line-height: 1.5;
}

.brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-height: 100%;
}

.brand img {
    max-width: 80vw;
    max-height: 52vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.brand img:hover {
    transform: scale(1.02);
}

.tagline {
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    letter-spacing: 0.04em;
    margin-top: 22px;
    text-align: center;
}

/* Кнопка входа на главной. Рисуется теми же краской и радиусом, что и
   submit на странице входа, — переход между страницами не выглядит
   разными сайтами. */
.cta {
    display: inline-block;
    margin-top: 26px;
    padding: 12px 34px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.cta:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* Вход. Карточка повторяет приём главной: тот же фон, та же сетка,
   тот же скруглённый радиус и та же тень. */
.login {
    width: 100%;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.35);
    padding: 30px 30px 26px;
}

.login h1 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #1c1c22;
    margin-bottom: 4px;
}

.login .sub {
    font-size: 0.82rem;
    color: #6b6b78;
    margin-bottom: 22px;
}

.login label {
    display: block;
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b6b78;
    margin-bottom: 6px;
}

.login input {
    display: block;
    width: 100%;
    font: inherit;
    color: #1c1c22;
    background: #f4f4f7;
    border: 1px solid #dddde4;
    border-radius: 8px;
    padding: 11px 13px;
    margin-bottom: 18px;
    outline: none;
}

.login input:focus {
    background: #fff;
    border-color: #764ba2;
}

.login button {
    display: block;
    width: 100%;
    font: inherit;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 13px;
    cursor: pointer;
}

.login button:hover {
    filter: brightness(1.07);
}

.login .back {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 0.82rem;
    color: #6b6b78;
    text-decoration: none;
}

.login .back:hover {
    color: #764ba2;
}

/* Сообщение о неудаче. Держим высоту блока постоянной, иначе карточка
   прыгает при первом нажатии. */
.notice {
    display: none;
    font-size: 0.85rem;
    color: #a12b2b;
    background: #fdecec;
    border: 1px solid #f3c9c9;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 18px;
}

.notice.shown {
    display: block;
}

/* Подвал общий для всех страниц. */
.footer {
    padding: 10px 20px 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.7rem, 2vw, 0.875rem);
    text-align: center;
    letter-spacing: 0.025em;
    flex-shrink: 0;
    width: 100%;
}

.footer a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .brand img {
        width: 85vw;
        max-height: 40vh;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .brand img {
        width: 85vw;
        max-height: 38vh;
    }

    .login {
        padding: 24px 20px 20px;
    }
}
