:root {
    color-scheme: light;
    --accent-orange: #f39200;
    --text-dark: #1a1a1a;
    --bg-light: #ebebeb;
    --bg-light-box: #f4f7f9;
    --input-border: #dcdcdc;
    --color-white-logo: #f4f7f9;
    --color-black: #1a1a1a;
    --text-muted: #555;
    --text-secondary: #666;
    --error-red: #dc2626;
    --color-white: #ffffff;
    --shadow-lg: rgba(0, 0, 0, 0.2);
    --input-bg: #ffffff;
    --input-text: #1a1a1a;
    --focus-ring: rgba(243, 146, 0, 0.1);
    --on-accent-text: #ffffff;
    --shadow-sm: rgba(0, 0, 0, 0.2);
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --accent-orange: #f5a01a;
        --text-dark: #e8eaef;
        --bg-light: #121418;
        --bg-light-box: #1c1f26;
        --input-border: #3a3f4a;
        --color-white-logo: #e8eaef;
        --color-black: #e8eaef;
        --text-muted: #a0a7b4;
        --text-secondary: #8b939e;
        --error-red: #f87171;
        --color-white: #e8eaef;
        --shadow-lg: rgba(0, 0, 0, 0.5);
        --input-bg: #252a33;
        --input-text: #e8eaef;
        --focus-ring: rgba(245, 160, 26, 0.22);
        --shadow-sm: rgba(0, 0, 0, 0.35);
    }

    .login-card {
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    }

    input {
        background-color: var(--input-bg);
        color: var(--input-text);
    }

    input::placeholder {
        color: #6b7280;
    }

    @media (max-width: 480px) {
        .login-card {
            background: transparent;
        }
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* --- ОТРИСОВКА ЛОГОТИПА ПО ФОТО --- */
.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 35px;
    text-decoration: none;
}

.logo-box {
    width: 44px;
    height: 44px;
    background-color: var(--accent-orange);
    border-radius: 4px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

/* Геометрия значка внутри квадрата */
.logo-box::before {
    content: '';
    width: 20px;
    height: 12px;
    border-top: 5px solid var(--color-white-logo);
    border-left: 5px solid var(--color-white-logo);
    border-right: 5px solid var(--color-white-logo);
    position: absolute;
    top: 12px;
}
.logo-box::after {
    content: '';
    width: 12px;
    height: 4px;
    background: var(--color-white-logo);
    position: absolute;
    bottom: 11px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text .top {
    color: var(--accent-orange);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.logo-text .bottom {
    color: var(--color-black);
    font-size: 26px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

/* --- ФОРМА АВТОРИЗАЦИИ --- */
.login-card {
    background: var(--bg-light-box);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

h1 {
    font-size: 18px;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: var(--input-bg);
    color: var(--input-text);
}

input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Как .bis-btn в main.css (кнопка «Перейти в БИС»): обводка, заливка по hover */
.btn-login {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: var(--input-bg);
    border: 2px solid var(--accent-orange);
    border-radius: 6px;
    color: var(--accent-orange);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-login:hover {
    background: var(--accent-orange);
    color: var(--on-accent-text);
    border-color: var(--accent-orange);
}

.btn-login:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 6px var(--shadow-sm);
}

.btn-login:focus-visible {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

.support-info {
    margin-top: 25px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.support-info a {
    color: var(--accent-orange);
    text-decoration: none;
}

.error_text {
    color: var(--error-red); 
    font-size: 0.9em; 
    margin-bottom: 10px;
}


/* Адаптивность */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
        box-shadow: none;
        background: transparent;
    }
}

.notification {
    position: fixed;
    top: -900px; /* Прячем за верхним краем */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-orange);
    color: var(--color-white);
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-lg);
    font-weight: 600;
    z-index: 2000;
    transition: top 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.notification.show {
    top: 10px; /* Выезжает на экран */
}