 :root {
            --bg-color: #F2F2F7;
            --surface-color: #FFFFFF;
            --text-main: #1C1C1E;
            --text-secondary: #8E8E93;
            --error-color: #FF3B30;
            --success-color: #34C759;
            --primary-color: #007AFF;
            --primary-gradient: linear-gradient(135deg, #007AFF 0%, #00C6FF 100%);
            --telegram-color: #24A1DE;
            --border-radius: 16px;
            --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
            --shadow-float: 0 10px 30px rgba(0, 122, 255, 0.25);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-color);
            color: var(--text-main);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .login-container {
            width: 100%;
            max-width: 400px;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        /* --- Компактная шапка --- */
        .login-header {
            text-align: center;
            padding: 10px 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }

        .login-logo {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            background: var(--primary-gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            box-shadow: var(--shadow-float);
        }

        .login-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-main);
        }

        /* --- Form --- */
        .login-form {
            background: var(--surface-color);
            border-radius: var(--border-radius);
            padding: 20px;
            box-shadow: var(--shadow-soft);
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-label {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

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

        .form-input {
            width: 100%;
            padding: 12px 14px;
            padding-left: 40px;
            border: 2px solid #E5E5EA;
            border-radius: var(--border-radius);
            font-size: 15px;
            font-family: inherit;
            color: var(--text-main);
            background: var(--bg-color);
            transition: border-color 0.2s, box-shadow 0.2s;
            outline: none;
        }

        .form-input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
        }

        .form-input.error {
            border-color: var(--error-color);
        }

        .form-input.error:focus {
            box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15);
        }

        .form-icon {
            position: absolute;
            left: 12px;
            width: 18px;
            height: 18px;
            fill: var(--text-secondary);
            pointer-events: none;
        }

        .form-error {
            font-size: 11px;
            color: var(--error-color);
            font-weight: 500;
            display: none;
        }

        .form-error.visible {
            display: block;
        }

        .show-password {
            position: absolute;
            right: 12px;
            width: 18px;
            height: 18px;
            fill: var(--text-secondary);
            cursor: pointer;
            background: none;
            border: none;
            padding: 0;
        }

        /* --- Button --- */
        .login-btn {
            width: 100%;
            padding: 14px 20px;
            background: var(--primary-gradient);
            color: white;
            border: none;
            border-radius: var(--border-radius);
            font-size: 15px;
            font-weight: 700;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: var(--shadow-float);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .login-btn:hover {
            box-shadow: 0 12px 40px rgba(0, 122, 255, 0.35);
            transform: translateY(-1px);
        }

        .login-btn:active {
            transform: scale(0.98);
        }

        .login-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .login-btn .spinner {
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            display: none;
        }

        .login-btn.loading .spinner {
            display: block;
        }

        .login-btn.loading .btn-text {
            display: none;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* --- Divider --- */
        .divider {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 4px 0;
        }

        .divider::before,
        .divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: #E5E5EA;
        }

        .divider span {
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        /* --- Telegram Button --- */
        .telegram-btn {
            width: 100%;
            padding: 14px 20px;
            background: var(--telegram-color);
            color: white;
            border: none;
            border-radius: var(--border-radius);
            font-size: 15px;
            font-weight: 700;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .telegram-btn:hover {
            background: #1f8ec4;
            transform: translateY(-1px);
        }

        .telegram-btn:active {
            transform: scale(0.98);
        }

        .telegram-btn svg {
            width: 20px;
            height: 20px;
            fill: white;
        }

        /* --- Footer --- */
        .login-footer {
            text-align: center;
            font-size: 12px;
            color: var(--text-secondary);
            padding: 8px 0;
        }

        .login-footer a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
        }

        .login-footer a:hover {
            text-decoration: underline;
        }

        /* --- Alert Box --- */
        .alert {
            padding: 10px 14px;
            border-radius: var(--border-radius);
            font-size: 12px;
            font-weight: 500;
            display: none;
            align-items: center;
            gap: 8px;
        }

        .alert.error {
            background: #FFEBEE;
            color: var(--error-color);
            border: 1px solid #FFCDD2;
        }

        .alert.success {
            background: #E8F5E9;
            color: var(--success-color);
            border: 1px solid #C8E6C9;
        }

        .alert.visible {
            display: flex;
        }

        /* --- Forgot Password Link --- */
        .forgot-password {
            text-align: right;
        }

        .forgot-password a {
            font-size: 12px;
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
        }

        /* --- Responsive --- */
        @media (max-width: 480px) {
            .login-container {
                gap: 16px;
            }

            .login-form {
                padding: 16px;
            }

            .login-header {
                gap: 10px;
            }

            .login-logo {
                width: 36px;
                height: 36px;
                font-size: 18px;
            }

            .login-title {
                font-size: 16px;
            }
        }