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

        body {
            background: #0f1217;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        /* Градиентный фон как в Grafana */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 20% 30%, rgba(30, 40, 60, 0.4), transparent 80%);
            pointer-events: none;
            z-index: -1;
        }

        .login-container {
            width: 100%;
            max-width: 460px;
            padding: 1.5rem;
        }

        /* Карточка входа — стиль как у Grafana login */
        .login-card {
            background: #161a23;
            border-radius: 1.2rem;
            border: 1px solid #2a2f3a;
            box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(2px);
            overflow: hidden;
        }

        /* Акцентная полоса сверху */
        .login-accent {
            height: 4px;
            background: linear-gradient(90deg, #3b82f6, #6c5ce7, #3b82f6);
        }

        .login-content {
            padding: 2.2rem 2rem 2rem 2rem;
        }

        /* Логотип/иконка */
        .login-icon {
            text-align: center;
            margin-bottom: 1.8rem;
        }

        .login-icon i {
            font-size: 3rem;
            color: #3b82f6;
            background: #1e232e;
            padding: 0.8rem;
            border-radius: 1.5rem;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        h1 {
            font-size: 1.8rem;
            font-weight: 600;
            text-align: center;
            background: linear-gradient(135deg, #f0f4fc 0%, #9aa9c1 100%);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            margin-bottom: 0.4rem;
        }

        .subtitle {
            text-align: center;
            color: #6e7b91;
            font-size: 0.85rem;
            margin-bottom: 2rem;
        }

        /* Django-style формы, но в тёмной графана-теме */
        .form-group {
            margin-bottom: 1.25rem;
        }

        label {
            display: block;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #9aa9c1;
            margin-bottom: 0.5rem;
        }

        .input-group {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-group i {
            position: absolute;
            left: 14px;
            color: #6e7b91;
            font-size: 0.9rem;
            pointer-events: none;
        }

        input {
            width: 100%;
            background: #0f1117;
            border: 1px solid #2a2f3a;
            border-radius: 10px;
            padding: 0.85rem 1rem 0.85rem 2.5rem;
            font-size: 0.9rem;
            color: #e5e9f0;
            font-family: 'Inter', monospace;
            transition: all 0.2s ease;
        }

        input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
            background: #121520;
        }

        input::placeholder {
            color: #4a5568;
            font-size: 0.8rem;
        }

        /* Чекбокс запомнить меня */
        .checkbox-group {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: 1.5rem 0 1.8rem 0;
            font-size: 0.8rem;
        }

        .checkbox-label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            color: #9aa9c1;
        }

        .checkbox-label input {
            width: 18px;
            height: 18px;
            margin: 0;
            cursor: pointer;
            accent-color: #3b82f6;
        }

        .forgot-link {
            color: #6e7b91;
            text-decoration: none;
            font-size: 0.75rem;
            transition: color 0.2s;
        }

        .forgot-link:hover {
            color: #3b82f6;
            text-decoration: underline;
        }

        /* Кнопка входа в графана-стиле */
        .login-btn {
            width: 100%;
            background: #3b82f6;
            border: none;
            border-radius: 10px;
            padding: 0.85rem;
            font-size: 0.9rem;
            font-weight: 600;
            color: white;
            font-family: 'Inter', sans-serif;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .login-btn i {
            font-size: 1rem;
        }

        .login-btn:hover {
            background: #2563eb;
            transform: translateY(-1px);
            box-shadow: 0 6px 14px rgba(59, 130, 246, 0.3);
        }

        .login-btn:active {
            transform: translateY(1px);
        }

        /* Сообщения об ошибках (Django style) */
        .error-message {
            background: rgba(239, 68, 68, 0.12);
            border-left: 3px solid #ef4444;
            padding: 0.7rem 1rem;
            border-radius: 8px;
            margin-bottom: 1.5rem;
            font-size: 0.75rem;
            color: #f87171;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .error-message i {
            font-size: 0.9rem;
        }

        /* CSRF токен скрыт, но учитывается */
        .csrf-hidden {
            display: none;
        }

        /* Дополнительные ссылки снизу */
        .login-footer {
            text-align: center;
            margin-top: 1.8rem;
            padding-top: 1.2rem;
            border-top: 1px solid #1f2430;
        }

        .login-footer a {
            color: #6e7b91;
            text-decoration: none;
            font-size: 0.75rem;
            transition: color 0.2s;
        }

        .login-footer a:hover {
            color: #3b82f6;
        }

        /* Адаптив */
        @media (max-width: 500px) {
            .login-content {
                padding: 1.5rem;
            }
            h1 {
                font-size: 1.5rem;
            }
        }

        /* Анимация появления */
        .login-card {
            animation: fadeSlideUp 0.4s ease-out;
        }

        @keyframes fadeSlideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }